webMethods

webMethods

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.

 View Only
  • 1.  documentToXMLString skips outer element

    Posted Mon July 17, 2006 10:13 AM

    Hi!

    I have made a simple service that takes a specific document type (describing an xml document) as a parameter and uses the documentToXMLString function to convert the document to a string.

    The document may look like this:

    <?xml version="1.0" encoding="ISO-8859-1" ?> X

    For some reason the documentToXMLString skips the outer tag.

    Does anyone know how why or how I can fix it?

    Regards
    Mikael


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


  • 2.  RE: documentToXMLString skips outer element

    Posted Mon July 17, 2006 02:01 PM

    Hi Mikael

    According to ur description what i understand is may be you have named the document as Services

    Give a different name to the IS document and inside that
    create the other documents(tags) like
    Services
    Request

    It should work, I dont see any other reason for it to not to work

    HTH
    Nandan


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


  • 3.  RE: documentToXMLString skips outer element

    Posted Mon July 17, 2006 04:18 PM

    Using Developer’s pipeline editor, create a child document named “Services” under the “document” input parameter of the pub.xml:documentToXMLString service. Map your “Services” document to that new child.

    If you want your xml string to use a namespace prefix. Name the child document to prefix:Services and populate the nsdecls parameter to associate that prefix with a namespace value.

    Mark


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


  • 4.  RE: documentToXMLString skips outer element

    Posted Mon July 17, 2006 04:18 PM

    Hi

    Thanks for the reply!

    The document type is called “getPrivateCustomerDocumentType”, but the name should not have anything to do with this behaviour.

    The service just takes this docType as a parameter and converts it to a string using documentToXMLString.

    I solved it temporary by adding an outer dummy tag, “apa” (which is swedish for ‘monkey’ btw) as seen in the attached image.

    But I still can´t figure out why the outer tag (apa in this case) is not included in the xml string.


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