Monday 28 June 2010

Adding BasicHttp Binding OnRamps to ESB Toolkit

ESB Toolkit comes with few default OnRamps which use WSHttp bindings.
If you want to use BasicHttp binding, you need to do following:

1. Run the Biztalk WCF Service Publishing Wizard to create a new Service

a. Choose option Publish Schemas as WCF Service.




b. Give the Service your desired name. Keep Operation name as "SubmitRequestResponse".

c. For Request and Response choose schema: Microsoft.XLANGs.BaseTypes.dll#Any



2. Modify the Web.config file of the new Service.

a. Under System.ServiceModel element add:

<extensions><behaviorExtensions><add name="soapHeaderMetadata"
type="Microsoft.Practices.ESB.ServiceModel.Helpers.SoapHeaderMetadataExtensionElement
, Microsoft.Practices.ESB.ServiceModel.Helpers, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/></behaviorExtensions></extensions>

b. Under behaviors add:

<soapHeaderMetadata enabled="true">
<soapHeaders>
<add headerTypeName="ItineraryDescription" operation="SubmitRequestResponse" message="ItineraryDescription"
operationType="Input"
targetNamespace="http://schemas.microsoft.biztalk.practices.esb.com/itinerary"
xsdFileName="ItineraryDescription.xsd"/>
</soapHeaders>
</soapHeaderMetadata>
3. Once the Wizard completes, it will create a Service in IIS and a Receive Location(On Ramp). 
Make sure to create a seperate App Pool for this new service. You cannot have both the services(ESB default and new one) runnning under same App Pool. 
4. On Ramp needs to be modified now. 
a. Modify the pipelines. Choose the same pipelines as in default ESB On Ramp(ItinerarySelectReceiveXml). 
b. Configure the adapter. You can keep Security settings according to your need(None, Transport etc.). Message tab needs to be modified same as WSHttp adapter on default On Ramp. 



This basicHttp On Ramp is now ready.

No comments:

Post a Comment