Hi
I wonder what the status of SOAP 1.2 and WS-Addressing support is in
SOAP::Lite for implementing servers?
Are there any known issues or missing parts in the implementation?
I'm trying to write a soap 1.2 server, daemon style, that will consume
WS-BaseNotification
Notification requests but I have encountered a couple of issues:
- Content-Type: application/soap+xml does not seem to be accepted by
SOAP::Lite daemon
- WS-Addressing 'Action' and 'To' header elements are not recognized.
A Notification request looks something like this:
POST /test_event_consumer HTTP/1.1
Host: X.X.X.X:XXX
User-Agent: gSOAP/2.7
Content-Type: application/soap+xml; charset=utf-8
Content-Length: XXX
Connection: close
SOAPAction:
"http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
<SOAP-ENV:Header>
<wsa5:To
SOAP-ENV:mustUnderstand="true">http://X.X.X.X:XXX/test_event_consumer</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="true">
http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify
</wsa5:Action>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<wsnt:NotificationMessage>
<wsnt:Message>Notificaton message contents</wsnt:Message>
</wsnt:NotificationMessage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The SOAP::Lite server will reply with a
'Content-Type must be 'text/xml,' 'multipart/*,' or 'application/dime'
instead of 'application/soap+xml''
fault message.
If I hack around this error message by modifiying HTTP.pm to accept
application/soap+xml, I'll get a
fault reply complaining about not recognized WS-Addressing element 'To'.
Here is the code for the daemon to consume Notification requests:
#!/usr/bin/perl -w
use SOAP::Lite;
use SOAP::Transport::HTTP;
use SOAP::Lite::Deserializer::XMLSchemaSOAP1_2;
use Foo;
SOAP::Lite->soapversion(1.2);
my $daemon = SOAP::Transport::HTTP::Daemon
-> new (LocalPort => 5432)
-> dispatch_to('Foo');
print "Contact to SOAP server at ", $daemon->url, "\n";
print $daemon->handle();
Best regards,
Elmir Jagudin
|