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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  IDOC to XML conversion and to post it

    Posted 03/17/09 05:27 AM

    Hi all,

    I am new to SAP Integration. I am in need of your help in converting the IDOC into XML and then to send it to the customer.

    I know how to get the IDOC from SAP using SAP Adapter. Once it reaches IS. I am converting the IDOC to boundnode using

    pub.sap.idoc.transformFlatToHierarchy. which converts the IDOC to boundnode and I am mapping this bound node to the IDOC document structure which i have created using the DTD of the IDOC.

    Now, my question is …will this structure itself is a XML? or Do I need anything to add more to convert it into an XML and then to post it.

    Please suggest me how to convert it to XML and send that XML file to the partner. Please help me in solving this.

    THanks,
    David.


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


  • 2.  RE: IDOC to XML conversion and to post it

    Posted 03/17/09 05:45 AM

    You can convert the IDOC doc structure to a valid xml format, using the built-in xml services, documentToXMLString.

    Once u have the xml string, u can either send it to the target system or perform any mapping/transformations as required(to the expected output xml format). You may also need to validate the structure/values with the client.

    S


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


  • 3.  RE: IDOC to XML conversion and to post it

    Posted 03/17/09 02:09 PM

    Hi Smathangi,

    Thanks for your reply. I got your point. So, After mapping it to a document structure i need to convert that document to XML String.

    Coming to Validation. How can I validate the structure? Do I need to create a Schema? Please assist.

    Thanks,
    David.


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


  • 4.  RE: IDOC to XML conversion and to post it

    Posted 03/17/09 05:45 PM

    First of all are you mapping the incoming idoc to any other IS document?
    If YES, then you can validate that document after mapping. You can use pub.schema:validate service.

    Cheers
    Guna


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


  • 5.  RE: IDOC to XML conversion and to post it

    Posted 03/17/09 06:47 PM

    Hi Guna,

    Thanks for your reply. Actually, I am mapping the IDOC bound node to the IS DOC which i created using the IDOC DTD. And that Document has to be converted to XML.

    I’m little confused.Will I need to take a DTD or XML from the customer to create a IS Doc and map the above IS DOC(which i created from IDOC DTD) to the newly created IDOC.?

    And after that as suggested I use DocumenttoXMLString which converts the IS Doc to Xml string. Now where should I validate the structure.
    Can you please give me a step by step procedure. I know I’m asking taking you to basic levell…but i’m little confused.

    Thanks,
    david.


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


  • 6.  RE: IDOC to XML conversion and to post it

    Posted 03/18/09 02:20 AM

    David,

    Yes, u should create a doc type using the reference(Schema/XML) from ur client, and then map the IDOC values to the xml.

    S


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


  • 7.  RE: IDOC to XML conversion and to post it

    Posted 03/18/09 12:09 PM

    No. You need not create the idoc once again from XSD. If you have a process like this: SAP → IDOC to IS → IDOC to custom XML mapping → Custom XML to Customer, then you need to validate the custom XML document. If all you need to do is transfer the idoc to your customer without any custom XML format then no need of validation.

    Cheers
    Guna


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


  • 8.  RE: IDOC to XML conversion and to post it

    Posted 03/18/09 07:47 PM

    Guna and S,

    Yeah, I just need to send the IDOC to the customer in XML format. And I have got it. I am using SMTP to send it to the customer. If I need any assistance. I will trouble you guys again!!

    Cheers and thanks,
    David.


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