Email body problemURGENT

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

Hi RMG,

i am getting OrderNumber from a adapter service flow .

Ravi

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.

Hi RMG,

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

Ravi

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

HTH,
RMG

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.

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

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.

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

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.

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

Ravinder,

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

hope this helps.

ramesh.


xmlTest.zip (5.3 k)