For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi,
My integration is not providing the result map as expected. I have checked the response in Activity stream which I got the expected result, but it is not mapped in my response. Where can I validate this?
Response:
Response Received Successfully from Target <getApplicationStatusResponse xmlns=""><applicationStatus xmlns="">In Process</applicationStatus></getApplicationStatusResponse>
Thanks,
Mohan
Comment
Can you check and share the response xsd once?
Average Rating:



1 rating
|
Sign in to rate this
Actually my connection is using SOAP, I have used online tool to convert my XML response to Rest response.
Response Sample:
Original Soap Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-294628" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2019-09-17T11:06:53.326Z</wsu:Created>
<wsu:Expires>2019-09-17T11:11:53.326Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<getApplicationStatusResponse>
<applicationStatus>In Process</applicationStatus>
</getApplicationStatusResponse>
</soapenv:Body>
</soapenv:Envelope>
Average Rating:



2 ratings
|
Sign in to rate this
You should tell the complete usecase before you mention *there is an issue here*. The SOAP response doesn't have any namespace associated with the body elements - getApplicationStatusResponse and mapper doesn't work without namespaces. So the configuration you did must be expecting a namespace in the mapper which your invoke response is not giving and the map fails.
Either your modelling is incorrect or the way the service behaves is incorrect! Just wondering which rest service on earth would return a soap envelope! :)
Be the first to rate this
|
Sign in to rate this
Can you please provide complete XSLT mapping? This might be an issue with the namespace.
Average Rating:



1 rating
|
Sign in to rate this
Hi Kanchan,
Find the mapping screenshot.
How to extract the XSLT mapping?
Thanks,
Mohan
Average Rating:



3 ratings
|
Sign in to rate this
Can you please click on the ApplicationStatus and check the namespace which it has? You can export integration and get xslt from that?
Average Rating:



1 rating
|
Sign in to rate this
Exported the integration as iar file. How to extract the XSLT from it? Which tool we have to use for extract?
Average Rating:



1 rating
|
Sign in to rate this
change to extension to .zip, extract and search for .xsl and see to each file for these mappings.
Average Rating:



1 rating
|
Sign in to rate this
XSLT from the export.
<?xml version = '1.0' encoding = 'UTF-8'?>
<xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nssrcmpr="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST/types" xmlns:nstrgmpr="http://xmlns.oracle.com/types/DHAGetStatus_WSDL/OutboundSOAPRequestDocument" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ns1="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:oracle-xsl-mapper="http://www.oracle.com/xsl/mapper/schemas" xmlns:nssrcdfl="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus/types" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns2="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/DHAGetStatus" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="www.dha.gov.ae" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" exclude-result-prefixes=" nssrcmpr oraext xsd xp20 ns1 ora oracle-xsl-mapper nssrcdfl xsi fn ns2 xsl ignore01" xmlns:ignore01="http://www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:nsmpr0="http://xml.oracle.com/types/REST/DHAGetStatus_REQUEST" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<oracle-xsl-mapper:schema xml:id="id_2">
<!--SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY.-->
<oracle-xsl-mapper:mapSources xml:id="id_3">
<oracle-xsl-mapper:source type="WSDL" xml:id="id_4">
<oracle-xsl-mapper:schema location="../../application_1/outbound_2/resourcegroup_3/DHAGetStatus_REQUEST.wsdl" xml:id="id_5"/>
<oracle-xsl-mapper:rootElement name="execute" namespace="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST/types" xml:id="id_6"/>
</oracle-xsl-mapper:source>
</oracle-xsl-mapper:mapSources>
<oracle-xsl-mapper:mapTargets xml:id="id_7">
<oracle-xsl-mapper:target type="WSDL" xml:id="id_8">
<oracle-xsl-mapper:schema location="../../application_12/inbound_13/resourcegroup_14/DHAGetStatus_WSDL_REQUEST.wsdl" xml:id="id_9"/>
<oracle-xsl-mapper:rootElement name="OutboundSOAPRequestDocument" namespace="http://xmlns.oracle.com/types/DHAGetStatus_WSDL/OutboundSOAPRequestDocument" xml:id="id_10"/>
</oracle-xsl-mapper:target>
</oracle-xsl-mapper:mapTargets>
<!--GENERATED BY ORACLE XSL MAPPER 12.1.2.0.0-->
</oracle-xsl-mapper:schema>
<!--User Editing allowed BELOW this line - DO NOT DELETE THIS LINE-->
<xsl:template match="/" xml:id="id_11">
<nstrgmpr:OutboundSOAPRequestDocument xml:id="id_12">
<nstrgmpr:Body xml:id="id_13">
<ns0:getApplicationStatusRequest xml:id="id_14">
<ns0:ApplicationNumber xml:id="id_15">
<xsl:value-of select="/nssrcmpr:execute/nssrcmpr:QueryParameters/nsmpr0:ApplicationNumber" xml:id="id_16"/>
</ns0:ApplicationNumber>
<ns0:FreeZoneOrganization xml:id="id_17">dubai</ns0:FreeZoneOrganization>
</ns0:getApplicationStatusRequest>
</nstrgmpr:Body>
</nstrgmpr:OutboundSOAPRequestDocument>
</xsl:template>
</xsl:stylesheet>
Average Rating:



