I have ESB process which I want to expose web service.
I used 2 ways to expose it as web service 1) through Wizard and 2)Through manual creation of esbws files for Unwrap and Response
but in both the process Unwrap step is not unwrapping SOAP message.
SOAP input message coming to WebService is entirely consumed and processed.
Can anybody please tell me what will be wrong in this?
Is the SOAPAction HTTP header present in your request? It wil be used by the automatic unwrapping to determine if it should unwrap things.
Thomas
The 'automatic' SOAP Unwrap step needs to have information like SOAPAction to work correctly. If you can't use the automatic SOAP Unwrap, you can create an ESBWS file with UNWRAP action. This is targetted for a particular request/action, so it does not require the SOAPAction.
I have exposed that process as web service succesfully and when I try to call that web service from SOAP_UI it works fine.
But when I try to call same web service through sonic using "web service invocation"it creates an issue.
I am sending input xml as follows
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <
soapenv:Header/> <
soapenv:Body> <
Test> <
Values>50Values>
Test>
soapenv:Body>
soapenv:Envelope>
But I am getting output as follws in sonic
<
ns1:TransformWebServiceResponse xmlns:ns1="urn:TransfromWebService/TransformWebService"> <
TransfromOutput xmlns=""> <
Transform xmlns=""> <
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <
soapenv:Header/> <
soapenv:Body> <
Test xmlns=""> <
Values xmlns="">50Values>
Test>
soapenv:Body>
soapenv:Envelope>
Transform>
TransfromOutput>
ns1:TransformWebServiceResponse>
In this above output entire SOAP message is child of Transform element.
But from SOAP_UI i am getting proper output as follows.
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
uuid:1d1f21c0-ee53-11df-8c27-97dd52bd491b
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
60
.
Can anybody tell me why this error is coming while calling from Sonic not with SOAP_UI?
I would recommend using Process Tracking and look at the message entering the procedss and the one leaving the unwrap step.
There are two possibilities.
1. If the message before and after the unwrap step are the same, the itis probably not unwrapped, so you are returning the entire message.
What looks like is happening is this:
-- SOAPAction is not set.
-- Generic SOAP Unwrap is therefore passing the entire message.
You should not use the Generic Unwrap and use an .esbws step.
2. If the message at the process entry has two SOAP envelopes in it, this would cause the problem.
Check that your web service invocation is NOT sending a SOAP message as the content of parameter TransformWebServiceRequest. You might have copied the SOAP UI soap message as the example XML that you are passing to the invoking process.
I have tracked web service and getting below message at the entry endpoint
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa=
"http://schemas.xmlsoap.org/ws/2004/08/addressing"> <
soapenv:Header> <
wsa:MessageID soapenv:mustUnderstand="0">uuid:d8e504d0-ee56-11df-91b4-e75ec4629614wsa:MessageID> <
wsa:To soapenv:mustUnderstand="0">http://dtpxp-ypalkar:2580/resources/TransformWebServicewsa:To> <
wsa:Action soapenv:mustUnderstand="0">urn:TransfromWebService/TransformWebService:TransformWebServicePortType:TransformWebServiceRequestwsa:Action> <
From soapenv:mustUnderstand="0"
xmlns=
"http://schemas.xmlsoap.org/ws/2004/08/addressing"> <
Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousAddress>
From> <
ReplyTo soapenv:mustUnderstand="0"
xmlns=
"http://schemas.xmlsoap.org/ws/2004/08/addressing"> <
Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousAddress>
ReplyTo> <
FaultTo soapenv:mustUnderstand="0"
xmlns=
"http://schemas.xmlsoap.org/ws/2004/08/addressing"> <
Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousAddress>
FaultTo>
soapenv:Header> <
soapenv:Body> <
soapenv:Envelope> <
soapenv:Header/> <
soapenv:Body> <
Test> <
Values>50Values>
Test>
soapenv:Body>
soapenv:Envelope>
soapenv:Body>
soapenv:Envelope>
and at the exit of unwrap service getting this particular message
http://schemas.xmlsoap.org/soap/envelope/">
50
When i try to send only below message
50
then it is giving an output xml as follows
50
So this is case #2 -- Your ESB process that is sending to the WebServcie is sending a SOAP Envelope as the SOAP Body. You have
The unwrap is unwrapping only one layer.
Check what you are sending.
I cretaed separate UNWRAP by esbws instead of simple plane Unwrap.
Now it is unwrapping properly and working fine.
Thanks for your reply