on 12-09-2010 1:24 PM
Hi Guys,
I have to develop a Proxy to SOAP interface and the target WSDL should have 4 messages, namely, HEADER, REQUEST, RESPONSE and FAULT. But while we define the Message Interface, we have only 3 slots for REQUEST, RESPONSE and FAULT.
Is there any way we can account for the SOAP Header ?? ( ASMA or DC or Variable Substitution or any other means )
Kindly help me in this regard
Thanks and Regards,
Krishna Sharma H
Hi,
Use can use option "Do Not Use Soap Envelop" in the SOAP channel and construct the require SOAP XML payload in the mapping.
1. Do the normal mapping to populate the request, response and fault.
2. Use a XSLT/JAVA mapping to take the above generate output XML with SOAP Envelop with header and body.
~SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for your valuable and quick replies.
Will check out.
Additionally, in case of a synchronous scenario, when the webservice is sending back the response, the header would be populated by the WS.Will the header message will be removed as we checked ''do not use soap envelope''? or do we need to remove it using another XSLT mapping ?
Thanks and Regards,
Krishna Sharma H
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's right, Krishna.
You'll also need a XSLT/Java mapping to retrieve the actual payload XML out of the SOAP Envelope, for the response message.
It'd be really simple though. If you use XSLT, it'd just be about extracting all inner tags from within <SOAP:Body> tag (and by all, I mean the root XML tag, there should be just one).
And, in the mapping program list of the interface mapping, for the response message, this SOAP Envelope mapping would need to be the first one (for the request message, it should be the last).
Best regards,
Henrique.
HI,
U can use XSLT mapping for including the Header with required fields in the target message generated. For this you need to write the proper .xsl file which converts ur source message into target with with required mapping.
ex:
source msg-
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ccmnet_Request_MT xmlns:ns0="urn:ca.com:ccmnet:ticket:create">
<tic_no>123</tic_no>
<pers_no>123456</pers_no>
<emp_name>raman</emp_name>
<emp_loc>mumbai</emp_loc>
xslt-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="cubicle" select="'Web Ticket'" />
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pbp="PBPOWebSerice" xmlns:ns0="urn:ca.com:ccmnet:ticket:create" xmlns:ns1="PBPOWebSerice">
<SOAP:Header>
<pbp:AuthHeader>
<pbp:UserName>ccm</pbp:UserName>
<pbp:Password>1234</pbp:Password>
</pbp:AuthHeader>
</SOAP:Header>
<SOAP:Body>
<ns1:InsertTicket>
<ns1:ReqUserName>
<xsl:value-of select="//emp_name"/>
</ns1:ReqUserName>
<ns1:ReqTelephoneNo>
<xsl:value-of select="//emp_phone"/>
</ns1:ReqTelephoneNo>
<ns1:ReqEmailID>
<xsl:value-of select="//emp_mail"/>
</ns1:ReqEmailID>..........
target msg -
<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="PBPOWebSerice" xmlns:ns0="urn:ca.com:ccmnet:ticket:create" xmlns:pbp="PBPOWebSerice">
<SOAP:Header>
<pbp:AuthHeader>
<pbp:UserName>ccm</pbp:UserName>
<pbp:Password>1234</pbp:Password>
</pbp:AuthHeader>
</SOAP:Header>
<SOAP:Body>
<ns1:InsertTicket>
<ns1:UserId>123</ns1:UserId>
<ns1:CubicleNo>Web</ns1:CubicleNo>
<ns1:ReqUserName>raman</ns1:ReqUserName>
<ns1:ReqTelephoneNo/>
</ns1:InsertTicket>
</SOAP:Body>
</SOAP:Envelope>
...
Here i have hard coded the header fields.... but u can map them frm src msg as well....
Regards,
Nandan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.