We can assign one schema to another by many ways. But best way to assign values to one schema from another schema is to use the Message assignment Shape inside the Message Construct shape. Let’s take an example for it.
Example: Conversion of BillingAddress to ShippingAddress. For this I have two Schemas BillingAddress.xsd and ShippingAddress.xsd. All the elements of both schemas are promoted to Distinguished Fields, so that we can access them in message assignment shape. Both schemas are as follows:
Now I have created an orchestration, in which I am assigning the values of BillingAddress.xsd to ShippingAddress.xsd. For this I have created two messages msgBillingAddress and msgShippingAddress of BillingAddress.xsd and ShippingAddress.xsd types respectively. I have created a variable named varXmlDoc of System.Xml.XmlDocument type. My orchestration will look like the follows:
You can see in the image that there I have added a Receive Shape which will accept the msgBillingAddress and at the last you can see that I have added a Send Shape to send the ShippingAddress using msgShippingAddress. Between these two shapes(Receive & Send Shape), I have added a shape through which I am assigning values of BillingAddress to ShippingAddress message. And for this I have added a Construct shape and inside it I have added a Message Assignment Shape.
Now the purpose of this article is to share how to assign one message to another one. I have added the following code to assign BillingAddress to ShippingAddress message.
//Create a new object of XMLDocument. For this we will use the Variable created as XMLDocument.
varXmlDoc = new System.Xml.XmlDocument();
//We need to Load the variable with dummy XML.
//It can be same as generated instance.
//Note here we have to assign that instance that we need in target, not the //source schema.
You will find this error while you will running / testing your orchestration. The error is telling that the configuration section for logging cannot be found in the configuration source.
So You will go to change your configuration file. I have done the same.
But it will not resolve your problem. The main problem is not in your application's configuration file. But the problem is in the BTSNTSvc.exe.config file, located in your installcation directory. So please enter the logging details in this file. Then test your Orchestration. I am sure it will resolve your problem.Cheers:)
I am adding the following(at 14th August,2008) after getting comments from some friends(E.R. Joell & PeteM). Thanks buddy:
We needs to add the following block in the BTSNTSVC.exe.config file (that you can find in C:/Program Files/Microsoft BizTalk Server 2006) inside the <configSections></configSections>:
You will get this error when you are going to build your Web Service. To resolve this error please first make sure no .keep file exist in you this web service. Please remove all .keep files and also move the PrecompiledApp.config file. Its resolve my problem. I think its the solution of this error.
When we have Orchestration in the same project, we can select it directly in Called Orchestration property of the CallOrchestration shape. But when we have called orchestration in reference assembly (Another Project), we need to set the Type Modifier property of that orchestration to Public. By default it is Internal. But to use any orchestration as Referece Assembly in another project for CallOrchestration shape, we need to set its Type Modifier property to public and one more thing that the receive shape of that called orchestration must not Activated(i.e. its Activate property should be False). So an so we can find that orchstration in CallOrchestration's reference assembly else not.
I am working on Biztalk 2006 R2 and facing a big problem. I have created an orchestration and for temporary purpose I want to comment some shapes that I have used in this orchestration like we are commenting the code in .net. But I have not found any facility in Biztalk to do it. I think microsoft has to add this functionality in this technology. Let me know your reviews, if you want to add.
At this time to resolve this issue, I am using the decide shape and keeping all unwanted shapes in this decide shape which cannot execute. I have added such type of condition which will never true (i.e. 1==0). So at this time I can run my orchestration and can use those commented shapes(insude the above decide shape) in future if I want. Is it ok?