none
deploy wcf send port without binding file RRS feed

  • Question

  • I made an application which exports a receive port as wcf service. With the wcf publishing wizard the deployment went well on the biztalk server. The party that would hit this service also has a biztalk server. So I made a second application that would be the client for the first application. Since the port type and message types and schemas would me the same as the first application, I made a biztalk assembly containing the common artifacts (schema and an orchestration for port type definition). The orchestration of the first application uses the port type from the common assebly as a receive port. The application deployment with wcf publishing wizard went well.

    the second application uses the comon port type as a send port. but since the port type was not generated by the wcf adapter wizard inside visual studio... i dont have a binding xml file to import in the second application deployment

    except from the obvious solution to use generated items from consuming wizard in the second application.....

    1) is there a way to generate a binding file given a port type and schema?

    2) is there a way to make the the wcf send port somehow without doing all the configuration manually?

     

    thanks in advance

    Tuesday, February 8, 2011 1:57 PM

Answers

  • Hi,

    Sorry I didnt fully read your first post....

    If you add a service reference to a BizTalk project in Visual Studio you will get two bonding files created. One for the WCF adaper used for the receive port (BasicHttp or WsHttp) and the other for a WCF Custom binding.

    You can use any of these binding files to create a send port in the other application.

    Regards,

    Alan

     


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    Tuesday, February 8, 2011 2:48 PM

All replies

  • Hi,

    If you export the binding file for the application you can then edit it in Visual Studio. Remove all the other artifatcs, leaving only the WCF send port. You can then import that binding on another environemnt to create the send port.

    Regards,

    Alan

     


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    Tuesday, February 8, 2011 2:18 PM
  • sorry but I dont understand.

    export the binding file from the first (serviing) application?

    if i export bindings from the first application it contains among others the following info about the WCF receive port

    - <ReceivePort Name="WcfReceivePort_NVISService/PoliceReply" IsTwoWay="true" BindingOption="1">

    <Description xsi:nil="true" />

    - <ReceiveLocations>

    - <ReceiveLocation Name="WcfService_NVISService/PoliceReply">

    <Description xsi:nil="true" />

    <Address>/NVISService/PoliceReply.svc</Address>

    <PublicAddress />

    <Primary>true</Primary>

    <ReceiveLocationServiceWindowEnabled>false</ReceiveLocationServiceWindowEnabled>

    <ReceiveLocationFromTime>2000-01-01T00:00:00</ReceiveLocationFromTime>

    <ReceiveLocationToTime>2000-01-01T23:59:59</ReceiveLocationToTime>

    <ReceiveLocationStartDateEnabled>false</ReceiveLocationStartDateEnabled>

    <ReceiveLocationStartDate>2000-01-01T00:00:00</ReceiveLocationStartDate>

    <ReceiveLocationEndDateEnabled>false</ReceiveLocationEndDateEnabled>

    <ReceiveLocationEndDate>2000-01-01T23:59:59</ReceiveLocationEndDate>

    <ReceiveLocationTransportType Name="WCF-BasicHttp" Capabilities="899" ConfigurationClsid="467c1a52-373f-4f09-9008-27af6b985f14" />

    <ReceiveLocationTransportTypeData><CustomProps><UseSSO vt="11">0</UseSSO><InboundBodyLocation vt="8">UseBodyElement</InboundBodyLocation><MessageClientCredentialType vt="8">UserName</MessageClientCredentialType><SendTimeout vt="8">00:01:00</SendTimeout><OutboundXmlTemplate vt="8">&lt;bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="xml"/&gt;</OutboundXmlTemplate><OpenTimeout vt="8">00:01:00</OpenTimeout><AlgorithmSuite vt="8">Basic256</AlgorithmSuite><SecurityMode vt="8">None</SecurityMode><TransportClientCredentialType vt="8">None</TransportClientCredentialType><MaxReceivedMessageSize vt="3">65536</MaxReceivedMessageSize><CloseTimeout vt="8">00:01:00</CloseTimeout><SuspendMessageOnFailure vt="11">0</SuspendMessageOnFailure><InboundNodeEncoding vt="8">Xml</InboundNodeEncoding><IncludeExceptionDetailInFaults vt="11">0</IncludeExceptionDetailInFaults><MaxConcurrentCalls vt="3">200</MaxConcurrentCalls><MessageEncoding vt="8">Text</MessageEncoding><OutboundBodyLocation vt="8">UseBodyElement</OutboundBodyLocation></CustomProps></ReceiveLocationTransportTypeData>

    <ReceivePipeline Name="Microsoft.BizTalk.DefaultPipelines.XMLReceive" FullyQualifiedName="Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="1" TrackingOption="ServiceStartEnd MessageSendReceive PipelineEvents" Description="" />

    <ReceivePipelineData xsi:nil="true" />

    <SendPipeline Name="Microsoft.BizTalk.DefaultPipelines.XMLTransmit" FullyQualifiedName="Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="2" TrackingOption="ServiceStartEnd MessageSendReceive PipelineEvents" Description="" />

    <SendPipelineData xsi:nil="true" />

    <Enable>true</Enable>

    - <ReceiveHandler Name="BizTalkServerIsolatedHost" HostTrusted="false">

    <TransportType Name="WCF-BasicHttp" Capabilities="899" ConfigurationClsid="467c1a52-373f-4f09-9008-27af6b985f14" />

    </ReceiveHandler>

    </ReceiveLocation>

    how this can be imported in the second application on the second server as a send port?

    Tuesday, February 8, 2011 2:37 PM
  • Hi,

    Sorry I didnt fully read your first post....

    If you add a service reference to a BizTalk project in Visual Studio you will get two bonding files created. One for the WCF adaper used for the receive port (BasicHttp or WsHttp) and the other for a WCF Custom binding.

    You can use any of these binding files to create a send port in the other application.

    Regards,

    Alan

     


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    Tuesday, February 8, 2011 2:48 PM
  • oh ok... that was what I mentioned in the "except" section of my first port

    I thought I could use a shared assembly for both send and receive ports since its the service and the client sides of the same coin(the port type itself does not know id it is a send or receive port).

    I could generate the client from the start as a straight solution but I am a "reuse code" guy. (If a change something in the common type it would be deployed as is to both ends).

    I could configure the send port by hand but I am lazy. :)

    Tuesday, February 8, 2011 2:56 PM
  • Hi, regarding "If you export the binding file for the application you can then edit it in Visual Studio"

    I experienced problems when doing that for BTS2009. The filters for the port did not work after editing the binding file i Visual Studio.

    VS formats the XML correclty but it seems like BTS needs it formatted i an special way (no CR's after the starting tag in the filter section). I'm am editing my binding files in Notepad now insteda since it does not understand XML and does formatting of the XML.

    Wednesday, March 23, 2011 11:27 AM