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.

 View Only
Expand all | Collapse all

Keeping the DOCTYPE in a XML document

  • 1.  Keeping the DOCTYPE in a XML document

    Posted Fri March 08, 2002 03:21 PM

    Hi,

    Is there a way to keep the DOCTYPE from a XML document?

    When I invoke the pub.web:documentToRecord service, I lost the line.

    This is a short version of my docuemnt:

    <?xml version='1.0' encoding='UTF-8'?> 5

    I’m getting my Xml document from a ftp server and I have to do some modification to it before passing it to Trading Network. That’s why I use the pub.web:documentToRecord service.

    Is there another way to achieve this?

    Thanks for your help


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: Keeping the DOCTYPE in a XML document

    Posted Sat March 09, 2002 09:58 AM

    Call pub.web:getDocumentType which will return localRootName=“TEST” and systemID=“test.dtd” for the following:

    <?xml version="1.0" encoding="UTF-8"?>

    Right a Java service that uses a StringBuffer to append the five bits:

    1. "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE "
    2. localRootName
    3. " SYSTEM ""
    4. systemID
    5. “">”

    Call pub.web:recordToDocument with the addHeader flag set to false and put the String created above on the front.


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods