Assaf,

looking at your files you added to the project, you miss 
soapClient.cpp.
i find it strange you do not get a error during compiling. so, i do 
not know if that is the solution, but in my experience this is one of 
the main files of the gSoap client.

 Lee



--- In gsoap@yahoogroups.com, "Assaf Stone" <[EMAIL PROTECTED]> wrote:
>
> Uh... Yeah. <grins sheepishly>
> 
> Ok. Here's what I did:
> On the server side, I generated the sample service one op returning 
a 
> string, one returning a data contract) VS-2008 provides as a 
> template, with all the defaults left as is.
> 
> For sanity, I created a C# client that consumes the service (which 
> worked perfectly).
> I created a header, using:
> wsdl2h -o header.h http://localhost:59030/WCFService/Service.svc
> 
> Then I created the client side files required, using
> soapcpp2 -i -C -Iimport header.h
> 
> I copied the files (nsmap, *proxy.h, *proxy.cpp, soapStub.h, 
soapH.h, 
> soapC.cpp) to the project dir, and added stdsoap2 (.cpp & .h) to 
the 
> project (referenced from the gsoap folder).
> 
> The client code I wrote is as follows:
> -----------------------------------------
> #include "soapWSHttpBinding_USCOREIServiceProxy.h"
> #include "WSHttpBinding_USCOREIService.nsmap"
> #include "stdafx.h"
> 
> int _tmain(int argc, _TCHAR* argv[])
> {
>       WSHttpBinding_USCOREIServiceProxy svc;
>       _ns1__GetData inp;
>       int i = 10;
>       inp.value = &i;
>       _ns1__GetDataResponse resp;
>       if (svc.GetData(&inp, &resp) == SOAP_OK)
>               std::cout << "GetData returned: " << *
> (resp.GetDataResult) << std::endl;
>       else
>               svc.soap_stream_fault(std::cerr);
>       
>       system("pause");
>       return 0;
> }
> -----------------------------------------
> 
> Running the code, I got the aforementioned error.
> > > --------------------------------------------
> > > Error 415 fault: SOAP-ENV:Server[no subcode]
> > > "HTTP Error"
> > > Detail: HTTP/1.1 415 Unsupported Media Type
> > > --------------------------------------------
> 
> 
> Any idea what the problem is?
> Thanks,
> Assaf.
> 
> --- In gsoap@yahoogroups.com, "cashsoftwarebv" <cashsoftwarebv@> 
> wrote:
> >
> > Assaf,
> > 
> > it is very hard to tell what went wrong if you do not include the 
> > details and steps you have taken... ;-)
> > 
> >  Lee
> > 
> > 
> > 
> > --- In gsoap@yahoogroups.com, "Assaf Stone" <assaf@> wrote:
> > >
> > > Hello all.
> > > 
> > > I'm rather new to both gSoap and C++ (though I've got years of 
> > > experience with other programming languages, including several 
> > years 
> > > of C#, for the record).
> > > 
> > > I've got a WCF service exposed as a WS-Http endpoint. The 
service 
> > is 
> > > written in C#, .NET 3.5 (VS-2008).
> > > 
> > > I successfully consumed a WCF service on a Basic-Http binding. 
> > > However, when I tried to consume a WS-Http (SOAP 1.2) service, 
I 
> > got 
> > > the following error:
> > > --------------------------------------------
> > > Error 415 fault: SOAP-ENV:Server[no subcode]
> > > "HTTP Error"
> > > Detail: HTTP/1.1 415 Unsupported Media Type
> > > --------------------------------------------
> > > 
> > > I couldn't find any detail nor reason for the failure.
> > > Could some one please help me understand what the problem is?
> > > Thanks,
> > > Assaf.
> > >
> >
>


Reply via email to