Follow the following steps to setup your application. This is to receive messages from a web service. I’ll explain an ASMX (SOAP) approach, and then followed by WCF
1. Run the BizTalk Web Services Publishing Wizard (ASMX), and rename your service and method name
2. Select the Microsoft.XLANGs.BaseTypes.dll assembly from the BizTalk Assemblies folder
3. Select the receive location and the receive location name

4. Once completed, an IIS receive location and BizTalk receive location would be created in your application

6. Submitting a message:
6.i. Using Visual studio, add a reference to the above webservice
Address: http://localhost/BizTalkOnRamp/SubmitMessage.asmx
6.ii. Use the service from Visual Studio:
XmlDocument xDoc = new XmlDocument(); xDoc.Load(@"D:\SampleDoc.xml"); SubmitMessage submitMessage = new SubmitMessage(); submitMessage.OnRamp(xDoc);
=== Setting up a WCF Service =====
- Select the WCF Publishing Wizard
- Start by creating a receive location (WCF – NET TCP)

- Start the WCF Service Publishing Wizard
- Select the Metadata endpoint (MEX) option, and select the receive location name

- Select Publish as Schema option
- Rename the Service and operations, and select Microsoft.XLANGs.BaseTypes.dll assembly from the BizTalk Assembly folder

- Select the location name

- This would create an IIS location (BiztalkOnRampWCF)

- Run the svcutil command and then import the generated files in your solution
Command: svcutil.exe http://localhost/BizTalkOnRampWCF/OnRampWCF.svc?wsdl - Use the service from Visual Studio
SubmitMessageRequest request = new SubmitMessageRequest(); request.part = "Sending a test message"; OnRampWCFClient message = new OnRampWCFClient(); message.SubmitMessage(request.part);
If no subscribers were created in BizTalk, a Fault exception was returned. Using the ASMX service, did not return any errors as such.
Once a message is submitted using a WCF/ASMX service, our BizTalk solution consumes the message and processes it 8)
Happy servicing


