Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

XSD structure issue

$
0
0

Hi ,

 

 

I am facing issue with xsd structure which is not giving desired output while mapping is executed.

 

I am working on Proxy to SOAP scenario in which response is coming from third party system. I am getting some namespaces in payload in response which is getting mapped to target structure. I thought to use Xslt mapping or  to use XMLAnonymizerBean module but it is not working.



I tried to test the payload having namespace in test tab in first attempt it didn't worked , I tried to remove first subnode and modified with ns2 to nso tested and it worked fine. how can I modify my xsd structure according to requirement.


Please find the below payloads..

 

 

 

Actual Payload Response:

 

<ns:createOrderResponse xmlns:ns="http://services.oms.ecom.ecc.com"><ns:return type="com.ecc.ecom.oms.beans.xsd.CreateOrderResponse">

<ns:omsGeneratedOrderId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />

<ns:responseCode>99</ns:responseCode>

<ns:responseDesc>INVALIDORDER</ns:responseDesc>

<ns:sellerSiteId>10196</ns:sellerSiteId>

<ns:serverProcElapsedTime>45</ns:serverProcElapsedTime>

<ns:siteGeneratedOrderId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />

<ns:subResponse>

<responseCodexmlns="http://beans.oms.ecom.ecc.com/xsd">1144</responseCode>

<responseDescription xmlns="http://beans.oms.ecom.ecc.com/xsd">Orderhttp://beans.oms.ecom.ecc.com/xsd%22%3EOrder Totalmismatch</responseDescription>

</ns:subResponse>

<ns:subResponse>

<responseCode xmlns="http://beans.oms.ecom.ecc.com/xsd">1147</responseCode>

<responseDescription xmlns="http://beans.oms.ecom.ecc.com/xsd">Order Grand Total and sum of OrderItem Grand Total mismatch</responseDescription>

</ns:subResponse>

<ns:transactionNumber>1069297098</ns:transactionNumber>

</ns:return></ns:createOrderResponse>

 

 

Output from Above payload:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:MT_Ordercreation_Resp xmlns:ns1="urn://abh.com:OTC:OrderCreationToOMS"><response><omsGeneratedOrderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></omsGeneratedOrderId>

<responseCode>99</responseCode>

<responseDesc>INVALID ORDER</responseDesc>

<siteGeneratedOrderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></siteGeneratedOrderId>

<subResponse></subResponse>

<subResponse></subResponse>

</response>

</ns1:MT_Ordercreation_Resp>

 

 

_________________________________________________________________________________________________

 

After Removing first Subresponse and puting ns0 in place ns2.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:createOrderResponse xmlns:ns0="http://services.oms.ecom.ecchttp://services.oms.ecom.eccc.com/c.com">

   <ns0:return type="com.ecc.ecom.oms.beans.xsd.CreateOrderResponse">

      <ns0:omsGeneratedOrderId ns1:nil="true" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance"/>

      <ns0:responseCode>99</ns0:responseCode>

      <ns0:responseDesc>INVALID ORDER</ns0:responseDesc>

      <ns0:sellerSiteId>10196</ns0:sellerSiteId>

      <ns0:serverProcElapsedTime>45</ns0:serverProcElapsedTime>

      <ns0:siteGeneratedOrderId ns1:nil="true" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance"/>

      <ns0:subResponse>

         <ns2-ns0:responseCode xmlns:ns2="http://beans.oms.ecom.ecc.com/xsd">1147</ns2-ns0:responseCode>

         <ns2-ns0:responseDescription xmlns:ns2="http://beans.oms.ecom.echttp://beans.oms.ecom.ecc.com/xsd">Orderc.com/xsd">Order Grand Total and sum of OrderItem Grand Total mismatch</ns2-ns0:responseDescription>

      </ns0:subResponse>

      <ns0:transactionNumber>1069297098</ns0:transactionNumber>

   </ns0:return>

</ns0:createOrderResponse>

 

Output---

<?xml version="1.0" encoding="UTF-8"?>

<ns1:MT_Ordercreation_Resp xmlns:ns1="urn://abh.com:OTC:OrderCreationToOMS">

<response>

<omsGeneratedOrderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></omsGeneratedOrderId>

<responseCode>99</responseCode>

<responseDesc>INVALID ORDER</responseDesc>

<siteGeneratedOrderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></siteGeneratedOrderId>

<subResponse>

<responseCode>1147</responseCode>

<responseDesc>Order

 

Grand Total and sum of OrderItem Grand Total mismatch</responseDesc>

</subResponse>

</response>

</ns1:MT_Ordercreation_Resp>


Viewing all articles
Browse latest Browse all 7030

Trending Articles



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