Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3441

Webservice proxy - Response Transformation issue

$
0
0

Hi Experts,

 

I'm facing issue when calling webservice proxy in ABAP (ECC). Response from webservice looks as follows:

<?xml version="1.0" encoding="UTF-8"?>  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"  
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"  
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"  
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"  
xmlns:abc="abc.xsd">     <SOAP-ENV:Header/>     <SOAP-ENV:Body>        <abc:operationResponse>           <id>123456</id>        </abc:operationesponse>     </SOAP-ENV:Body>  </SOAP-ENV:Envelope>  

I'm getting exception during webservice call with message GENERAL ERROR UNKNOWN PART. I was trying to change Response Transformation (Simple Transformation) to help proxy engine to parse incoming message. The main problem is that SAP is calling transformation with message payload only as XML source for transformation it means that input for transformation is:

<abc:operationResponse>         <id>123456</id>     </abc:operationesponse>  

I made custom Z* simple transformation to test how reponse transformation should looks like but i'm stuck. 

<?sap.transform simple?>  <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"  
xmlns:ddic="http://www.sap.com/abapxml/types/dictionary"  
xmlns:def="http://www.sap.com/abapxml/types/defined"  
xmlns:abc="abc.xsd">    <tt:root name="OPERATION" type="ddic:Z_OPERATION_RESPONSE"/>    <tt:template>      <abc:operationResponse>        <id>          <tt:value ref=".OPERATION.ID"/>        </id>      </abc:operationResponse>    </tt:template>  </tt:transform>  

Above transformation works only with following XML as input.

<abc:operationResponse xmlns:abc="abc.xsd">         <id>123456</id>     </abc:operationesponse>  

So, the problem is that in reponse that I receive abc namespace prefix is defined at Envelope tag level and is not considered by SAP during response transformation (Envelope is not part of payload). Without prefix declaration inside response payload i'm getting match element exception. Transformation without prefix declaration at level operationResponse or higher (tt:transform) etc. couldn't be activated - editor shows "undeclared namespace prefix" error. Empty namespace for that prefix also doesn't work.

 

Any idea how to force ws proxy to parse such response correctly? Or maybe other ideas, is there any way to access received response before proxy raise an exception and then try to parse it manualy or using XSLT instead of simple transformation? Maybe there is workaround possisble using WSDL?

 

Best Regards,

Maciej


Viewing all articles
Browse latest Browse all 3441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>