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

Email body problemURGENT

  • 1.  Email body problemURGENT

    Posted Thu September 29, 2005 07:38 PM

    Ravinder,

    I believe you want to put the XML data in the body for the required elements that are shown above.So for example
    OrderNumber:%giveXPath/OrderNumber% for this do a setValue and check box the VariableSubstitution in the popup box.

    Follow the same for everyfield that you want in the email body.

    If you are not looking for this please elaborate your query…

    HTH,
    RMG


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


  • 2.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 07:58 PM

    Hi RMG,

    i am getting OrderNumber from a adapter service flow .

    Ravi


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


  • 3.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 08:10 PM

    Ravinder,

    Then it is simple and starightforward.construct the body string with all the parameters you are getting from the adapter service(for eg.
    A new XML order has been received. Find the order detail below. Please process the order accordingly.

    Order Number: %OrderNumberFromAdapterService%

    and map this string to the body of the smtp service.

    hope this helps.

    ramesh.


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


  • 4.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 08:11 PM

    Hi RMG,

    i am getting OrderNumber from a adapter service flow . Rest are from XML.what is giveXPATH?

    Ravi


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


  • 5.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 08:11 PM

    Even though then you keep AdapterService output loop thru %results/OrderNumber% etc…and rest of the fields.

    HTH,
    RMG


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


  • 6.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 08:27 PM

    Ravinder,

    If some values are from XML, then use queryXMLNode service to extract those values first and then build the body for the smtp service.

    ramesh.


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


  • 7.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 08:41 PM

    Hi Ramesh ,

    I appreciate your help.
    i new to webMethods…i setted To , Subject …
    I am getting OrderNumber from a Adapter Service, Other values from XML
    so here my quetion is how to set these all variables to desired format

    Ravi


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


  • 8.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 09:16 PM

    Ravi,

    Invoke xmlStringToXMLNode
    queryXMLNode(pass the node from the above step to this svc as the input.let’s say if you want to extract item number from the XML,under the variables tab,create itemNumber String and specify the query(XQL or WQL).After this service is executed,you will have itemNumber in the pipeline.
    Now build the body for the smtp service as follows:set the value for the body input parameter of smtp svc as:
    " A new XML order has been received. Find the order detail below. Please process the order accordinly.

    Order Number:%OrderNumberFromTheAdapterSvc%
    Item Number:%itemNumber%"(Note:this is extracted by the queryXMLNode svc)and dont forget to check the variable Substitution checkbox when you are setting the value of the body.

    hope this helps.

    ramesh.


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


  • 9.  RE: Email body problemURGENT

    Posted Thu September 29, 2005 09:20 PM

    Ravinder,

    Its like a output template and please try to follow as suggessted above the formatting part is just like you do in a notepad and structure the texts OrderNumer:%AdapterServiceresults/OrderNumber% and if it is from XML then specify the XPATH(xml field path)for example in XML structure:
    <employee>
    <name>Rob</name>
    </employee> the XMPATH is EmployeeName:%employee/name% this will extract the name content in the email body unless you setValue VariableSubstitution checkbox ON.

    HTH,
    RMG


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


  • 10.  RE: Email body problemURGENT

    Posted Fri September 30, 2005 04:14 PM

    Ravinder,

    create an xml schema for the xml structure and then create a document type from the xml schema.structure of the flow service should be:
    —xmlStringToXMLNode
    —xmlNodeToDocument(give the document type name as the one you have created from the schema)
    and from that document you can extract all the values you want.

    ramesh.


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


  • 11.  RE: Email body problemURGENT

    Posted Fri September 30, 2005 04:22 PM

    Ravinder,

    We have told you all the different options above,i am not sure where you are missing to extract the content from XML structure or Adapter service.

    Please try to read the posts above for quick resolution using VariableSubstituion check and extract content in the email body.

    OrderNumber:%XMLFieldPath/OrderNumber% etc…similarly you do for all the fields then it will format it as

    OrderNumber:%123456% from the XML string.

    HTH,
    RMG


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


  • 12.  RE: Email body problemURGENT

    Posted Fri September 30, 2005 05:20 PM

    Ravinder,

    Sending you the package showing how to extract values from XML.

    hope this helps.

    ramesh.


    xmlTest.zip (5.3 k)


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