Wednesday, 11 May 2016

BizTalk PortBindingMaster file - Password as Configurable key

BizTalk  PortBinding Master file - Password  as  Configurable key.

I knew its old technique but I just want to blog it for quick reference.






Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com

Monday, 11 January 2016

Site Visitors


I am delighted to say my Blog visitors head count has been dramatically increased from 10K+  to 30K+.

Thanks all readers who likes to view my Blog.

Raj.webjunky

BizTalk XSD- Import multiple schema's with same TargetNamespace


BizTalk  XSD Schema does not allow you to Import more then one schema which has same TargetNameSpace.

There are some situation you might need to reuse the existing schema's without re-creating the same structure with another set of Target namespace.
Wonder if you ever tried to add same targetnamespace schema using VisualStudio BizTalk Project.

Here is the error message you would get it

The namespace of the schema you are trying to add clashes with one of the namespaces already declared. Please choose another Schema.





Here is the alternate way of adding multiple schema's with one unique Target Namespace.

1. Select Schema which you would like to import and find "Fully Qualified Name"
    in my Solution I have a Project called "PublishSchemaTest.Common" which has common Schemas.
   And my Fully Qualified Name is "PublishSchemaTest.Common.CommonTypes"

2. Find Schema Target NameSpace in my case it is "http://www.rajwebjunky.com/Common//Types".

3. Add your Common schema project reference
4. Now Open the Schema which you prefer to import the CommonTypes

My OrderMaster XML Edit mode looks like below.





4. Add Import Schema manually 




5. Save the File and open in BizTalk Editor Mode . Now you would be able refer the schema at "Data Structure Type"



Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com



Thursday, 31 December 2015

BizTalk Published Service SingleWSDL -schemaLocation is missing , Cannot import wsdl:portType

Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: The required attribute 'schemaLocation' is missing.

I have been publishing number WCF services using BizTalk Schema's  and I never encountered any issues when end client generating a proxy class using  direct service url  or singlewsdl url.

Recently one  of my client had an issue with service which I recently published. I was really skeptical about the issue and I was keep asking him to try different ways, in fact I requested to use new .net SDK to use it.


after course of attempts I realized that service was throwing an unknown error as below


Attempting to download metadata from 'http://ccrsd027.stl.int/PublishSchemaTestService/PublishTest.svc?singleWsdl' using WS-Metadata Exchange or DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: The required attribute 'schemaLocation' is missing.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://PublishSchema.Test/']/wsdl:portType[@name='PublishTest']


Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://PublishSchema.Test/']/wsdl:portType[@name='PublishTest']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://PublishSchema.Test/']/wsdl:binding[@name='WSHttpBinding_ITwoWayAsync']


Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://PublishSchema.Test/']/wsdl:binding[@name='WSHttpBinding_ITwoWayAsync']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://PublishSchema.Test/']/wsdl:service[@name='BizTalkServiceInstance']/wsdl:port[@name='WSHttpBin
ding_ITwoWayAsync']


Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.

Warning: If you would like to generate data contracts from schemas make sure touse the /dataContractOnly option.


The root cause of the above problem was I had a Common Types schema which I included for my Generic complex types schema

When you Generate a SingleWSDL SVCUTIL tool generates a single WSDL File which includes all referenced schema's. however the Included schema's does not work when you generate a Proxy class using SvcUtil.exe.

The Fix is very simple:
Generate a Single WSDL file and open in Note pad (NotePad++) and identify a schema which you originally included a schema and simply Delete the auto generated empty include node 

and save the wsdl and try SvcUtil.exe "UpdatedSinglewsdl.wsdl"
Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com

Tuesday, 15 September 2015

BizTalk SSO Manager A new Tool to manage your SSO settings

BizTalk SSO Manager Tool :

Aim : Aim to Create a new SSO application without  deploying your BizTalk solution and also manage your existing settings or add new configuration values for existing deployed interface.

Background : If you deploy a BizTalk interface in any environment with SSO enable ) 
True )
at you BDDF project , it would eventually deploy the solution and publish your environment settings to SSO. This is great option in BTDF. However it is quite hard to manage the settings in case of any changes like Add / Delete new entry , Delete Complete SSO settings without un-deploying the BizTalk interface or event Create a New SSO Application without deploying BizTalk interface.


This tool would be a best solution for you play. 

Screen1a : When you run the tool by default it loads the applications which are deploying using BTDF. 


Screen1b :  You can add new Row / update existing row.

Screen2 : You are in free hand to create a Brand new Application without deploying a BizTalk interface


Screen3 : You can even Delete complete SSO settings without un-deploying a BizTalk interface


Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com
If you wish to download the code drop your comments.


Monday, 7 September 2015

BizTalk Untyped Message Promoting MessageType Context Property

Handling UntypedMessage message is a bit of fun in BizTalk . You could assign anytype of message at your construct shape and submit to messageBox. However Untypeed message will not promote MessageType to BizTalk Context.

Here is a simple scenario where you would need a MessageType is a Key Element to handle at your BizTalk Send Port Collection.

Scenario :  An orchestration designed with Request-Response Port which receive multiple requests (Schema published as WCF Service) and you would eventually submit transformed message to SEND Port.
The Send Port Message has been defined as UnTyped Message. So the Static SendPorts has configured at Biztalk Admin Console to Subscribe a request based on MessageType Filter property.

Problem:
When I submit a Untyped message to SendPort it doesn't recognize the Message due to missing the Context property of "BTS.MessageType"
So I tried by adding Correlation as BTS.MessageType at SendPort but it doesn't work. Finally I made a simple component which promote MessageType for UnTyped Message.

Solution :
----------------------------------------------------------------------------------------------------------------------
namespace RajWebjunky.Utility
{
    [Serializable]
    public class ContextPromoteHelper
    {
        //Assingn Context message for incoming "UnTyped" message
        public static void PromoteMessageType(XLANGMessage inMessage)
        {
            ReceivePipelineOutputMessages pipelineMsg = XLANGPipelineManager.ExecuteReceivePipeline(typeof(Microsoft.BizTalk.DefaultPipelines.XMLReceive), inMessage);
            pipelineMsg.MoveNext();
            pipelineMsg.GetCurrent(inMessage);
        }
    }
}
----------------------------------------------------------------------------------------------------------------------
The above component should invoke before you submit message to SendPort
at your Orchestration Construct Shape


Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com

Wednesday, 24 June 2015

Biztalk Map handling Nillable check

BizTalk Map Handling Nill Check Using XSLT Call Template
During my development I found its really painful job to adding too many functoid to achive nill check. Imagine if you have 10 or 20 elements which would required Nill check ?

you can achieve this in two ways  
  1. Using standard Functoids
  2. XSLT call Template 

Both performs same action but your Mapping sheet would be easy and understandable if one uses a XSLT call template.


Option 1 : Using standard Functoids


in above map I have Name element which I need to perform nill check. This works perfectly but you would need more time to add 4 functoids for each element.

Option2 : XSLT Call Tempalte
I am using the below XSLT Call template for POID element which  performs same checks like standards functoids




Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com