none
BTS2006 R2 still lacking WS interoperability RRS feed

  • Question

  •  

    Try referencing the Web Services exposed by a Systinet UDDI Registry... No way you can use them.

    This is especially because Systinet Registry follows the Best Practices of having modular WSDL composed of reusable pieces (schemas, interfaces, bindings, services) and BizTalk is still uncapable (since 2004... sigh) of parsing modular WSDLs.

    Now read this page http://msdn.microsoft.com/en-us/library/aa561724.aspx and tell me how you can believe BizTalk can survive in a multi-vendor SOA environment: no way.

     

    Now, since I cannot access Systinet UDDI Web Services from a normal WCF Send Port, I developed a serializable WCF class that incapsulates the interaction with the UDDI.

    I planned to use it in an Expression shape but... oh...oh... there's no way I can access the servicemodel configuration section to read the client parameters in the BtsNTSvc.exe.config file.

    I tried everything, even the external configuration file. It works for every other parameter I put but not for the servicemodel.

     

    Can some MS expert tell me how to do it?

     

        Thanks

       Tom

    Tuesday, May 6, 2008 4:20 PM

All replies

  • Hi Tom,

    You should be able to access any configuration section including system.ServiceModel in the BTSNTSVC.exe.config file from any BizTalk component hosted by the BTSNTSVC process.

     

    I tried your scenario and I was able to access the client settings from a serizalized custom component using an expression shape.

     

    Here is what I did:

     

    1.Updated the BTSNTSVC.exe.config file as follows

     

    Code Snippet

    <system.serviceModel>

    <client>

    <endpoint name="netTcpEndpoint"

    address="net.tcp://localhost:8235/myservice1"

    binding="netTcpBinding"

    bindingConfiguration="netTcp"

    contract="WcfClient.IReceive">

    </endpoint>

    </client>

    <bindings>

    <netTcpBinding>

    <binding name="netTcp" maxReceivedMessageSize ="5000000">

    <security mode="None"></security>

    </binding>

    </netTcpBinding>

    </bindings>

    </system.serviceModel>

     

     

     

    2.Created a serializable WCF client class

     

    Code Snippet

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.ServiceModel.Channels;

    using System.ServiceModel;

    using System.ServiceModel.Configuration;

    using System.Configuration;

    namespace WcfClient

    {

    [Serializable]

    public class Client

    {

    public void Run()

    {

    //ClientSection clientSection = ConfigurationManager.GetSection("system.serviceModel/client") as ClientSection;

    ChannelFactory<IReceive> factory = new ChannelFactory<IReceive>("netTcpEndpoint");

    IReceive receiver = factory.CreateChannel();

    string messageBody = "test";

    Message msg = Message.CreateMessage(MessageVersion.Default, "http://tempuri.org/IReceive/Receive", messageBody);

    Message reply = receiver.Receive(msg);

    }

    }

    [ServiceContract]

    public interface IReceive

    {

    [OperationContract(ReplyAction = "*")]

    Message Receive(Message message);

    }

    }

     

     

    Compiled and GACed it.

     

    3.Created a simple WCF service with a NetTcp endpoint listening at the address net.tcp://localhost:8235/myservice1

     

    4. Created a BizTalk orchestration project. Added a reference to my WCF client assembly. Defined a variable(client) and set its type to my client(WcfClient.Client) by browsing to it. Added an expression shape and set its expression to client.Run();

     

    5. Deployed the orchestration, restarted the service

     

    6. Submitted a message through that orhestration

     

    After all, I was able to submit a message to my remote service. If you look at the WCF client code, I'm reading the endpoint configuration from the config file.

     

    You can also access the client config section using the following code in the client .

     

    ClientSection clientSection = ConfigurationManager.GetSection("system.serviceModel/client") as ClientSection;

     

     

    Hope this helps,

    -Karahan

    Monday, June 2, 2008 3:36 AM