Hi Stephen ,
Actually, I have used gateway script because my request XML contains another XML string as an input I want to map this XML string as an input to backend WSDL. Kindly suggest if there is better way to do this .
Shared below is the input XML where <
RequestDetailsAny> contains input XML as string:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:gen="http://www.etisalat.ae/Middleware/GenericInquiryInterface/GenericInquiryRequest.xsd" xmlns:com="http://www.etisalat.ae/Middleware/SharedResources/Common/Common.xsd">
<soapenv:Header/>
<soapenv:Body>
<gen:GenericInquiryRequest>
<gen:RequestedSystem>mCashier</gen:RequestedSystem>
<gen:Action>GET_ORDER_PAY_DETAILS</gen:Action>
<gen:ModeType>?</gen:ModeType>
<gen:RequestDetails>?</gen:RequestDetails>
<gen:RequestDetailsAny> <ns1:GetOrderPaymentDetailsRequest xmlns:ns1="http://www.tibco.com/schemas/CustomerInquiry/Processes/GetOrderPaymentDetailsRequest.xsd">
<ns2:ApplicationHeader xmlns:ns2="http://www.etisalat.ae/Middleware/SharedResources/Common/ApplicationHeader.xsd">
<ns2:TransactionID>1124</ns2:TransactionID>
<ns2:RequestedSystem>mCashier</ns2:RequestedSystem>
<ns2:RetryLimit>1</ns2:RetryLimit>
</ns2:ApplicationHeader>
<ns1:DataHeader>
<ns1:RequestID>186544078</ns1:RequestID>
</ns1:DataHeader>
</ns1:GetOrderPaymentDetailsRequest>
</gen:RequestDetailsAny> <com:AdditionalInfo>
<com:Name>?</com:Name>
<com:Value>?</com:Value>
</com:AdditionalInfo>
</gen:GenericInquiryRequest>
</soapenv:Body>
</soapenv:Envelope>
Now, I am at stuck mapping the response , where I have a similar XML as string in the response XML and I have to map it to the response XML.
Response back to client : [ Map to map the XML resposne from backend in
ResponseDetailsAny ] <xs:schema xmlns="http://www.etisalat.ae/Middleware/GenericInquiryInterface/GenericInquiryResponse.xsd" xmlns:ns1="http://www.etisalat.ae/Middleware/SharedResources/Common/Common.xsd" xmlns:ns0="http://www.etisalat.ae/Middleware/SharedResources/Common/AckMessage.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.etisalat.ae/Middleware/GenericInquiryInterface/GenericInquiryResponse.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.etisalat.ae/Middleware/SharedResources/Common/AckMessage.xsd"/>
<xs:import namespace="http://www.etisalat.ae/Middleware/SharedResources/Common/Common.xsd"/>
<xs:element name="GenericInquiryResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Action" type="xs:string"/>
<xs:element name="ResponseDetails" type="xs:string" minOccurs="0"/>
<xs:element name="ResponseDetailsAny" minOccurs="0"> <xs:complexType>
<xs:sequence>
<xs:any processContents="lax" namespace="##any"/>
</xs:sequence>
</xs:complexType>
</xs:element> <xs:element ref="ns1:AdditionalInfo" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
------------------------------
SAMPATH K
------------------------------
Original Message:
Sent: Sun July 07, 2019 07:36 PM
From: Stephen Linn
Subject: Mapping an output from Gateway script to Map Policy
Hi Susant,
Another point I should have noted in my last post. The map policy will take XML as input, and this above gatewayscript policy's intent is to simply translate an XML structure into a JSON structure, which is redundant since the map policy would handle this. You can remove the gatewayscript policy entirely, specify your map input is of type application/xml, specify an input schema as inline using a source example from your backend, and simply map the action and requestId input properties to the appropriate output schema.
Regards,
Steve
------------------------------
Stephen Linn
------------------------------