Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Orchestration exposed as a WCF service problem
- This topic has 5 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
August 5, 2010 at 3:32 PM #25536
I’m implementing an architecture where I have an orchestration exposed as a WCF service via the BizTalk WCF publishing wizard. This orchestration’s receives any untyped xml document (receive shape is of message type xmlDocument). I’m trying to test this WCF service by creating a quick project that includes the files generated by the svcutil.exe utility executed on the wsdl created by the orchestration. The data contract created is called part and is of type object. What is the best way to send an xmldocument to this WCF service so that is is recognized as an xmlDocument by my orchestration?
-
August 5, 2010 at 8:33 PM #25537
Hi,
The examples I’ve come across on the internet all use a strongly typed message in the Receive location for the orchestration when it is exposed as a WCF service. So the publishing wizard exposes your untyped message as of type Object. In your project that tests the service, have you tried constructing a message of type XmlDocument, cast it as an Object and pass that to the service proxy call? I’m not sure if that would work, but give it a try.
If this does not work, you would have to re-architect your orchestration to use a proper schema for your Receive location.
Daniel.
-
August 6, 2010 at 1:21 PM #25560
I tried constructing a message of type XmlDocument and casting it to an object but it didn’t work. I don’t want to rework my orchestration. This orchestration is responsible for determing the message type and routing. I want a single entry point for my partners to send messages and validate those messages before processing. I’ll keep looking into it to see if there is anything on the wcf adapter I can configure.
-
August 6, 2010 at 8:10 PM #25561
Hi,
From what I understand, you can set up the activatable receive shape for untyped messages when exposing the orchestration as a wcf service. In the client that consumes this service, the message you pass to the service proxy’s method call should be of a type that is serializable, and I don’t think XmlDocument is such. Have you tried to set this message as a string and pass it that way?
FYI, here’s a good MSDN article that walks you through using WCF Adapters in BizTalk:
http://technet.microsoft.com/en-us/library/bb967002(BTS.10).aspx
You might have come across it, but I think this is a good resource to look back anyway.
Good luck,
Daniel.
-
August 9, 2010 at 5:47 AM #25576
Hey Daniel,
Thanks for the reply. Yes, passing the message as a string in the service proxy method call does work. The problem with this is that the message gets suspended when the adapter tries to publish to the message box. The error is saying no subscribers to this message can be found. I am using a passthrough pipeline componenet and within the messages tab of the wcf adapter configuration I’m using the path option with a xpath expression (Node encoding is set to string). When the message get’s suspended, I can see that the body of the message is a properly formatted xml doc. Since the orchestration that I exposed is taking untyped messages, shouldln’t the orchestration subscribe to the message and process it?
-
August 9, 2010 at 9:28 AM #25580
Hi,
You might want to check this following blog on how to make your scenario work:
http://www.traceofthought.net/CommentView,guid,c5418f3d-2ea7-4530-ab9c-ae4c49154fcb.aspx
Also, here’s another blog on how to make BizTalk orchestrations correlate on untyped messages:
http://blogs.msdn.com/b/richardbpi/archive/2006/05/01/587550.aspx
Best,
Daniel.
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.