axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doughty, Michael" <>
Subject RE: How to set SOAPAction header for SOAP 1.1?
Date Sun, 31 Jan 2010 06:28:22 GMT
It looks like you're setting the soap action to a string pointer that you haven't initialized
or set to the proper value.  From looking at the WSDL it seems like that value should be the
local value "get_Password", but the example they have on that site shows that it should be
set to the qualified value "".  So set the
string value of the action to the latter of the two and rebuild.

From: Olivier Mengué []
Sent: Friday, January 29, 2010 12:19 PM
Subject: How to set SOAPAction header for SOAP 1.1?


I'm trying to write a SOAP client for the public SOAP service at:

My attempts fail due to an empty SOAPAction header: Axis2/C 1.6.0 sends this:
User-Agent: Axis2C/1.6.0
SOAPAction: ""
Content-Length: 199
Content-Type: text/xml;charset=UTF-8

<soapenv:Envelope xmlns:soapenv=""><soapenv:Body><get_Password

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 "" l by "Klas@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="" xmlns:xsi=
"" xmlns:xsd="
      <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&amp; abortP
      <detail />

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é

View raw message