Created a very simple orchestration and then deploy it as a web service. Inside the orchestration, on the message assignment calculate the age of the customer based on a distinguished property (BirthYear). Then place this calculated field back into the message for the Age element.
Here is the schema being used:
This is the simple orchestration to test this
On the construct shape, this is the code inside the assignment shape:
outMsg = InMsg;
iAge = System.DateTime.Now.Year - InMsg.BirthYear ;
outMsg.Age = iAge;
The port is setup as a One-Way port with Public - no limit for the access restrictions.
On the IIS manager, removed all of the restrictions
when publishing the orchestration, select the following settings:
the Namespace in here is the same namespace than the schema used inside the orchestration. However this is not a requirement for the Orchestration to work.
Once this orchestration is published. Trying to call it from a GUI client (web studio, Windows forms, etc...) you might get several distinct errors on the Application Event Log.
a. Isolated Host
When trying to call it, if you get this error in the Event Log:
The Messaging Engine failed to register the adapter for "SOAP" for the receive location "/SimpleWeb_Proxy/SimpleWeb_Main_IncomingPort.asmx". Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases.
This error, tells you that you have not configure the isolated host correctly. The account used, is not part of the Isolated Host User Group.
b. Routing Failure
Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5778
Time: 1:04:37 PM
The Messaging engine failed to process a message submitted by adapter:SOAP Source URL:/SimpleWeb_Proxy/SimpleWeb_Main_IncomingPort.asmx. Details:The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
The message will be suspended. Looking at the Hub Group you can see why this message is being suspended: 0xC0C01B4e(Routing Failure Report).
Right click on the Routing Failure Entry, and then select Troubleshoot Routing Failure, then select Find failed service instance.
If you look at the service details of the message, you can see that the Message Type is empty.
When the message type is empty or not defined, it might be because the pipeline define in the receive location was not set to be an XML pipeline. Change the pipeline and it should work.