on 09-21-2013 9:03 AM
We have scenario that is proxy to soap with synchronize. I am unable to convert the response structure into the required response structure. Could you please anyone provide me the xslt structure for the below.
Input (Webservice Response) Structure.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
- <SOAP-ENV:Body>
<F059Response xmlns="http://www.Lichtsinfotech.com/Schema/Personal/RetailParty/ACIP">
<F059Result>
<ResultCondition xmlns="http://www.Lichtsinfotech.com/Schema/Infrastructure/SOAP">
<SeverityCode>0</SeverityCode>
</ResultCondition>
</F059Result>
<AdditionalDataIn>0</AdditionalDataIn>
<AddressStaticData>
<AddressTownNm>INDIA</AddressTownNm>
<OutPostCd>SM9</OutPostCd>
<InPostCd>0NB</InPostCd>
</AddressStaticData>
<AddressMatches>
<OrganisationNm>Lichts Infotech</OrganisationNm>
<BuildingNo>45</BuildingNo>
<AddressLinePaf>
<AddressLineTx>XXXX</AddressLineTx>
</AddressLinePaf>
<DelivPointSuffixCd>1X</DelivPointSuffixCd>
</AddressMatches>
</F059Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Output (Required) Structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:R099Response xmlns:ns0="http://www.lichtsinfoteh.com/Schema/Infrastructure/SOAP">
<ns0:R099Result>
<ns0:ResultCondition>
<ns0:ExtraConditions>
<ns0:Condition>
<ns0:SeverityCode/>
<ns0:ReasonCode/>
<ns0:ReasonText/>
<ns0:ReasonDetail/>
</ns0:Condition>
</ns0:ExtraConditions>
<ns0:SeverityCode/>
<ns0:ReasonCode/>
<ns0:ReasonText/>
<ns0:ReasonDetail/>
</ns0:ResultCondition>
</ns0:R099Result>
<ns0:AdditionalDataIn/>
<ns0:AddressStaticData>
<ns0:AddressDistrictNm/>
<ns0:AddressTownNm/>
<ns0:AddressCountyNm/>
<ns0:OutPostCd/>
<ns0:InPostCd/>
</ns0:AddressStaticData>
<ns0:AddressMatches>
<ns0:OrganisationNm/>
<ns0:SubBuildingNm/>
<ns0:BuildingNm/>
<ns0:BuildingNo/>
<ns0:AddressLinePaf>
<ns0:AddressLineTx/>
</ns0:AddressLinePaf>
<ns0:DelivPointSuffixCd/>
</ns0:AddressMatches>
</ns0:R099Response>
Kindly provide me the XSLT mapping for the above structures.
Regards,
Venkat.
Hi Venkat,
With this XSL you will remove all SOAP tags:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="soapenv:*">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
</xsl:stylesheet>
Later, you can use the message mapping to make the payload changes in order to get your desired output.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks Iñaki Vila for the update.
After updating XSLT Code there is an error Message while doing the test from OM
RuntimeException when executing application mapping program
com/sap/xi/tf/_G111_MM_F011Response_;Details:
com.sap.aii.utilxi.misc.api.BaseRuntimeException;Content is not allowed in prolog.
Hi Venkat,
Check Shabarish Vijayakumar's blog about that exception http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/16/the-mystery-of-content-is-not-all...
Regards.
Hi Iñaki Vila,
Soap envelope is successfully removed and again the following error message is appeard when i tried the run the proxy.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">RESOURCE_NOT_FOUND</SAP:Code>
<SAP:P1>6db32830-64a7-11e2-8084-cf970af5d3d8</SAP:P1>
<SAP:P2>http://Lichtsinfotech.com/HRT/G111/YourPayToOCIS</SAP:P2>
<SAP:P3>diya1.xsl</SAP:P3>
<SAP:P4>-1</SAP:P4>
<SAP:AdditionalText />
<SAP:Stack>Unable to find resource 6db32830-64a7-11e2-8084-cf970af5d3d8 in the following software component versions: http://Lichtsinfotech.com/vRT/G111/YourPayToOCISdiya1.xsl-1</SAP:Stack>
<SAP:Retry>N</SAP:Retry>
</SAP:Error>
Hi Venkah,
A few cents to Ambrish suggestion, try to refresh the CPA cache as well, check this http://scn.sap.com/message/13242958#13242958
Regards.
Hi,
i am facing one more issue while triggering the proxy in ECC there is an error message and if i click to continue the response is success but unable to update the response from corresponding tables
The error message:
PARSE_APPLICATION_DATA Error during XML=>ABAP
conversion: Response Message;
CX_ST_MATCH_ELEMENT in
Contine Log Cancel
Please advice how to proceed further and let me know where its failed?
Hi,
i am facing one more issue while triggering the proxy in ECC there is an error message and if i click to continue the response is success but unable to update the response from corresponding tables
The error message:
PARSE_APPLICATION_DATA Error during XML=>ABAP
conversion: Response Message;
CX_ST_MATCH_ELEMENT in
Contine Log Cancel
Please advice how to proceed further and let me know where its failed?
Hi Venkat,
I think you could have the same problem that i had yesterday . First, you check that message is correct in the PI response. Take the message and validate it against the output schema with a program like XMLSPY.
Check in the R/3 sxi_monitor (you should enable it if there isn't any message) if the payload appears in the monitoring, If your R/3 SP is lower than 23 and SAP BASIS 7.0 you need to apply the note pointed in this thread http://scn.sap.com/thread/1956488
Regards.
Hello Venkat,
It just means that the data in one or more of your fields does not match the proxy data type examples would be:
1. backend data type is INT but the data in your field contains letters
2. backend data type length is 3, but you are passing 4 characters
3. Mandatory field in proxy is missing in your output mapping
and so on...
Regards,
Mark
Hi Inaki,
We need to add response namespace in XSLT, Can you please add my namespace the corresponding XSLT Code
The original xslt code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="soapenv:*">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
</xsl:stylesheet>
Need to add namespace the above code:
http://lichtsinfotech.com/HRT/G111/YourPaynxst
Please help on this.
Its Very urgent..can anyone help on this.
We need to add response namespace in XSLT, Can you please add my namespace the corresponding XSLT Code
The original xslt code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="soapenv:*">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
</xsl:stylesheet>
Need to add namespace the above code:
http://lichtsinfotech.com/HRT/G111/YourPaynxst
Please help on this.
Request Test Data
<?xml version="1.0" encoding="UTF-8"?>
<ns0:G150_MT_F059Request xmlns:ns0="http://lichtsinfotech.com/HRT/G111/YourPayToOCIS">*********(Correct namespace - All components under this namespace only)
<Body>
<F01Request>
<MaxRepeatGroupQy>0</MaxRepeatGroupQy>
<ExtSysId>0</ExtSysId>
<NoOfLinesReqdCn>7</NoOfLinesReqdCn>
<MixedCaseAddressReqdIn>N</MixedCaseAddressReqdIn>
<HouseNoNmTxOutPostCd>25</HouseNoNmTxOutPostCd>
<OutPostCd>SE1</OutPostCd>
<InPostCd>0NA</InPostCd>
</F01Request>
</Body>
</ns0:G150_MT_F01Request>
Response Test Data
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
- <SOAP-ENV:Body>
<F02Response xmlns="http://www.Lichtsinfotech.com/Schema/Personal/RetailParty/OCIS"> *************(This Namespace is wrong)
<F02Result>
<ResultCondition xmlns="http://www.Lichtsinfotech.com/Schema/Infrastructure/SOAP">
<SeverityCode>0</SeverityCode>
</ResultCondition>
</F02Result>
<AdditionalDataIn>0</AdditionalDataIn>
<AddressStaticData>
<AddressTownNm>LONDON</AddressTownNm>
<OutPostCd>SE1</OutPostCd>
<InPostCd>0NA</InPostCd>
</AddressStaticData>
<AddressMatches>
<OrganisationNm>LLOYDS TSB BANK PLC</OrganisationNm>
<BuildingNo>25</BuildingNo>
<AddressLinePaf>
<AddressLineTx>LAVINGTON STREET</AddressLineTx>
</AddressLinePaf>
<DelivPointSuffixCd>1B</DelivPointSuffixCd>
</AddressMatches>
</F02Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XSLT code for removing envelope
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="soapenv:*">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
</xsl:stylesheet>
Hi Venkat,
May be I missunderstood, but with this:
XML source:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
<SOAP-ENV:Body>
<F059Response xmlns="http://www.Lichtsinfotech.com/Schema/Personal/RetailParty/ACIP">
<F059Result>
<ResultCondition xmlns="http://www.Lichtsinfotech.com/Schema/Infrastructure/SOAP">
<SeverityCode>0</SeverityCode>
</ResultCondition>
</F059Result>
<AdditionalDataIn>0</AdditionalDataIn>
<AddressStaticData>
<AddressTownNm>INDIA</AddressTownNm>
<OutPostCd>SM9</OutPostCd>
<InPostCd>0NB</InPostCd>
</AddressStaticData>
<AddressMatches>
<OrganisationNm>Lichts Infotech</OrganisationNm>
<BuildingNo>45</BuildingNo>
<AddressLinePaf>
<AddressLineTx>XXXX</AddressLineTx>
</AddressLinePaf>
<DelivPointSuffixCd>1X</DelivPointSuffixCd>
</AddressMatches>
</F059Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="soapenv:*">
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}" namespace="http://lichtsinfotech.com/HRT/G111/YourPaynxst">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
XML output:
<?xml version="1.0" encoding="UTF-8"?>
<F059Response xmlns="http://lichtsinfotech.com/HRT/G111/YourPaynxst">
<F059Result>
<ResultCondition>
<SeverityCode>0</SeverityCode>
</ResultCondition>
</F059Result>
<AdditionalDataIn>0</AdditionalDataIn>
<AddressStaticData>
<AddressTownNm>INDIA</AddressTownNm>
<OutPostCd>SM9</OutPostCd>
<InPostCd>0NB</InPostCd>
</AddressStaticData>
<AddressMatches>
<OrganisationNm>Lichts Infotech</OrganisationNm>
<BuildingNo>45</BuildingNo>
<AddressLinePaf>
<AddressLineTx>XXXX</AddressLineTx>
</AddressLinePaf>
<DelivPointSuffixCd>1X</DelivPointSuffixCd>
</AddressMatches>
</F059Response>
Correct me, if something is wrong
Regards.
Hi Inki,
Need your inputs , I have same kind of requirement , could u please share your email id so that we can discuss this in more details.
Appreciate your help and support for same.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Why don't you map the WS repsonse structure to the target response structure. The required structure would anyways be defined in the proxy. Simply map the WS response to the target response structure required by the proxy.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many Thanks Ambries for the update.
its already done but while response from WS there is only 2 xml tag appeared and its not retrieving any field values which is requested by us.
The Response of the xml tags:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:G111:G111_MT_F011Response
xmlns:ns1="http://lichtsinfotech.com/VRT/G111/XXXX"></ns1:G111_MT_F011Response>
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.