I'm currently involved in designing a middle-tier code layer which takes
requests from web .jsp pages, creates an XML SOAP request to exposed
methods, and parses the XML response back to the calling .jsp. The
interface is to a SOAP based system from SPL called Cortaptix (the SOAP
interface is called XAI). I'm new to developing applications using SOAP
technology.
I'm currently struggling with whether or not usage of the Apache SOAP API
is necessary. Attached is as sample request and response XML for our
application:
(See attached file: cmAccountReadResponse_Actual.xml)(See attached file:
cmAccountReadRequest_Actual.xml)
Based on these examples given to me by my contact at SPL, I am unable to
determine if they are "true" SOAP compliant. I have yet to get the examples
to even parse through the Apache rpcrouter SendMessage (i.e. po-processor)
demo.
When I run the cmAccountReadRequest_Actual.xml file above through the
SendMessage example (purely just to see if it can send the message) it
fails with this error:
Exception in thread "main" java.lang.IllegalArgumentException:
SOAP-ENV:VersionM
ismatch: Envelope element must be associated with the
'http://schemas.xmlsoap.or
g/soap/envelope/' namespace.
at org.apache.soap.Envelope.unmarshall(Envelope.java:302)
at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
at samples.messaging.SendMessage.main(SendMessage.java:35)
After making some changes (below) the request is parsed successfully.
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<cmAccountRead xmlns="urn:po-processor">
<cmAccountReadService>
<cmAccountReadHeader AccountID="4243343632">
</cmAccountReadHeader>
</cmAccountReadService>
</cmAccountRead>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Any idea what version, if any, these XML request/response pairings follow?
(Apache SOAP 1.1, or some other implementation? or none?). It appears that
it doesn't like the format <SOAP-ENV:Envelope xmlns:SOAP-ENV
="urn:schemas-xmlsoap-org:envelope"> for the namespace.
Thanks.
Justin
cmAccountReadResponse_Actual.xml
cmAccountReadRequest_Actual.xml