2 ratings
|
Sign in to rate this
This is the request XSL, your problem seems to be in response XSL. The request is using namespace
I assume the response might also have the same, but the actual soap response does not have any!
The expected response must be
<getApplicationStatusResponse xmlns="www.dha.gov.ae">
<applicationStatus>In Process</applicationStatus>
</getApplicationStatusResponse>
Average Rating:



1 rating
|
Sign in to rate this
This seems to request XSLT and not Response XSLT. Your response XSLT should have elements starting with response-wrapper.
Average Rating:



1 rating
|
Sign in to rate this
Find the screenshot
Average Rating:



2 ratings
|
Sign in to rate this
This is the actual response payload from ICS
Response Received Successfully from Target <getApplicationStatusResponse xmlns=""><applicationStatus xmlns="">In Process</applicationStatus></getApplicationStatusResponse>
Where we need to fix this?
Average Rating:



1 rating
|
Sign in to rate this
Response XSL
<?xml version = '1.0' encoding = 'UTF-8'?>
<xsl:stylesheet version="2.0" xml:id="id_1" xmlns:nstrgmpr="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST/types" xmlns:nssrcdfl="http://xmlns.oracle.com/types/DHAGetStatus_WSDL/OutboundSOAPRequestDocument" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:oracle-xsl-mapper="http://www.oracle.com/xsl/mapper/schemas" xmlns:nstrgdfl="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus/types" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns2="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/DHAGetStatus" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:nssrcmpr="www.dha.gov.ae" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" exclude-result-prefixes=" nssrcdfl wsp soap12 oraext xsd xp20 http wsaw ora oracle-xsl-mapper wsu xsi mime fn xsl nssrcmpr soap ignore01 nsmpr0" xmlns:ignore01="http://www.oracle.com/XSL/Transform/java" ignore01:ignorexmlids="true" xmlns:nsmpr0="http://xml.oracle.com/types/REST/DHAGetStatus_REQUEST" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<oracle-xsl-mapper:schema xml:id="id_2">
<!--SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY.-->
<oracle-xsl-mapper:mapSources xml:id="id_3">
<oracle-xsl-mapper:source type="WSDL" xml:id="id_4">
<oracle-xsl-mapper:schema location="../../application_12/inbound_13/resourcegroup_14/DHAGetStatus_WSDL_REQUEST.wsdl" xml:id="id_5"/>
<oracle-xsl-mapper:rootElement name="getApplicationStatusResponse" namespace="www.dha.gov.ae" xml:id="id_6"/>
</oracle-xsl-mapper:source>
<oracle-xsl-mapper:source type="WSDL" xml:id="id_7">
<oracle-xsl-mapper:schema location="../../application_1/outbound_2/resourcegroup_3/DHAGetStatus_REQUEST.wsdl" xml:id="id_8"/>
<oracle-xsl-mapper:rootElement name="execute" namespace="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST/types" xml:id="id_9"/>
<oracle-xsl-mapper:param name="SourceApplicationObject" xml:id="id_10"/>
</oracle-xsl-mapper:source>
</oracle-xsl-mapper:mapSources>
<oracle-xsl-mapper:mapTargets xml:id="id_11">
<oracle-xsl-mapper:target type="WSDL" xml:id="id_12">
<oracle-xsl-mapper:schema location="../../application_1/outbound_2/resourcegroup_3/DHAGetStatus_REQUEST.wsdl" xml:id="id_13"/>
<oracle-xsl-mapper:rootElement name="executeResponse" namespace="http://xmlns.oracle.com/cloud/adapter/REST/DHAGetStatus_REQUEST/types" xml:id="id_14"/>
</oracle-xsl-mapper:target>
</oracle-xsl-mapper:mapTargets>
<!--GENERATED BY ORACLE XSL MAPPER 12.1.2.0.0-->
</oracle-xsl-mapper:schema>
<!--User Editing allowed BELOW this line - DO NOT DELETE THIS LINE-->
<xsl:param name="SourceApplicationObject" xml:id="id_17"/>
<xsl:template match="/" xml:id="id_15">
<nstrgmpr:executeResponse xml:id="id_16">
<nstrgdfl:response-wrapper xml:id="id_18">
<nstrgdfl:Envelope xml:id="id_19">
<nstrgdfl:Body xml:id="id_20">
<nstrgdfl:getApplicationStatusResponse xml:id="id_21">
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/nssrcmpr:getApplicationStatusResponse/nssrcmpr:ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
</nstrgdfl:getApplicationStatusResponse>
</nstrgdfl:Body>
</nstrgdfl:Envelope>
</nstrgdfl:response-wrapper>
</nstrgmpr:executeResponse>
</xsl:template>
</xsl:stylesheet>
Average Rating:



1 rating
|
Sign in to rate this
Hello Mohana,
if you look at mapping xsl:value-of
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/nssrcmpr:getApplicationStatusResponse/nssrcmpr:ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
Here namespace prefix - xmlns:nssrcmpr="www.dha.gov.ae" in your response
Response Received Successfully from Target <getApplicationStatusResponse xmlns=""><applicationStatus xmlns="">In Process</applicationStatus></getApplicationStatusResponse>
getApplicationStatusResponse does not have namespace.
So, ideally your xslt should have
Average Rating:



2 ratings
|
Sign in to rate this
Hi Kanchan,
Thanks for your response. Where I have to modify the xpath in OIC?
Thanks,
Mohan
Average Rating:



1 rating
|
Sign in to rate this
In XSLT. Modify XSLT -
Instead of -
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/nssrcmpr:getApplicationStatusResponse/nssrcmpr:ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
Use:
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/getApplicationStatusResponse/ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
And use import xslt feature to import this xslt and test.
Average Rating:



1 rating
|
Sign in to rate this
Hi Kanchan,
Thanks for your support. I have modified as you mentioned, but no luck. Still got the empty response.
<xsl:value-of select="/getApplicationStatusResponse/ApplicationStatus" xml:id="id_23"/>
Thanks,
Mohan
Be the first to rate this
|
Sign in to rate this
The wsdl defines the request and response to use a namespace and so the mapper expects it. Your target service seems to send response without namespace in body (looking at the soap envelope you posted). This is clear violation of wsdl contract. So when the response is applied on mapper, the mapper can't recognize the source and it fails. The service should response with namespace.
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemath,
The SOAP response which I shared earlier, I got it from the SOAP UI which is the output of my WSDL. I just convert into JSON format and used as my response. I just modified as below.
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemanth,
When I validate the WSDL through online tool, there is no error. Just saying.
What needs to be change in the WSDL?
Thanks,
Mohan
Average Rating:



1 rating
|
Sign in to rate this
I did not say that wsdl is invalid. I said
This is the problem with the implementation of your target service. The response should include appropriate targetNamespace
Average Rating:



1 rating
|
Sign in to rate this
What needs to be change in the WSDL file to correct this issue?
Thanks,
Mohan
Average Rating:



