In many systems, when we come across a requirement of receiving the request into BizTalk from External Sources through SOAP adapter (at receive side), we generally create a web service for receiving the request and deploy that service in BizTalk IIS. This web service then publishes the input message into the BizTalk MsgBoxDB and then finally the message arrives at SOAP receive location and moves on for further processing. On the send side, there is the actual web service where the message needs to land.
In order to avoid this actual web service creation and deployment on BizTalk IIS, we can use the WCF service behavior feature. To achieve this we only need to make sure is that the input schemas which send side web service is expecting should be deployed on BizTalk.
A graphical representation of the actual scenario is:
Below are the steps to accomplish this:
- Open the BizTalk admin console and create a new application “SampleApplication”
- Create a new one way receive port named “ReceiveRequest”
- Create a new receive location named “ReceiveSOAPRequest”. Select the transport type as “WCF-Custom” and XMLReceive pipeline.
- Click on Configure tab which will open the WCF-Custom Transport Properties. On the General tab, type the Address which you want to be browsed (exposed to source) from outside by clients. I have written it as http://<YourServer>/MathServiceTest/MathServiceTest.svc. You can use anything you want.
- On the Binding tab, select the binding as “basicHttpBinding”.
- On the Behavior tab, right click on “ServiceBehavior” and Add extension. Then select the “serviceMetadata” from the list.
- Click on the “ServiceMetadata” on left panel which will show you its properties on right panel. Put the service URL in the “externalMetadataLocation property”. This URL is the one whose input schema is deployed in BizTalk (which is be further invoked) which would look like http://<ServerIP>/BizTalkWcfServiceSchema/Service1.svc. Also, set the httpGetEnabled property to True. This is the destination web service where the message has to be sent.
- Click OK. This will create a receive location as shown below.
- Enable the receive location and restart the host instances.
- Open internet browser and browse the URL which you typed in the general tab above i.e. http://<YourServer>/MathServiceTest/MathServiceTest.svc
Now, you will see that the URL you browsed is directly showing that service, one which you typed into the serviceMetadata.
So, you didn’t even bothered to deploy this MathServiceTest web service into BizTalk IIS and you are actually browsing it. When you pass any message to this service, it will directly land up onto BizTalk receive location and there on you can send that message further to the actual send location.
This may or may not be applicable to your scenario in particular. A front end web service may be required in places, where some business logic needs to be implemented before the BizTalk processing.
Benefits:
- No requirement of developing a new Web Service for the messaging only scenario.
- Lower number of Hops as the message directly lands on BizTalk receive location and is not routed through IIS.
- Reduced Load on IIS.
Limitations:
- As we are not writing an actual web service, there might be some concerns of Security.
- May not be always applicable and feasible.
Please do comment if you have come across any scenario where this concept can be applied.









