Hi, It seems you didn't assign any value to SOAP_ACTION variable???
Regards, Shankar 2010/1/29 Olivier Mengué <[email protected]>: > Hi, > > I'm trying to write a SOAP client for the public SOAP service at: > http://www.service-repository.com/service/wsdl?id=98309 > > My attempts fail due to an empty SOAPAction header: Axis2/C 1.6.0 sends > this: > ------------------------------------- > POST > http://mellbourn.com:80/WebServices/PasswordGeneratorWebService/PasswordGeneratorService.asmx > HTTP/1.1 > User-Agent: Axis2C/1.6.0 > SOAPAction: "" > Content-Length: 199 > Content-Type: text/xml;charset=UTF-8 > Host: mellbourn.com:80 > > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><get_Password > xmlns="http://www.mellbourn.com/WebServices/"></get_Password></soapenv:Body></soapenv:Envelope> > ------------------------------------- > > The response is: > ------------------------------------- > HTTP/1.1 500 Internal Server Error. > Date: Fri, 29 Jan 2010 18:04:58 GMT > Server: Microsoft-IIS/6.0 > MicrosoftOfficeWebServer: 5.0_Pub > X-Powered-By: ASP.NET > PICS-Label: (PICS-1.0 "http://www.rsac.org/ratingsv01.html" l by > "k...@mellbourn > .net" on "2003.05.01T16:56+0200" exp "2004.05.01T12:00+0200" r (v 0 s 0 n 0 > l 0) > ) > X-AspNet-Version: 1.1.4322 > Cache-Control: private > Content-Type: text/xml; charset=utf-8 > Content-Length: 818 > Proxy-Connection: Keep-Alive > Connection: Keep-Alive > > <?xml version="1.0" encoding="utf-8"?> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi= > "http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XM > LSchema"> > <soap:Body> > <soap:Fault> > <faultcode>soap:Client</faultcode> > <faultstring>System.Web.Services.Protocols.SoapException: Server did > not r > ecognize the value of HTTP Header SOAPAction: . > at > System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() > at System.Web.Services.Protocols.SoapServerProtocol.Initialize() > at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, > Http > Context context, HttpRequest request, HttpResponse response, Boolean& > abortP > rocessing)</faultstring> > <detail /> > </soap:Fault> > </soap:Body> > </soap:Envelope> > ---------------------------- > > > According to the faultstring, the problem is the [SOAPAction: ""] header. > > I tried to set the soap_action in the client options, but it looks like that > does nothing: > > /* The axutil_string_create_const() is strange. See AXIS2C-1443 */ > axis2_char_t *SOAP_ACTION; > axis2_options_set_soap_action(options, env, > axutil_string_create_const(env, &SOAP_ACTION)); > > > The full source code is attached. I plan to release it as an AXIS2/C sample > when it's done. > > Olivier Mengué -- S.Uthaiyashankar Software Architect WSO2 Inc. http://wso2.com/ - "The Open Source SOA Company"
