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

HOW TO add a DOCTYPE statement in a xml file

  • 1.  HOW TO add a DOCTYPE statement in a xml file

    Posted Fri December 31, 2004 01:35 PM

    Hi all,

    I have this cXML document in wich I need to add the folowing statement :
    <!DOCTYPE cXML SYSTEM “http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd”>

    after the first line in the cXML Invoice document :
    <?xml version=“1.0” encoding=“UTF-8”?>

    I currently have the following :
    <?xml version=“1.0” encoding=“UTF-8”?>
    <cXML payloadID=“20041231114548359.218b5630-5b19-11d9-9e1f-df81d26919c4.0a02151bf70d8bb20000b89b@server” timestamp=“2004-12-31T11:45:48-MET”>
    <Header>
    <From>
    <Credential domain=“NetworkID”>

    How am I suuposed to do it ?

    Thanks a lot,

    Renaud


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


  • 2.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Fri December 31, 2004 05:57 PM

    Renaud,

    In your pub.xml:documentToXMLString statement populate the dtdHeaderInfo input parameter by setting “systemID” to “[url=“http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd”]http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd[/url]” and “rootLocalName” to “cXML”.

    Mark


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


  • 3.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Mon January 03, 2005 02:31 PM

    Rangoon,

    I don’t understand why you want to add an XML processing instruction (like DOCTYPE) or the XML Version tag to a webMethods DocumentType (which is not XML).

    Perhaps you could explain more about why you need those things or post an example of a cXML documentType that you are attempting to construct.

    Mark


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


  • 4.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Fri January 07, 2005 03:29 PM

    Hi,

    Sorry for the delay, Had to handle an other issue.

    To sum it up, we need to wend a cXML v1.2.11 Invoice to ARIBA.

    The whole cXML structure is set and corrcet but ARIBA requieres the Invoice to have a DOCTYPE statement as follow :

    <?xml version=“1.0” encoding=“UTF-8”?>
    <!DOCTYPE cXML SYSTEM “http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd”>
    <cXML payloadID=“20050105143037922.fc439c80-5f1d-11d9-9d5c-a03d8c844423.0a02151bf70d311d0000ff03@nikto” timestamp=“2005-01-05T14:30:37-MET”>
    <Header>
    <From>
    <Credential domain=“NetworkID”>
    <Identity>AN0123456789-T</Identity>
    </Credential>
    </From>

    and this is what I send (note the missing DOCTYPE)

    <?xml version=“1.0” encoding=“UTF-8”?>
    <cXML payloadID=“20050105143037922.fc439c80-5f1d-11d9-9d5c-a03d8c844423.0a02151bf70d311d0000ff03@nikto” timestamp=“2005-01-05T14:30:37-MET”>
    <Header>
    <From>
    <Credential domain=“NetworkID”>
    <Identity>AN0123456789-T</Identity>
    </Credential>
    </From>


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


  • 5.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Fri January 07, 2005 04:52 PM

    What method will you use to post the cXML document to Ariba? Are you sending it in string format using something like pub.client:http or are you using some Ariba onramp built-in service that accepts an IS document?

    See my earlier post for how to add the !DOCTYPE declaration to your XML document.

    Mark


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


  • 6.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Mon January 10, 2005 10:02 AM

    Hello Mark,

    Actually I’m using TN’s partner’s properties (Delivery Methods / Default Protocol = HTTP to Ariba).

    For internal reasons my mapping service needs to give me a cXML document and not a String containing cXML. Then this cXML document is wrapped into a generic document, processed by Internal rules and finally passed to TN for sending to Ariba.

    I tried using “pub.xml:documentToXMLString”, the problem is that my encoding and doctype get lost during the conversion back to cxml (string->cxml).
    I also tried using a java service that used the insertAfter method but I wasn’t much help neither.

    So my wondering is why I can’t have my cXML handling its DOCTYPE statement when I use it as a document ?..
    … and my question is how to have my cXML handling its DOCTYPE statement when I use it as a document


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


  • 7.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Tue January 11, 2005 09:23 AM

    Rangoon,

    We have been sending invoices to Ariba for over a year now and have never had to wrap the document. I think it’s worthwhile looking at your architecture, because Ariba will be expecting the invoice as a string.
    You are correct in that the Doctype declaration will not be retained when the xml string is converted to a document
    2 cents
    T


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


  • 8.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Wed January 12, 2005 01:52 PM

    Finally, we’re on to install Ariba OnRamp 2.0 wich includes invoice sending. We currently have an issue on this install (waiting for feedback from WM support), I’ll let you know how good it’ll help.

    Thanks for your help and comments !


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


  • 9.  RE: HOW TO add a DOCTYPE statement in a xml file

    Posted Wed November 26, 2008 11:37 AM

    Hi Topetee,

    I need to sent cxml invoice to a customer’s ARIBA account. Can you please guide me on how to go about it. Can we just use WmPublic/pub.client:http to send the invoice or do we need to use Ariba OnRamp services. We are using WM 6.1 and Ariba OnRamp 2.0. Any inputs will be helpfull as I’m new to this stuff.

    Thanks,
    Ramya


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