on 11-26-2014 10:30 AM
Hello Experts,
I am doing proxy to SOAP scenario in which i am getting the SOAP Response as single output parameter with the . All the output parameters are inside CDATA tag as shown below,
How can i get the xml data ???
I have created the target response structure same as it is received from SOAP response.
I have refer some SCN discussion about xslt and java mapping for which i am a beginner .
Is there any other way to handle this ??
Please reply ASAP.
Best Regards,
Amit
Hi Amit,
You can also achieve this using XSLT code as follows:
Please check:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="Enter Your Namespace here">
<xsl:template match="/">
<xsl:element name="getCRRecordResponse">
<xsl:value-of select="//ns0:getCRRecordResponse" disable-output-escaping="yes"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
1. You need to add this .xsl file (in zip format) under Imported Archive.
2. In your Operation Mapping for Response (go to Response Tab) select XSL type Mapping from drop down and refer the XSL from your Imported Archive
3. Your Response Proxy Structure needs to be in the same format/hierarchy as generated in the Response structure (CDATA elements in XML should match with the Response Proxy Structure).
4. The Namespace in XSL should refer to the Response Proxy Data Structure namespace, i.e the one in which you have created your Proxy Structure.
Hope it helps.
Regards,
Azhar
Hi Amit,
How are you testing this flow? Using Sproxy ?
Please check in the Error log, where exactly is the message failing - In Request or Response Mapping?
Also when you do Standalone testing in OM in ESR, you can just test either the Request or Response Mapping, you need to select the correct type and pass correct test data...pls share the screenshot for OM testg also..
Regards,
Azhar
Hi Amit,
I believe in SPROXY you can pass the required CDATA text as you did in OM Testing...Not sure what you mean by: Can you tell me how to pass data to cdata parameter?
For more details on CDATA you can refer to following links
What does &lt;![CDATA[]]&gt; in XML mean? - Stack Overflow
Also check in MONI error log for the exact error (give screenshot)
Hope it helps.
Regards,
Azhar
Hi Azhar,
Leave the question :
Can you tell me how to pass data to cdata parameter
I have provided the screenshot of the response message mapping in the previous comment but after xslt mapping running i am not getting the data return .
Please tell me that what might be wrong in the XSLT file.
Below is the image of the moni error.
Hi Azhar,
Below is my request
Below is my response payload structure
<?xml version="1.0" encoding="UTF-8"?>
<getCRRecordResponse>
<getCRRecordResult>
<CompanyMain>
<CommercialEntityDetails>
<CommercialRegisteration>
<Number>1010232398</Number>
<ExpirationDate>
<HijriDate></HijriDate>
</ExpirationDate>
<IssueDate>
<HijriDate></HijriDate>
</IssueDate>
<City>
<CityString></CityString>
</City>
</CommercialRegisteration>
<EntityName>
<NameText></NameText>
</EntityName>
<EntityPostalAddress>
<UnstructuredAddress></UnstructuredAddress>
<AddressType></AddressType>
</EntityPostalAddress>
<EntityPhysicalAddress>
<UnstructuredAddress></UnstructuredAddress>
<AddressType></AddressType>
</EntityPhysicalAddress>
<EntityContactDetails>
<TelephoneNumber>
<TelephoneFullNumber></TelephoneFullNumber>
</TelephoneNumber>
<TelephoneNumber>
<TelephoneFullNumber></TelephoneFullNumber>
</TelephoneNumber>
<FaxNumber>
<TelephoneFullNumber></TelephoneFullNumber>
</FaxNumber>
<FaxNumber>
<TelephoneFullNumber></TelephoneFullNumber>
</FaxNumber>
<Telex></Telex>
</EntityContactDetails>
<EntityActivity>
<CommercialActivityUnstructured></CommercialActivityUnstructured>
<CommercialActivityUnstructured></CommercialActivityUnstructured>
<CommercialActivityUnstructured></CommercialActivityUnstructured>
<CommercialActivityUnstructured></CommercialActivityUnstructured>
</EntityActivity>
<EntityCapital>
<CommercialRegisterationStructuredCapital>
<CapitalInitialValue>0</CapitalInitialValue>
<CapitalAnnouncedValue>0</CapitalAnnouncedValue>
<CapitalPaidValue>250000000</CapitalPaidValue>
<CapitalCurrency>00</CapitalCurrency>
<ForeignPartnerPercentage>0</ForeignPartnerPercentage>
</CommercialRegisterationStructuredCapital>
</EntityCapital>
</CommercialEntityDetails>
<EntityLegalStructureType></EntityLegalStructureType>
<CompanyPartners>
<PersonFullName></PersonFullName>
</CompanyPartners>
<CompanyPartners>
<PersonFullName></PersonFullName>
</CompanyPartners>
<CompanyDetails>
<CompanyType></CompanyType>
<CompanyNationality>
<CountryNameText>
<CountryNameArabic></CountryNameArabic>
</CountryNameText>
</CompanyNationality>
</CompanyDetails>
</CompanyMain>
</getCRRecordResult>
</getCRRecordResponse>
I have developed the XSLT mapping for the response structure but when i test this mapping from OM it doesn't return any data as shown in the previous comments.
Hi Amit,
For the response Payload screenshot, can you try to test with this Payload in OM (Open the Response Payload xml file --> Right click --> View Source --> Copy the entire text msg into OM - Response Test Tab)..and check if you are able to get the Output for this RESPONSE step
Give a Screenshot for this too.
Regards,
Azhar
Hi Azhar,
Below is the text response file ,
<?xml version="1.0" encoding="UTF-8"?>
-<getCRRecordResponse> -<getCRRecordResult xmlns:ns0="Namespace"> -<CompanyMain> -<CommercialEntityDetails> -<CommercialRegisteration> <Number/> -<ExpirationDate> <HijriDate/> </ExpirationDate> -<IssueDate> <HijriDate/> </IssueDate> -<City> <CityString/> </City> </CommercialRegisteration> -<EntityName> <NameText/> </EntityName> -<EntityPostalAddress> <UnstructuredAddress/> <AddressType/> </EntityPostalAddress> -<EntityContactDetails> -<TelephoneNumber> <TelephoneFullNumber/> </TelephoneNumber> -<TelephoneNumber> <TelephoneFullNumber/> </TelephoneNumber> -<FaxNumber> <TelephoneFullNumber/> </FaxNumber> <Telex/> </EntityContactDetails> -<EntityActivity> <CommercialActivityUnstructured/> <CommercialActivityUnstructured/> <CommercialActivityUnstructured/> <CommercialActivityUnstructured/> </EntityActivity> -<EntityCapital> -<CommercialRegisterationStructuredCapital> <CapitalInitialValue/> <CapitalAnnouncedValue/> <CapitalPaidValue/> <CapitalCurrency/> <ForeignPartnerPercentage/> </CommercialRegisterationStructuredCapital> </EntityCapital> </CommercialEntityDetails> <EntityLegalStructureType/> -<CompanyPartners> <PersonFullName/> </CompanyPartners> -<CompanyPartners> <PersonFullName/> </CompanyPartners> -<CompanyDetails> <CompanyType/> -<CompanyNationality> -<CountryNameText> <CountryNameArabic/> </CountryNameText> </CompanyNationality> </CompanyDetails> </CompanyMain> </getCRRecordResult> </getCRRecordResponse>
Regards,
Amit
This is the Output from your XSLT code in OM rite??
Not this Empty data file....I need the actual Response payload that you receive from the 3rd Party.
For the attached XML file that you posted abv...
For this Response XML file --> Open it --> Right Click --> View Source --> Opens text in Notepad --> Copy that text data here, so that I can ckh
Regards,
Azhar
Hi Azhar,
Below is the 3rd party response,
<?xml version="1.0"?>
-<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> -<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -<getCRRecordResponse xmlns="http://tempuri.org/"> -<getCRRecordResult> -<CompanyMain xmlns="http://namespace/MCI/CRManagementService/version/3.0"> -<CommercialEntityDetails xmlns="http:///MoCICommercialRecord/xml/schemas/version3.0"> -<CommercialRegisteration> <Number>1010232398</Number> -<ExpirationDate> <HijriDate xmlns="http:///CommonTypes/xml/schemas/version2.0">19-04-1436</HijriDate> </ExpirationDate> -<IssueDate> <HijriDate xmlns="http:///CommonTypes/xml/schemas/version2.0">19-04-1428</HijriDate> </IssueDate> -<City> <CityString xmlns="http:///CommonTypes/xml/schemas/version2.0">الرياض </CityString> </City> </CommercialRegisteration> -<EntityName language="AR"> <NameText xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0">شركه مملكه المعادن</NameText> </EntityName> -<EntityPostalAddress> <UnstructuredAddress xmlns="http:///CommonTypes/xml/schemas/version2.0">الرياض جنوب كبري الخليج بين شارع الضباب وشارع العليا العام</UnstructuredAddress> <AddressType xmlns="http:///CommonTypes/xml/schemas/version2.0">PhysicalLocation</AddressType> </EntityPostalAddress> -<EntityPhysicalAddress> <UnstructuredAddress xmlns="http:///CommonTypes/xml/schemas/version2.0">الرياض جنوب كبري الخليج بين شارع الضباب وشارع العليا العام</UnstructuredAddress> <AddressType xmlns="http:///CommonTypes/xml/schemas/version2.0">PhysicalLocation</AddressType> </EntityPhysicalAddress> -<EntityContactDetails> -<TelephoneNumber xmlns="http:///CommonTypes/xml/schemas/version2.0" telUse="Home" telMobile="Yes" telPreferred="No"> <TelephoneFullNumber>2198883</TelephoneFullNumber> </TelephoneNumber> -<TelephoneNumber xmlns="http:///CommonTypes/xml/schemas/version2.0" telUse="Home" telMobile="Yes" telPreferred="No"> <TelephoneFullNumber>0000000</TelephoneFullNumber> </TelephoneNumber> -<FaxNumber xmlns="http:///CommonTypes/xml/schemas/version2.0" telUse="Home" telMobile="Yes" telPreferred="No"> <TelephoneFullNumber>2197774</TelephoneFullNumber> </FaxNumber> -<FaxNumber xmlns="http:///CommonTypes/xml/schemas/version2.0" telUse="Home" telMobile="Yes" telPreferred="No"> <TelephoneFullNumber>0000000</TelephoneFullNumber> </FaxNumber> <Telex xmlns="http:///CommonTypes/xml/schemas/version2.0">000000/000000</Telex> </EntityContactDetails> -<EntityActivity> <CommercialActivityUnstructured xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0">تجاره الجمله والتجزئه في الالواح الجبسيه والزجاج بانواعه والخامات</CommercialActivityUnstructured> <CommercialActivityUnstructured xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0">الصناعية (الحجر الجيري والجبس والطين والبوزلان والسيلكا والالومينا</CommercialActivityUnstructured> <CommercialActivityUnstructured xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0">والحديد والبطحاء والرمل الابيض والاحمر والبوكسايد والمواد الصناعية</CommercialActivityUnstructured> <CommercialActivityUnstructured xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0">بانواعها .<<<<<<<<<</CommercialActivityUnstructured> <CommercialActivityUnstructured xmlns="http:///CommercialEntityCommonTypes/xml/schemas/version2.0"> </CommercialActivityUnstructured> </EntityActivity> -<EntityCapital> -<CommercialRegisterationStructuredCapital> <CapitalInitialValue>0</CapitalInitialValue> <CapitalAnnouncedValue>0</CapitalAnnouncedValue> <CapitalPaidValue>250000000</CapitalPaidValue> <CapitalCurrency>00</CapitalCurrency> <ForeignPartnerPercentage>0</ForeignPartnerPercentage> </CommercialRegisterationStructuredCapital> </EntityCapital> </CommercialEntityDetails> <EntityLegalStructureType xmlns="http:///MoCICommercialRecord/xml/schemas/version3.0">ذات مسئوليةمحدودة </EntityLegalStructureType> -<CompanyPartners language="AR" xmlns="http:///MoCICommercialRecord/xml/schemas/version3.0"> <PersonFullName xmlns="http:///PersonProfileCommonTypes/xml/schemas/version2.0">الامير فيصل بن يزيد بن عبدالله ال سعود</PersonFullName> </CompanyPartners> -<CompanyPartners language="AR" xmlns="http:///MoCICommercialRecord/xml/schemas/version3.0"> <PersonFullName xmlns="http:///PersonProfileCommonTypes/xml/schemas/version2.0">عبدالله منصور الشقير</PersonFullName> </CompanyPartners> -<CompanyDetails xmlns="http:///MoCICommercialRecord/xml/schemas/version3.0"> <CompanyType>ذات مسئوليةمحدودة </CompanyType> -<CompanyNationality> -<CountryNameText xmlns="http:///CommonTypes/xml/schemas/version2.0"> <CountryNameArabic>سعوديه </CountryNameArabic> </CountryNameText> </CompanyNationality> </CompanyDetails> </CompanyMain> </getCRRecordResult> </getCRRecordResponse> </s:Body> </s:Envelope>
Please let me know if there is any problem
Regards,
Amit
Hi Amit,
I am not able to see the CDATA tags in your file above...
However I assuming that these CDATA is coming in the Node : getCRRecordResponse
Request you to change your XSL code as follows and Test in OM test Tab.
XSL code (In line 4, change it to ur Namespace)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://www.testggg.org">
<xsl:template match="/">
<xsl:element name="getCRRecordResponse">
<xsl:value-of select="//*[local-name() = 'getCRRecordResponse']" disable-output-escaping="yes"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Regards,
Azhar
Hi Amit,
Seems connectivity issue. For the receiver 3rd Party please check:
1. Is the Port, firewall / network connection opened to connected to 3rd Party?
2. Are you able to launch the 3rd party URL in IE from your Client / PI network
3. Test with the same payload using 3rd party tool like SOAP UI and see the response. Use the tool from the Client domain/network (not from your local system).
4. Is the Ping Channel (for Receiver SOAP CC) working fine without any errors?
Regards,
Azhar
Hi Amit,
It depends on what & how the data is required by the 3rd Party.
Do you want to pass the CDAT as is? If yes then you dont need to add XSLT for Fault.
Incase you require the CDATA text to be converted to corresponding actual XML format, then you need to apply the XSLT mapping on fault as well.
Hope it helps
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.