Simple Two-Way Itinerary not working
-
Friday, February 12, 2010 12:20 AMHi all,
I have a simple scenario.
1. I have asmx web service (HelloWorld) which accepts an XmlDocument and returns the same XmlDocument
2. I have created the itinerary and am using the Itinerary Test Client which (should) take an piece of xml and route it to the Web service (above) and return the xml to the caller (the Test Client).
The problem is that I load up the test client with the itinerary some random xml. The destination web service is invoked OK but the xml being passed in is NULL and the response is timing out on the Client. Even if I create a new XML document and return that it still times out.
below is my itinerary
<?xml version="1.0" encoding="utf-8"?>
<Itinerary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" uuid="" beginTime="" completeTime="" state="Pending" isRequestResponse="true" servicecount="1" name="TwoWay" version="1.0" xmlns="http://schemas.microsoft.biztalk.practices.esb.com/itinerary">
<BizTalkSegment interchangeId="" epmRRCorrelationToken="" receiveInstanceId="" messageId="" xmlns="" />
<ServiceInstance name="Microsoft.Practices.ESB.Services.Routing" type="Orchestration" state="Pending" position="0" isRequestResponse="true" xmlns="" />
<Services xmlns="">
<Service uuid="774488bc-e5b9-4a4e-9ae7-d25cdf23fd1c" beginTime="" completeTime="" name="Microsoft.Practices.ESB.Services.Routing" type="Orchestration" state="Pending" isRequestResponse="true" position="0" serviceInstanceId="" isTrackingEnabled="true" />
</Services>
<ResolverGroups xmlns="">
<Resolvers serviceId="Microsoft.Practices.ESB.Services.Routing0"><![CDATA[STATIC:\\transportType=WCF-BasicHttp;transportLocation=http://au-l190/WebService1/Service1.asmx;action=HelloWorld;endpointConfig=;jaxRpcResponse=false;messageExchangePattern=Two-Way;targetNamespace=http://tempuri.org/;transformType=;]]></Resolvers>
</ResolverGroups>
</Itinerary>
I have noticed though that the Service Name is "Microsoft.Practices.ESB.Services.Routing" and not "Microsoft.Practices.ESB.Services.Routing.TwoWay" which I have seen is some demo's. That option is not available to me in the Itinerary Designer.
Any Ideas,
Thanks
Biztalk Developer
Answers
-
Wednesday, February 17, 2010 6:09 AM
Recommended reading:
- This (brand new) article answers your question: Making Sense of Model Elements and Extenders in the Itinerary Designer
- See the reading list at the end of this article: Get up and Running with BizTalk ESB Toolkit 2.0
Recommended training:
- QuickLearn's Expert Series ESB Training (since I work there and all)
But seriously, we just added a 3rd day of training to the class that walks you through building a complete end-to-end solution with ESB starting with an empty solution. It's pretty sweet.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining- Edited by nick.hauenstein Wednesday, February 17, 2010 4:42 PM typos
- Proposed As Answer by Andrew_ZhuModerator Thursday, February 18, 2010 7:09 AM
- Marked As Answer by Andrew_ZhuModerator Friday, February 19, 2010 3:45 AM
All Replies
-
Friday, February 12, 2010 12:32 AM
The Two-Way routing service is a sample that has to be registered in esb.config in order for it to show up properly. I'll edit this post tomorrow morning with details.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Friday, February 12, 2010 12:36 AMcool thanks, does that explain the behaviour of nothing being passed to the web method? or does it address the response timeout?
thanks
Biztalk Developer -
Tuesday, February 16, 2010 4:53 PMUpon a closer read that only explains part of the problems. The orchestration-based router will send a message to a service, and put the SAME message back on the bus. Unfortunately, in this case it wouldn't be routed back to the test client (use an actual off-ramp for that behavior).
The part that it does not explain is why the XML is null that is being sent to the service. That might be a problem with the service itself.
Try designing an itinerary like this:
OnRamp:On Ramp Extender -> Itinerary Service:Messaging Extender:Routing Service (Container: On-Ramp Receive) -> Itinerary Service:Off-Ramp Extender (Off Ramp: TwoWayOffRamp->Send) -> Off Ramp:Off Ramp Extender (Name: TwoWayOffRamp, IsTwoWay: True) [connected back to the on-ramp]
That should get the behavior you want, and if you have null XML data coming through verify that the data can be sent to your service with some test code apart from BizTalk/ESB.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Tuesday, February 16, 2010 9:44 PMThanks,
I did what you suggested (which actually makes more sense than the example I followed from a video on the net). I stopped the send port and sure enought the xml is there in the send port but smewhere/somehow it doesnt get to the service. Changing from WCF-BasicHttp to FILE and everything works fine - the XML is saved to disk.
I have also created a test client, added a web reference and send messages to the service and everything is ok.
Not sure what to do now!!!!
Biztalk Developer -
Tuesday, February 16, 2010 9:57 PM
My two shot in the dark guesses would be that either there's an encoding issue, or the XML directive is/is not needed at the top of the XML content.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining- Edited by nick.hauenstein Wednesday, February 17, 2010 5:43 PM
-
Tuesday, February 16, 2010 11:05 PM
mmmm....tried <?xml version="1.0" encoding="utf-8"?> at the top of the xml document still no luck. Could it be something I need to set in the Resolvers Endpont Configuration in the Itinerary Designer?
Biztalk Developer -
Tuesday, February 16, 2010 11:09 PM
What are the current resolver settings for the resolver on the Routing Service step?
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Tuesday, February 16, 2010 11:10 PMSorry one more thing...what about the Send Port its self I have used the ItinerarySend and ItinerarySendPassthrough pipelines! both work I havent deployed the schema to BT so why would the ItinerarySend even work?
Biztalk Developer -
Tuesday, February 16, 2010 11:13 PM
Sorry, I didn't have my coffee this morning. The service you are invoking is a SOAP based web service. So, you will still need to consume the service with the appropriate BizTalk wizard and generate the schemas necessary for communication (even if it is a schema that ends up having a node in the middle that accepts anything). Otherwise the service won't know what to do with the incoming data. From there you will need to add a transformation step to your itinerary that transforms the content that you are receiving (a big fat Any node) to the service request.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining- Edited by nick.hauenstein Tuesday, February 16, 2010 11:14 PM didn't read thoroughly
-
Tuesday, February 16, 2010 11:14 PMAction = "HelloWorld"
Endpoint Configuration = ""
Jax Rpc Response = "False"
Message Exchange Patern = "One-Way"
Target Namespace = http://tempuri.org/
Transformation Type = ""
Trnsport location = "http://localhost/WebService1/Service1.asmx"
Transport Name = "WCF-BasicHttp"
Resolver Implementation = "STATIC"
Note....for simplicity I am now using a On-Way itinerary but the behaviour is the same!!!!
Biztalk Developer -
Tuesday, February 16, 2010 11:16 PMCan you explain this a little further. Why wont it work with the Pass Through Pipeline?
Biztalk Developer -
Tuesday, February 16, 2010 11:23 PM
The ASMX service is expecting a message that looks like this (simplified here for my the sake of my fingers):
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<someActionName>
<CRAZY XML GOODNESS HERE>
</someActionName>
</s:Body>
</s:Envelope>
When you use the wizards to generate your schema you will get a schema that has a node for each action that your service exposes that is properly set up to become a part of a properly formed SOAP message. Without that the service host just gets the crazy XML goodness and can't cope with it to the point that your service implmentation actually gets a chance to deal with the data.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining- Proposed As Answer by nick.hauenstein Wednesday, February 17, 2010 6:10 AM
-
Tuesday, February 16, 2010 11:27 PMso Do I need to deploy the schema?
Biztalk Developer -
Tuesday, February 16, 2010 11:27 PM
Yup.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Tuesday, February 16, 2010 11:45 PM
This is what I have done..
Add Geneated Items (Consume WCF Service)
Deployed schemas
Still receiving Null in the Service...
Is this what you were asking me to do?
Biztalk Developer -
Tuesday, February 16, 2010 11:48 PMDo you have a transform step to shuffle the XML in the input to the corresponding node in the service request?
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Wednesday, February 17, 2010 12:01 AM
Ok...with you now.... I would also need to deploy the schema for the XML to be transformed into the SOAP outgoing message right?
so I need an additional step in the itinerary: Itinerary Service:Messaging Extender:Transform Service (Container: Off-Ramp Send)
where would the it go in the Itinerary? and how do I set the Transform Type in the Resolver for this step. Do I need to modifiyteesb.config to include the map?
BTW..It now works when I generate a message from the schema and use that as the xml to send!!!
Biztalk Developer -
Wednesday, February 17, 2010 12:04 AM
Once the map is deployed it should show up in the drop down for the Transform Type (assuming STATIC resolver in this case).
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining -
Wednesday, February 17, 2010 12:46 AMThanks so much for your help...
Is there some recommended reading you can suggest that explains the itinerary designer, and particularly what and when to use the various Service Extenders.. there seems to be many ways to skin the cat but I cant find anything that describes what each extender does or when to use them.
Thanks
Biztalk Developer -
Wednesday, February 17, 2010 6:09 AM
Recommended reading:
- This (brand new) article answers your question: Making Sense of Model Elements and Extenders in the Itinerary Designer
- See the reading list at the end of this article: Get up and Running with BizTalk ESB Toolkit 2.0
Recommended training:
- QuickLearn's Expert Series ESB Training (since I work there and all)
But seriously, we just added a 3rd day of training to the class that walks you through building a complete end-to-end solution with ESB starting with an empty solution. It's pretty sweet.
BizTalk ESB Toolkit 2.0 Training: http://quicklearn.com/redir/?r=esbtraining- Edited by nick.hauenstein Wednesday, February 17, 2010 4:42 PM typos
- Proposed As Answer by Andrew_ZhuModerator Thursday, February 18, 2010 7:09 AM
- Marked As Answer by Andrew_ZhuModerator Friday, February 19, 2010 3:45 AM
-
Wednesday, February 24, 2010 10:29 PM
Thanks so much. I wonder if I could ask another question.
I have succesfully called the Web Service On Ramp from a client passing a message and the itinerary. However what I would like to do is simple send the message and just an itinerary name (as an example) which woudl be resolved by the bus from the itinerary database.
It seems that the web service expects the entire Itinerary which I wouldnt expect the client to serialize and send in the web method call.
Is this possible?
Biztalk Developer

