Hi Thanks, Ive found the underlying problem, The WSDL2C code generator has added an explicit statement to set the SOAP version to 1.1, so even if you change it to 1.2 the stub code changes it back. I just changed the stub to state 1.2. Im not certain if this is a bug in the WSDL2C code emitter as the WSDL binding states 1.2. However thanks for your thoughts.
Cheers Paul Deadman Mobile: 07769 930 235 Skype: Paul Deadman, York Longfield Ltd 2 Maple House, Northminster Business Park,York,YO26 6QW This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient or there are problems please notify the sender and then delete it from your system. We have taken steps to keep this email and attachments free from viruses. However, we accept no liability for any loss or damage howsoever caused as a result of any virus being passed on. It is the responsibility of the recipient to perform all necessary checks. Nandika Jayawardana <jayaw...@gmail.com> 02/02/2010 07:46 Please respond to "Apache AXIS C User List" <axis-c-user@ws.apache.org> To Apache AXIS C User List <axis-c-user@ws.apache.org> cc Subject Re: SOAP Version You can obtain the service client struct and from that, you can get the axis2 options instance associated with the stub. The set the SOAP version to the options. svc_client = axis2_stub_get_svc_client(stub, env); options = axis2_svc_client_get_options(svc_client, env); axis2_options_set_soap_version(options, env, AXIOM_SOAP12); This should solve your issue. Regards Nandika On Sun, Jan 31, 2010 at 5:25 AM, <paul.dead...@longfield.co.uk> wrote: 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 -- http://nandikajayawardana.blogspot.com/ WSO2 Inc: http://www.wso2.com