We are trying to create a proxy for a soap service using the WSDL url.
The auto-generated xslt is not formatting the input json payload to the expected soap payload. (we also have json to xml policy attached which is working fine).
Below are the 2 issues which we are facing :
1. The attribute values (name, service, party) for the element "channels" are getting concatenated after xslt policy(getChannelAutomationStatus-add-namespace) gets executed.
2. the element "getChannelAutomationStatus" in the soap payload is expected to have namespace urn as <urn:getChannelAutomationStatus> but the soap payload created by xslt transform is <p0:getChannelAutomationStatus>
Below is the expected output:
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <yq1:getChannelAutomationStatus xmlns:yq1="urn:com:sap:netweaver:pi:monitoring"> <channels name="FTP_VENDOR" service="TEST" party=""/> </yq1:getChannelAutomationStatus> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Below is the input xml:
<XSL name="getChannelAutomationStatus-add-namespace"> <Source>request</Source> <ResourceURL>xsl://getChannelAutomationStatus-add-namespace.xslt</ResourceURL> <Parameters ignoreUnresolvedVariables="true"/> </XSL>
What is the actual output:
<p0:getChannelAutomationStatus> <po:channels>FTP_VENDOR_TEST</po:channels> </p0:getChannelAutomationStatus>
Solved! Go to Solution.
Hmmm, it sounds as though the auto-generated XSLT is broken! I'm sorry to hear that. We try to make sure the generated XSLT is correct in all cases, but in some cases it is not.
Can you please edit your question, and provide attachments?
Either:
OR
BTW, let me comment on this statement:
the element "getChannelAutomationStatus" in the soap payload is expected to have namespace urn as <urn:getChannelAutomationStatus> but the soap payload created by xslt transform is <p0:getChannelAutomationStatus>
It is not necessary that the prefix be the same.
The strings "urn" or "p0" in the example given are known as XML namespace prefixes. The key for XML equivalence is that the XML namespace must be the same. It is not necessary that the prefix be the same, or even that a prefix be used on an element.
For illustration, the following three documents are equivalent:
1. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> </soap:Header> <soap:Body> <OperationName xmlns='urn:foo-bar-bam'> <ElementX/> </OperationName> </soap:Body> </soap:Envelope> 2. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> </s:Header> <s:Body> <p0:OperationName xmlns:p0='urn:foo-bar-bam'> <p0:ElementX/> </p0:OperationName> </s:Body> </s:Envelope> 3. <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:p0='urn:foo-bar-bam'> <Header> </Header> <Body> <p0:OperationName> <p0:ElementX/> </p0:OperationName> </Body> </Envelope>