on 08-03-2011 12:17 PM
Hi ,
i am creating RFC to SOAP scenario .
Desired wsdl Request
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<isLoginIdExistin0 xmlns="http://netpricing">xyz</isLoginIdExistin0>
<isLoginIdExistin1 xmlns="http://netpricing">1</isLoginIdExistin1>
</soap:Body>
</soap:Envelope>
Actual wsdl Request ( Payload )
<?xml version="1.0" encoding="UTF-8"?>
<ns1:isLoginIdExistRequest xmlns:ns1="http://netpricing"> <----
do not want this tag
<isLoginIdExistin0>xyz</isLoginIdExistin0>
<isLoginIdExistin1>1</isLoginIdExistin1>
</ns1:isLoginIdExistRequest>
what have to do so that i can get request in the format mentioned above.
Swapnil,
First, I am thinking how you are getting this root node, is it in WSDL?
You can also edit WSDL for the same and import again if it is acceptable to the web service appilcation.
About XSLT mapping:
You can remove root tag in XSLT mapping, use one XSLT mapping between RFC request strucutre and SOAP Req structure.
And map it according to your requirements.
Like:
<isLoginIdExistin0><xsl:value-of select="<your RFC field>"/></isLoginIdExistin0>
And dont add your root tag in XSLT mapping, so root tag will not be generated.
---Divyesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divyesh,
Can you please tell me the xslt mapping for following code.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:isLoginIdExistRequest xmlns:ns1="http://netpricing"> <----
do not want this tag
<isLoginIdExistin0>xyz</isLoginIdExistin0>
<isLoginIdExistin1>1</isLoginIdExistin1>
</ns1:isLoginIdExistRequest>
i think this will solve my problem.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="ns1:isLoginIdExistRequest">
<xsl:apply-templates select="isLoginIdExistin0"/>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Hi your input to the XSLT should be
INPUT
<?xml version="1.0" encoding="UTF-8"?>
<ns1:isLoginIdExistRequest xmlns:ns1="http://netpricing"> <----
do not want this tag
<isLoginIdExistin0>xyz</isLoginIdExistin0>
<isLoginIdExistin1>1</isLoginIdExistin1>
</ns1:isLoginIdExistRequest>
OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<isLoginIdExistin0 xmlns="http://netpricing">xyz</isLoginIdExistin0>
<isLoginIdExistin1 xmlns="http://netpricing">1</isLoginIdExistin1>
</soap:Body>
</soap:Envelope>
Hi Debashish,
Our scenario is RFC to SOAP ( Synchronous ).
where we have to add this XSLT mapping.
for eq.
RFC Interface SOAP Interface(WSDL)
loginid -
>isloginidexist0
1 -
>isloginidexist1
message <----
true/false
after above operation mapping we will get following requset
i.e.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:isLoginIdExistRequest xmlns:ns1="http://netpricing"> <----
do not want this tag
<isLoginIdExistin0>xyz</isLoginIdExistin0>
<isLoginIdExistin1>1</isLoginIdExistin1>
</ns1:isLoginIdExistRequest>
after this we have to apply our XSLT mapping so how to proceed further .
please replay.
Hi,
you will get this error beacuse in your case output has two root level node
<isLoginIdExistin0>xyz</isLoginIdExistin0>----
rootnode
<isLoginIdExistin1>1</isLoginIdExistin1>----
root node
<ns1:isLoginIdExistRequest xmlns:ns1="http://netpricing"> -
Here only one root node
<isLoginIdExistin0>xyz</isLoginIdExistin0>
<isLoginIdExistin1>1</isLoginIdExistin1>
</ns1:isLoginIdExistRequest>----
Here only one root node
You can check with your Webservice Team whether they are expecting the request in that format.
Option: You can create the SOAP Envelope using XSLT mapping itself and in receiver Communication channel select Do not use SOAP Envelope.
Create below structure from mapping itself.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<isLoginIdExistin0 xmlns="http://netpricing">xyz</isLoginIdExistin0>
<isLoginIdExistin1 xmlns="http://netpricing">1</isLoginIdExistin1>
</soap:Body>
</soap:Envelope>
see this
Hi,
I have used XSLT mapping for my SOAP quest and received the following response.
<?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <GetRFCResponse xmlns="http://www.webserviceX.NET">
- <GetRFCResult>
<EmailAddress>TEST</FromEmailAddress>
<FirstName>Dennis</FirstName>
</GetRFCResult>
</GetRFCResponse>
</soap:Body>
</soap:Envelope>
I need to map this response to RFC response and the desired output should be as below.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Z_TEST_MAIL.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<EMAILADDRESS1>TEST</EMAILADDRESS1>
<FIRTNAME1>Dennis</FIRSTNAME1>
</ns1:Z_TEST_MAIL.Response>
Could you please let me know the XSLT mapping for this?
Thanks
Tony
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.