we have a webservice JournalEntryWS where we are using requestResponseSpec for input and output.
In that we have used the following services
pub.soap.utils:stingToSoapData
pub.soap.utils:getBody
pub.xml:xmlNodeTODocument
then map this doc and done our bussiness logic and then created the response
pub.xml:documentToXMLString
pub.xml:xmlStringToXMLNode
pub.soap.utils:createSOAPdata
pub.soap.utils:addBodyEntry
The input document type which was created in webMethods
JouralEntryRequest doc type name
- m:JournalEntryRequest
-IBANNumber (string)
-AccountNumber(string)
The output document type which was created in webMethods
JouralEntryResponse doc type name
- m:JournalEntryResponse
-AccountStatus(string)
-Flag(string)
The problem we are facing is, when individually run this service this is working fine.
But when I am passing the soaprequest from pub.client:soapHTTP it is throwing the following exception.
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]”>
<SOAP-ENV:Header xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>SOAP-ENV:Body[/URL]
SOAP-ENV:Fault
SOAP-ENV:Server
[ISS.0088.9135] A WMDocument Exception was thrown in the server, usually because an XML block was not well-formed
http://gxstest.com:7300/soap/
webM:exception
webM:classNamejava.lang.NullPointerException</webM:className>
<webM:message xml:lang=“”></webM:message>
</webM:exception>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In all the documentToXMLString and related services i have given the namespace correctly.
This is my input which we are submmiting to soapHTTP
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]”>
<SOAP-ENV:Header xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>SOAP-ENV:Body[/URL]
<m:JournalEntryRequest xmlns:m=“[URL]http://www.gsx.com/gl[/URL]”>
900
iii
</m:JournalEntry></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The response which is generating when I run the service individually gives me
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]”>
<SOAP-ENV:Header xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>
SOAP-ENV:Body
<m:JournalEntryResponse xmlns:m=“[URL]http://www.gsx.com/gl[/URL]”>
1
0
</m:JournalEntryResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
→ we are using the default soap processor.
My Questions
- The Soap response which we are forming is wellformed , what is the causing the above exception.
- when the soap request reaches the webservice is coming as the string type,rather than a object. so we are using stringToSOapdata to change into object.
BR
Hiubert