[Xml-compile] possible problem with soapAction header?

Robin V. robinsp at gmail.com
Sat Jan 22 19:50:00 GMT 2011


Hi,

I took a previously working program made with xml::compile::soap, but
it doesn't work anymore.

Before this, I updated to last version of xml::compile, it may be the
reason of the problem (or maybe the service I call has changed since
the last time).

The server returns an http 500 error because of the SOAPAction header missing.

After the wsdl->compileClient is called, everything seems correct with
the operation. Calling:

	print $self->wsdl()->operation(operation => 'getDirections',  port
=>WSPORT)->soapAction(), "\n";
	print $self->wsdl()->operation(operation => 'getDirections',  port
=>WSPORT)->action(), "\n";

Prints as expected:
trace: schema compile WRITER for {http://wsiv.ratp.fr}getDirections
trace: schema compile WRITER for
{http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile WRITER for
{http://schemas.xmlsoap.org/soap/envelope/}Envelope
trace: schema compile READER for {http://xxx.xxx}getDirectionsResponse
trace: schema compile READER for
{http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile READER for
{http://schemas.xmlsoap.org/soap/envelope/}Envelope
urn:getDirections
urn:getDirections


But there's no trace of the header in the http call:

POST http://xxx.xxx/xxx/xxx/xxxx HTTP/1.1
TE: deflate,gzip;q=0.3
Keep-Alive: 300
Connection: Keep-Alive, TE
Host: www.ratp.fr:80
User-Agent: libwww-perl/5.834
Content-Length: 370
Content-Type: text/xml; charset="utf-8"
X-LWP-Version: 5.834
X-XML-Compile-Cache-Version: 0.98
X-XML-Compile-SOAP-Version: 2.21
X-XML-Compile-Version: 1.21
X-XML-LibXML-Version: 1.70

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body><ns1:getDirections xmlns:ns0="http://xxx.xxx/xsd"
xmlns:ns1="http://xxx.xxxr"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns1:line><ns0:id>RB</ns0:id></ns1:line></ns1:getDirections>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


And without this SOAPAction header, axis2 stack isn't happy:

HTTP/1.1 500 Internal Server Error
Date: Sat, 22 Jan 2011 19:38:18 GMT
Server: Apache
Vary: User-Agent
Content-Length: 150
Connection: close
Content-Type: application/xml;charset=utf-8

<faultstring>The endpoint reference (EPR) for the Operation not found
is http://www.ratp.fr/wsiv/services/Wsiv and the WSA Action =
null</faultstring>


Is this expected behavior ? I tried to force custom http header, but I
didn't manage to do it cleanly.

Regards,
Robin



More information about the Xml-compile mailing list