简体   繁体   中英

Invoking WCF no parameter method from Biztalk orchestration

I'm new at Biztalk, I've been making some tutorials, now I have an issue I don`t' find the solution but think is kind of easy

I have a WCF Service method with no parameters that returns an XML file. I want to call this method from biztalk orchestration, I have used the "Add ->Generated Item –> Consume WCF Service" wizard to generate the schemas and to be able to create a request, response port.

Now I just have to send a request to this service, an XML specifying the method I want to call. But I dont want to drop an XML file whits this message in a folder, read from there, and then call service.

It doesnt have parameters, so I want to generate the message in the orchestration and automatically call the service with it. How can I contruct the message from "nothing" just the schema?

thanks!

you could create a request message in your Orchestration in a Message Assignment shape. Create a message type matching the request message - eg msgRequest. In the Construct Shape, set the outgoing message to msgRequest. Go to the schema for the request and Generate an instance of that schema. Use the load xml method to assign the xDoc variable to the msgRequest message.

the expression would be something like:

xDoc = new System.XmlDocument(); xDoc.LoadXml("<GeneratedRequest/>"); Message_1.body = xDoc;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM