axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul.dead...@longfield.co.uk
Subject SOAP Version
Date Sat, 30 Jan 2010 23:55:18 GMT
Hi 

I have a problem with the SOAP version, with Axis2c as a client (on XP) to 
a WCF service. The WCF Service is a wsHttpbinding with Anonymous 
authentication. (As an aside im using 1.6.0 which I downloaded 2 days ago. 
The binary version appeared to have a problem with the file seperator to 
locate the lib directory, so I took the source, change the file seperator 
in the windows specific elements to "\" compiled it and it allowed it to 
load the http sender.)

Now down to my problem:-

1. I get the following in the log file:-

[Sat Jan 30 23:02:06 2010] [debug] 
..\..\src\core\transport\http\sender\http_transport_sender.c(246) ctx_epr:
http://win7dev03/mexdelegation/emmdel.svc
[Sat Jan 30 23:02:06 2010] [debug] 
..\..\src\core\transport\http\sender\http_transport_sender.c(805) using 
axis2 native http sender.
[Sat Jan 30 23:02:06 2010] [debug] 
..\..\src\core\transport\http\sender\http_sender.c(416) 
msg_ctx_id:urn:uuid:3979014b-3c85-465b-ba42-50fa313230c0
[Sat Jan 30 23:02:07 2010] [error] 
..\..\src\core\transport\http\sender\http_sender.c(1442) Error occurred in 
transport
[Sat Jan 30 23:02:07 2010] [error] ..\..\src\core\engine\engine.c(179) 
Transport sender invoke failed
[Sat Jan 30 23:02:07 2010] [error] c:\documents and settings\pdeadman\my 
documents\visual studio 
2008\projects\testaxisclient\testaxisclient\testaxisclient.cpp(92) Stub 
invoke FAILED: Error code: 74 :: Error occurred in transport

2. I get the following from a network trace

This is in the Content-Type:

text/xml;charset=UTF-8


And the following is returned:-

HTTP/1.1 415 Cannot process the message because the content type 
'text/xml;charset=UTF-8' was not the expected type 'application/soap+xml; 
charset=utf-8'.\r\n

3) In the code I have inserted a line 

int mysoapver = axis2_options_get_soap_version(options,env);

Which returns a value of 2. 

Do I have to specify any specific options to force SOAP1.2 ?

The code in question is fairly simple, I using a stub from the WSDL2C to 
create the service (named "Service1" here) and then calling the method 
ConnectMEX. 
The mysoapver is returned with a value of 2.

        myservice = 
axis2_stub_create_Service1(env,client_home,endpoint_ref);

        int mysoapver = axis2_options_get_soap_version(options,env);

        // Try to force application/xml+soap
        rc=axis2_options_set_soap_version(options,env,AXIOM_SOAP12);

        adb_ConnectMEXResponse_t *response=NULL;
        adb_ConnectMEX_t *package;
        package = adb_ConnectMEX_create(env);

        response = 
axis2_stub_op_Service1_ConnectMEX(myservice,env,package);


Im new to AXIS2C but have used other web service apps.

Paul Deadman
Mobile: 07769 930 235
Skype: Paul Deadman, York


Mime
View raw message