Wednesday, 12 September 2012

biztalk schema remove ns0 prefix

We can remove ns0 prefix simply by set the schema elements property or both elements and attributes properties to be qualified. To do that follow my steps:
1-      Open your schema
2-      Right Click <Schema> and select properties
3-      Use schema property editior and Set [Element FromDefult] to Unqualified, and then set [Attribute FromDefault] to Unqualified if you are using attributes in your schema.

After applying the steps above, both XML instances below will be valid:

Instance 1 (with ns0)
<ns0:Root xmlns:ns0="http://RandomBizTalkProject.Schema1">

Instance 2 (without ns0)
<Root xmlns="http://RandomBizTalkProject.Schema1">

Monday, 3 September 2012

BizTalk : WCF consuming error "Could not find default endpoint element "

Calling WCF service from assembly

WCF Service  -->  .NET Assembly(consumer for WCf service)  ---> BizTalk Orchestration(assembly referred)

Error :

Could not find default endpoint element that references contract 'proxyWCF.Interface' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Solution :
This error occur when calling WCF service thrugh .NET Assembly, When using assembly in orchestration the BizTalk Application in not able to find service endpoint and binding setting and hence give error "could not find default endpoint".
To resolve this error, we need to specify Endpoint for this service in btsnsvc.eve.config & btsnsvc64.eve.config  file,so that biztalk runtime will get the endpoints from config file.
Add the following nodes from App.config file of Assembly(WCf service is called) to btsnsvc.eve.config & btsnsvc64.eve.config  file.
 Specify service binding configuration
<endpoint>Specify service enpoints

BizTalk same schematype deployed in multiple application

Error :

There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "WcfSendPort_WSHttpBinding_Interface" URI: "http://localhost/wcfservice.svc/mex" Reason: This Assembler cannot retrieve a document specification using this type: "schemaNamespace#RootNode".

Solution :

Thie error can occur at run time when you test your BizTalk application with specific request.

Cause : Same schemaType deployed/used in multiple deployed BizTalk project

To resolve thie error, just delete the same schemaType form other project.Once you deleted the schema from other refering BizTalk application,it will work without any error.