1 rating
|
Sign in to rate this
No change is required in the wsdl. The change should be done in the implementation of the service where they need to set that targetNamespace for the response being sent.
Be the first to rate this
|
Sign in to rate this
Hi Hemanth,
Thanks for your response. I have modified my XSLT as per Kanchan's suggestion. Still I got the empty response. Do we need to change anything else?
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/nssrcmpr:getApplicationStatusResponse/nssrcmpr:ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
Use:
<nstrgdfl:applicationStatus xml:id="id_22">
<xsl:value-of select="/getApplicationStatusResponse/ApplicationStatus" xml:id="id_23"/>
</nstrgdfl:applicationStatus>
Thanks,
Mohan
Be the first to rate this
|
Sign in to rate this
I'm not sure if you ever understood the problem here! There is nothing you can do in OIC here since the target service which you are using has the problem. You need to check with the webservice owners and tell them the problem - that the response defined in the wsdl has a targetNamespace but the actual response returned does not have the namespace (as mentioned in this comment already)!
Be the first to rate this
|
Sign in to rate this
Can you share iar file? If yes, I can give a try, however as per my understanding w/o namespace it would be a problem and worst case solution could be string functions.
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemanth,
I have checked with WSDL owner. They could not change the WSDL since other vendor using the same WSDL. Can we fix this issue in OIC?
Thanks,
Mohan
Average Rating:



1 rating
|
Sign in to rate this
The *fix* should be in the WSDL implementation service. If they can't do it or not willing to do it and you need to handle (not fix) in OIC, you can do following:
Write the response to Stage File with Opaque Schema - using encodebase64(get-content-as-string($_USE_EXACT_XPATH_OF_BODY)). Read the Stage File by providing sample response xml (content within body section of your soap response from SoapUI) and map it to rest trigger response.
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemanth,
Thanks for your suggestion. I followed your steps, but I got the below error in Read Stage step.
Response XML:
<getApplicationStatusResponse>
<applicationStatus>In Process</applicationStatus>
</getApplicationStatusResponse>
Please find the mapping of Write Stage File
Thanks,
Mohan
Average Rating:



1 rating
|
Sign in to rate this
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemanth,
I have modified the mapping.
I tried like this below and as per attachment (Drag and drop the element)
<xsl:value-of select = 'oraext:encodeBase64(oraext:get-content-as-string("/getApplicationStatusResponse"))'>
But I got the below error in Write Stage itself.
{ "type" : "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1", "title" : "Internal Server Error", "detail" : "Internal server error. Please contact oracle support for details.", "o:errorCode" : "500", "o:errorDetails" : [ { "type" : "UnMappedFault:execute", "instance" : "<![CDATA[Please inspect the logs for more details. Initiating Request: <request_payload/>\n]]>", "title" : "faultName: {{http://schemas.oracle.com/bpel/extension}subLanguageExecutionFault}\nmessageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}\nparts: {{\nsummary=<summary>XPath expression failed to execute.\nAn error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('resources/processor_55/resourcegroup_58/req_29e97893601348409bedd9636e8866b7.xsl', $messagecontext_15.parameters, 'DHAGetStatus', $messagecontext_32.parameters)\nThe XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/oracleinternalics/DHA_APPL_STATUS_rev01.00.0000/resources/processor_55/resourcegroup_58/req_29e97893601348409bedd9636e8866b7.xsl<Line 30, Column 153>: XML-22900: (Error) An internal error condition occurred.\nCheck the detailed root cause described in the exception message text and verify that the XPath query is correct.\n</summary>\n,code=<code>XPathExecutionError</code>}\ncause: {javax.xml.transform.TransformerException: oramds:/deployed-composites/oracleinternalics/DHA_APPL_STATUS_rev01.00.0000/resources/processor_55/resourcegroup_58/req_29e97893601348409bedd9636e8866b7.xsl<Line 30, Column 153>: XML-22900: (Error) An internal error condition occurred.}\n", "o:errorPath" : "NA", "o:errorCode" : "NA" } ] }
Average Rating:



1 rating
|
Sign in to rate this
The root element itself is not recognisable as there is no namespace associated. Can you share the wsdl url and credentials if any via direct message, I will try out to see if there is a way to capture the response.
Average Rating:



1 rating
|
Sign in to rate this
Hi Hemanth,
I have shared the details with you.
Thanks,
Mohan
Be the first to rate this
|
Sign in to rate this