Using the BTS 2006 SOAP adapter without orchestrations

Service Station, by Aaron Skonnard

Syndication

For me, one of the compelling uses of BizTalk is as a SOAP intermediary or as a "connector" between SOAP and other not-so-common transports/protocols. This gives you the power of the BTS pub/sub architecture and the transformation engine at the heart of your SOAP systems. You typically accomplish this by using the SOAP adapter as an on/off-ramp to the Message Box.
 
On the receive side, you can generate a SOAP receive location and the corresponding ASMX code using the "Publish schema as Web Service" option of the WS publishing wizard. This gives you a simple SOAP on-ramp to the Message Box and does not require any orchestration logic.
 
On the send side, however, there's no way to use a SOAP send port without an orchestration, leaving messaging-only scenarios out in the cold. At least not with BTS 2004 and the built-in SOAP adapter. The WSE 2.0 adapter came to the rescue and made it possible to use WSE send ports without orchestrations, although it typically required a specialized pipeline component to set up the WS-Addressing headers before dispatching. I showed a demo of this approach at TechEd this year.
 
Now for the good news. In BTS 2006, you can accomplish the same thing with the built-in SOAP adapter without too many headaches. You'll notice a new tab on the SOAP adapter properties page called "Web Service", which looks like this:
 
 
You specify an assembly that contains a Web service proxy class (typically generated via Add Web Reference) and choose a method. The assembly needs to be in the GAC. The SOAP adapter will then use this proxy/method to send the message out via SOAP. The adapter will take the message it receives from BizTalk, deserialize it into objects, and invoke the proxy method.
 
The trickiest thing about making this work is getting the message is in the right format for the proxy. I pulled my hair out yesterday trying this with proxy classes that used default "wrapped" technique with a parameter list of simple types. After talking it over with Matt and Jon about the other night, we concluded that it's probably because the adapter is expecting a multipart message in that case, which I wasn't providing. However, if your proxy takes a single complex input type, which maps directly to the XML message coming in, it seems to work every time. If you always use doc/lit/bare for your WebMethods you'll be good.
 
It's a beautiful thing to be able to wire-up BizTalk on either side of a SOAP exchange because it gives you tools for dealing with versioning (maps), multicasting (pub/sub), and numerous permutations of transport protocol/data format transitioning (adapters/pipelines). And since it no longer requires the OE, the bar just got a lot lower for mixing SOAP in with BTS 2006.
 

Posted Oct 07 2005, 04:22 PM by Aaron Skonnard
Filed under: ,

Comments

hooman ansari wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 12-15-2005 6:00 AM
Hi Aaron,

Very nice topic, Is there a sample code from BizTalk team out there?

Thanks,
Hooman
amir wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 01-13-2006 8:25 PM
hi, i'm trying to test the send soap adapter w/o orch. i can't make it work. do you have a sample code for above topic?
Omar wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 05-18-2006 6:04 AM
I would really appreciate it if you can post me a sample code for the topic about.

Thx
Omar wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 05-18-2006 7:06 AM
After I published a schema as webservice, I created a SOAP send port and used the adapter to forward the call to an external webservice with the same interface. I keep getting the following error:

The adapter failed to transmit message going to send port "SendPort1" with URL "http://localhost:1228/Service1.asmx". It will be retransmitted after the retry interval specified for this Send Port. Details:"Failed to serialize the message part "verzoek" into the type "verzoek" using namespace "". Please ensure that the message part stream is created properly. ".

Anyone hoe knows how solve this problem?
ChrisH wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 08-07-2006 7:23 PM
Would it be possible for you (or someone) to create a quick tutorial demoing this. E.g. start a new application that picks up an XML file and submits it to a SOAP Web Service. This will give us the full pickture.
faiz wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 11-04-2006 6:12 PM
is it possible to consume a web service without adding a web reference and by dynamically setting the url of web service in request?
Amit Rohilla wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 01-02-2007 2:33 AM
We are trying to consume a WS which accepts simple parameters( Not parameters rapped inside Class), for that we are getting the following error "Failed To retrive the message part for the parameter %1"
Aaron Skonnard wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 01-02-2007 8:44 AM
When the proxy class method takes multiple parameters, the SOAP adapter expects you to provide a multi-part message where each part maps to the corresponding parameter in the method signature. This typically means that you have to construct the message in a custom pipeline component.

In order to get around that, you can always rewrite the proxy method to only take a single parameter representing the entire message.
Rajeev wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 03-09-2007 6:25 AM
Hi My web service takes an integer value and return a dataset but when I try to run this error I get the following error Failed to Serialize message part into typr int32 please can anyone help me in this and if you can forward some code ar rajeevkrmathur@yahoo.com
Bruno Spinelli wrote re: Using the BTS 2006 SOAP adapter without orchestrations
on 12-12-2007 2:17 PM
Here you can find a way to understand what is really causing the serialization error : http://geekswithblogs.net/bcorazza/archive/2006/08/31/89947.aspx

Add a Comment

(required)  
(optional)
(required)  
Remember Me?