Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3575

Re: Issue with consuming an external webservice

$
0
0

Hi Aday,

 

As Raghu already suggested you need to handle CDATA section in your response.

 

  • Create target message type like below and create mapping between web service response and your response message type.

resp_mm.png

  • Map GetWeatherResult to GetWeatherResponse root node and set return as XML for source field like below.

getResult.png

  • Create operation mapping between web service response and your response service interface, use below order (First message mapping and second XSLT mapping)

opeartion.png

  • XSLT mapping code:

 

<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">   <xsl:output omit-xml-declaration="yes" indent="yes" encoding="utf-8"/>   <!--Identity template simply copies content forward -->   <xsl:template match="@*|node()">      <xsl:copy>         <xsl:apply-templates select="@*|node()"/>      </xsl:copy>   </xsl:template>   <xsl:template match="*">      <xsl:copy>         <xsl:apply-templates select="*"/>         <xsl:value-of select="substring-after(text(),&apos;?&gt;&apos;)" disable-output-escaping="yes"/>      </xsl:copy>   </xsl:template></xsl:stylesheet>
  • Test result from soap UI.

soapui.png

 

Regards,

Praveen.


Viewing all articles
Browse latest Browse all 3575

Trending Articles



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