none
using wcf service exposed by Biztalk RRS feed

  • Question

  • hi,

    i try to use a wcf service that i exposed from a biztalk orchestration 

    the orchestration extraxt data from sql server 

    i have referenced my service  in a console application 

    i don t know how to use it to extract data from sql server 

    i tryed with this code 

     

    class Program

        {

            private static dataconsumeType[][] docrootelem;

            static void Main(string[] args)

            {

                BiztalkService.WcfService_EXPOSESQLDATAClient Client = null;

                Client = new WcfService_EXPOSESQLDATAClient();

               Client.procedure(docrootelem);

               Console.Write(docrootelem[1][1]);

     

            }

    and i have this exception 

    An exception has been thrown by the type initializer for 'System.ServiceModel.Diagnostics.TraceUtility'.

    {"Failed to initialize the system configuration"}

    any idea please

        }

     

    Friday, October 28, 2011 9:29 AM

Answers

All replies

  • Summary of WCF service description
    <?xml version="1.0" encoding="utf-16"?>
    <WcfServiceDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="EXPOSESQLDATA" Description="BizTalk assembly &quot;EXPOSESQLDATA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6d3344d8c429794&quot; published WCF service." TargetNamespace="http://tempuri.org/" xmlns="http://schemas.microsoft.com/BizTalk/2006/01/Adapter/Wcf/Publishing">
      <LocationSettings Location="http://localhost/EXPOSESQLDATA" Overwrite="false" AuthAnonymous="true" />
      <ApplicationSettings CreateReceiveLocations="true" ApplicationName="EXPOSESQLDATA" />
      <AdapterSettings AdapterName="WCF-BasicHttp" />
      <MetadataSettings EnableMetadata="true" MetadataOnly="false" ReceiveLocationName="" />
      <WcfServices>
        <WcfService Name="WcfService_EXPOSESQLDATA" Description="service &quot;*&quot; port &quot;*&quot;">
          <WcfOperations>
            <WcfOperation Name="procedure" Description="operation &quot;procedure&quot;" Flow="OneWay">
              <WcfMessages>
                <WcfMessage Name="__messagetype_EXPOSESQLDATA_SQLService" Description="EXPOSESQLDATA.__messagetype_EXPOSESQLDATA_SQLService, EXPOSESQLDATA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6d3344d8c429794" Direction="Input">
                  <WcfMessageType Category="XsdType" TypeName="EXPOSESQLDATA.SQLService" AssemblyName="EXPOSESQLDATA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6d3344d8c429794" AssemblyLocation="C:\Windows\Microsoft.Net\assembly\GAC_MSIL\EXPOSESQLDATA\v4.0_1.0.0.0__f6d3344d8c429794\EXPOSESQLDATA.dll" TargetNamespace="http://mysqlreceive" RootName="docrootelem" IsAnyType="false" IsEnvelope="false" />
                </WcfMessage>
              </WcfMessages>
            </WcfOperation>
          </WcfOperations>
        </WcfService>
      </WcfServices>
    </WcfServiceDescription>
    Friday, October 28, 2011 9:30 AM
  • Does your console application have a configuration file? (called App.Config). In this file various WCF configurations should be appended. This should happen automatically if you have made a service reference inside Visual Studio. It sounds to me that there is some mis-configuration concerning trace inside App.Config. Could you show the content here?

     

    Morten la Cour

    Friday, October 28, 2011 10:11 AM
  • Check this thread from the WCF forums for a possible cause and resolution. HTH
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Friday, October 28, 2011 10:24 AM