locked
Convert xml file containing string field (<CDATA> structure) to complete xml file using BizTalk ? RRS feed

  • Question

  • I have to expose a web service of this format with Req and Response.

    <Root>
     <Name>John</Name?
     <Company>Sony</Company>
     <![CDATA[
       <message> Welcome to TutorialsPoint </message>
       <City>NYCity<City>
       <State>NY<State?
       <Zip>12345</Zip>
    ]] >
    
    

    1) how can I create schema for the above request and expose as a web service ?

    2) Further, I have to open CDATA structure and do some mapping. How can this be achieved ?


    MBH

    Friday, October 16, 2015 8:30 PM

All replies

  • Cant u expose as

    <Root> <Name>John</Name? <Company>Sony</Company> <payload><![CDATA[ <message> Welcome to TutorialsPoint </message> <City>NYCity<City> <State>NY<State? <Zip>12345</Zip> ]] ></payload>

    This way u create element payload of type string.

    Once u have this in orch xpath out payload and assign to a xlangmsg.


    Regards &lt;br/&gt; When you see answers and helpful posts,&lt;br/&gt; please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Friday, October 16, 2015 8:35 PM
    Answerer
  • So is payload a regular schema element (field ) just like Name and Company ? and when exposing  as web service is there any special design or property mentioning for payload element ?



    MBH


    • Edited by JaguarsJag Friday, October 16, 2015 8:58 PM added data
    Friday, October 16, 2015 8:48 PM
  • its normal field.type string. nothing special.

    Regards &lt;br/&gt; When you see answers and helpful posts,&lt;br/&gt; please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Friday, October 16, 2015 9:07 PM
    Answerer
  • so what ever data comes into that when we expose doesnt matter as it takes as string correct ?

    Can you please send me an example or code how to remove the CDATA section ? is it possible using XSLT template or xpath ?


    MBH

    Friday, October 16, 2015 9:15 PM
  • correct..

    To get cdata out see here.

    https://social.msdn.microsoft.com/forums/en-US/e84180a7-ea38-41ae-9650-cc36ec842262/cdata-extract-to-xml


    Regards &lt;br/&gt; When you see answers and helpful posts,&lt;br/&gt; please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Friday, October 16, 2015 9:24 PM
    Answerer
  • Do you have to produce or consume this example?
    Friday, October 16, 2015 10:43 PM
    Moderator
  • I have to produce... but later while processing I have to open CDATA section...and convert that too normal xml structure.

    Is there any XSLT template code there for this ?


    MBH


    • Edited by JaguarsJag Monday, October 19, 2015 5:26 PM added info
    Monday, October 19, 2015 5:25 PM