How to map Xml Node Elements before sending xmldoc as request parameter to the InvokeWebService Activity  
Author Message
Satya vani





PostPosted: Windows Workflow Foundation, How to map Xml Node Elements before sending xmldoc as request parameter to the InvokeWebService Activity Top

Hi,

I am having two InvokeWebService Activities which invokes two webservices named Registration and Billing. These two services need 2 xml documents where as I am sending only one XmlDoc as request parameter for WebServiceInput activity's Interface which is the first activity in my workflow.

public interface IWorkflow{

void RegisterPatient(System.Xml.XmlNode request,out string response);}

That Xmldoc contains information for both services as RootElements like the following

<xml ............>

<PatientInfo><firstname>satya</firstname><lastname>.....</las...... </PatientInfo>

<PaymentInfo><Amount>200</Amount>.......</PaymentInfo>

</xml>

Now I want to map the node elements of Input XmlDoc to the both webservices based on their own Xmldoc's NodeElements. For example Registration Service will take <phone1><phone2> as nodes, but input xmldoc is having nodes as <MobilePhone><OfficePhone>. In this scenario I want to map these corresponding NodeElements in my workflow. Anybody help me in doing the above scenario with example code or in finding any tool available for mapping. Thanks in advance.




Software Development for Windows Vista16  
 
 
Bill Zunis





PostPosted: Windows Workflow Foundation, How to map Xml Node Elements before sending xmldoc as request parameter to the InvokeWebService Activity Top

Satya,

It looks like you may have to create a second xmlDoc with different attributes, using the same data. Or you need to create a function that will translate this for you, by using a standard xmlDoc, and depending on the Webservice, you can take that data and format the XML data to match the attribute parameters that are reuired by each web service.

I'd use the create a new function. It's a bit more secure.



 
 
Satya vani





PostPosted: Windows Workflow Foundation, How to map Xml Node Elements before sending xmldoc as request parameter to the InvokeWebService Activity Top

Hi bill,

It's correct. I want to create two xmldocs from first xmldoc according to webservices requirement. Basically I don't have much knowledge on XML and XSD things. So please help me in splitting the data from first xml and loading that in different 2(more than 1) xml docs dynamically. Code sample is more precious, or help me in finding any link with samples for this requirement.

Thank you,

Satya