Using DIME in C++ - web service?

D

Daniel Johansson

Hi

Is it possible to use WSE and DIME in a c++ web service?
I can´t get it to work.

Regards

// Daniel
 
D

Daniel Johansson

Hi Christian

I´m developing a managed C++-web Service and my problem
occured months ago when I tried to pass binary files as dataset
between the client and the service. I then got the advice to
use DIME and recently downloaded WSE 1.0 SP1.

I read an example in C# and tried to convert the code to
c++. But it don´t get it to work.

C#
DimeAttachment attachment = new DimeAttachment("application/octet-stream",
TypeFormatEnum.MediaType, ms);
HttpSoapContext.ResponseContext.Attachments.Clear();
HttpSoapContext.ResponseContext.Attachments.Add(attachment);

C++ (I´ve tried this, and similar)
DimeAttachment* attachment;
attachment = new DimeAttachment("application/octet-stream",
TypeFormatEnum::MediaType, ms);
HttpSoapContext* hsc;
hsc->get_ResponseContext()->get_Attachments()->Clear();
hsc->ResponseContext->Attachments->Add(attachment);

This will compile, but when I run I get the error
"Object not set to an instance.." on the ...->Clear(); row.
If I then try to instance the object;
HttpSoapContext* phsc = new HttpSoapContext();
or
SoapContext* psc = new SoapContext();
i get the error C2512 "no deafult constructor" when I compile.

What can be wrong? Are there som arguments missing;
Intellisense doesn´t detect any. Are there some error in
the config-files?

With the very highest regards

// Daniel

PS*************************************************

Well actually, I also can´t get a C#-version to function.
I downloaded Roman Kiss-example
"Using WSE-DIME for Remoting over Internet"
http://www.codeproject.com/cs/webservices/remotingdime.asp

....allthough I did everything according to the book I kept on getting
the error .FileLoadException "The assembly manifest definition [name]
does not match the assembly reference". When I tried testing it
with the WindowsClient

DS**************************************************
Christian Weyer said:
Hi,
did you try it with MC++? Should actually not be a problem ... what problems are you experiencing?

Cheers,
--
Christian Weyer
Microsoft .NET & Service Oriented Architectures

[Microsoft Regional Director, Germany]
http://www.regionaldirectors.de/

* XML Web Services: http://www.xmlwebservices.cc/
* Weblog: http://weblogs.asp.net/cweyer/


Hi

Is it possible to use WSE and DIME in a c++ web service?
I can´t get it to work.

Regards

// Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top