IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 10:30 AM

    Hi everybody

    I’m trying to make a soap object and for the body (pub.soap.utils:addBodyEntry) I’m currently using a static XML for testing purposes.

    This is my XML-string input:

    <UpdateListItems>
    <listName>{D3205B25-5EC2-42A7-9F3B-2299A002E213}<listName>
    <updates>
    <Batch OnError="Continue" ListVersion="1">
    <Method ID="1" Cmd="New">
    <Field Name="Title">SAG BPMS DEV</Field>
    <Field Name="Description">Book</Field>
    <Field Name="Email">test@test.be</Field>
    <Field Name="Storage_x0020_Location">Locker 1</Field>
    <Field Name="Position_x0020_in_x0020_Storage">Shelf 1</Field>
    <Field Name="Course_x0020_Date">2014-03-22T00:00:00+0:00</Field>
    <Field Name="Person">-1;#Test Person</Field>
    </Method>
    </Batch>
    </updates>
    </UpdateListItems>

    When I change the produced node back to a string (xmlNodeToDocument → xmlDocumentToString), following XML is produced.

    <?xml version="1.0"?>
    <UPDATELISTITEMS></UPDATELISTITEMS>
    <LISTNAME></LISTNAME>
    <UPDATES></UPDATES>
    <BATCH ONERROR="Continue" LISTVERSION="1"/>
    <METHOD ID="1" CMD="New"/>
    <FIELD NAME="Title"/>
    <FIELD NAME="Description"/>
    <FIELD NAME="Email"/>
    <FIELD NAME="Storage_x0020_Location"/>
    <FIELD NAME="Position_x0020_in_x0020_Storage"/>
    <FIELD NAME="Course_x0020_Date"/>
    <FIELD NAME="Person"/>

    Does anyone know why this happens and how I can solve this?

    I hope you have enough information with this, if not, please don’t hesitate to ask because I know my question may be stupid but I’m just learning to use the software through an internship.

    With kind regards
    Kevin


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 11:50 AM

    In both the steps are you setting param called “documentTypeName” (this willl be fully qualified XML document type name that you are mapping/parsing)…Can you try give that option also and see if the outputs correctly with values and tags.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 11:52 AM

    when you call pub.xml:xmlStringToXMLNode, make sure set isXML = true.
    it should fix your problem


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 12:00 PM

    I don’t think that’s the issue, when I don’t perform the last two steps and just run xmlStringToXmlNode → addBodyEntry → soapDataToString, following output is generated:

    <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"></SOAP-ENV:Header><SOAP-ENV:Body>
    <UPDATELISTITEMS></UPDATELISTITEMS>
    
    <LISTNAME></LISTNAME>{D3205B25-5EC2-42A7-9F3B-2299A002E213}
    
    <UPDATES></UPDATES>
    
    <BATCH ONERROR="Continue" LISTVERSION="1"></BATCH>
    
    <METHOD ID="1" CMD="New"></METHOD>
    
    <FIELD NAME="Title"></FIELD>SAG BPMS DEV
    
    <FIELD NAME="Description"></FIELD>Book
    
    <FIELD NAME="Email"></FIELD>emans@test.be
    
    <FIELD NAME="Storage_x0020_Location"></FIELD>Kast 1
    
    <FIELD NAME="Position_x0020_in_x0020_Storage"></FIELD>Schap 1
    
    <FIELD NAME="Course_x0020_Date"></FIELD>2014-03-22T00:00:00+0:00
    
    <FIELD NAME="Person"></FIELD>-1;#Emans Kevin
    
    
    
    
    
    
    
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Note: addEmptyHeader is set to ‘true’ and soapProtocol to ‘Soap 1.1’ int the createSoapData step.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 12:01 PM

    That fixed the problem allright! :slight_smile:

    Thanks a lot!


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 12:42 PM

    OK make sense…as I did not focus on the xmlstringtonode step:


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 12:47 PM

    No prob, thnx for replying anyway :slight_smile:

    Kind regards
    Kevin


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 8.  RE: [SOLVED] pub.xml:XmlStringToXmlNode produces weird output

    Posted Fri March 21, 2014 12:57 PM