Question about web service which execute javawebservices from .net client.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anil S

    Question about web service which execute javawebservices from .net client.

    Hello,

    my application is console application and I have created "Service Reference" of the webservices. this webservice uses username and password. my code are following:

    myArray[] nl;

    FeedSoapClient client = new FeedSoapClient( );
    client.ClientCr edentials.UserN ame.UserName = "tellme";
    client.ClientCr edentials.UserN ame.Password = "tellme";


    nl = client.getCustI nfo();
    int i = 0;
    while (i <= (nl.Length - 1))
    {
    Console.WriteLi ne(nl[i].name + " " + nl[i].address);
    i++;
    }


    ERROR which I am getting, is this:

    System.Configur ation.Configura tionErrorsExcep tion: The value of the property 'cl
    ientCredentialT ype' cannot be parsed. The error is: The enumeration value must b
    e one of the following: None, Basic, Digest, Ntlm, Windows, Certificate. (C:\Use
    rs\localhost\Do cuments\Visual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retri
    eveRTDataFromNY ISO\bin\Debug\R etrieveRTDataFr omNYISO.exe.Con fig line 28)
    at System.Configur ation.BaseConfi gurationRecord. EvaluateOne(Str ing[] keys, Se
    ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord
    sectionRecord, Object parentResult)
    at System.Configur ation.BaseConfi gurationRecord. Evaluate(Factor yRecord factor
    yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boole
    an getRuntimeObjec t, Object& result, Object& resultRuntimeOb ject)
    at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey,
    Boolean getLkg, Boolean checkPermission )
    at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey)
    at System.Configur ation.ClientCon figurationSyste m.System.Config uration.Intern
    al.IInternalCon figSystem.GetSe ction(String sectionName)
    at System.Configur ation.Configura tionManager.Get Section(String sectionName)
    at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetSectionFro
    mConfigurationM anager(String sectionPath)
    at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetAssociated
    Section(Context Information evalContext, String sectionPath)
    at System.ServiceM odel.Configurat ion.ClientSecti on.UnsafeGetSec tion()
    at System.ServiceM odel.Descriptio n.ConfigLoader. LookupChannel(S tring configur
    ationName, String contractName, Boolean wildcard)
    at System.ServiceM odel.Descriptio n.ConfigLoader. LoadChannelBeha viors(ServiceE
    ndpoint serviceEndpoint , String configurationNa me)
    at System.ServiceM odel.ChannelFac tory.ApplyConfi guration(String configuration
    Name)
    at System.ServiceM odel.ChannelFac tory.Initialize Endpoint(String configuration
    Name, EndpointAddress address)
    at System.ServiceM odel.ChannelFac tory`1..ctor(St ring endpointConfigu rationNam
    e, EndpointAddress remoteAddress)
    at System.ServiceM odel.EndpointTr ait`1.CreateSim plexFactory()
    at System.ServiceM odel.EndpointTr ait`1.CreateCha nnelFactory()
    at System.ServiceM odel.ClientBase `1.CreateChanne lFactoryRef(End pointTrait`1 e
    ndpointTrait)
    at System.ServiceM odel.ClientBase `1.InitializeCh annelFactoryRef ()
    at System.ServiceM odel.ClientBase `1..ctor()
    at RetrieveRTDataF romNYISO.Servic eReference.eDat aFeedSoapClient ..ctor() in C:
    \Users\localhos t\Documents\Vis ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\R
    etrieveRTDataFr omNYISO\Service References\Serv iceReference\Re ference.cs:line 154
    5
    at RetrieveRTDataF romNYISO.Progra m.Main() in C:\Users\localh ost\Documents\V is
    ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retriev eRTDataFromNYIS O\Program
    ..cs:line 26


    can you tell me how to fix this problem? According to me, it is not accepting the username and password.

  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Question about web service which execute java webservices from .net client.

    It is not so much a refusal as not setting a credential type at all. After
    you solve this, I bet you start to uncover other issues.

    Unfortunately, there is only one book out there on C# and Java with web
    services (or one that I know of that targets that topic) and it is not that
    good.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog


    or just read it:


    *************** *************** **************
    | Think outside the box! |
    *************** *************** **************
    "Anil S" wrote in message news:2008929115 247anilraja3@ya hoo.com...
    Hello,
    >
    my application is console application and I have created "Service
    Reference" of the webservices. this webservice uses username and password.
    my code are following:
    >
    myArray[] nl;
    >
    FeedSoapClient client = new FeedSoapClient( );
    client.ClientCr edentials.UserN ame.UserName = "tellme";
    client.ClientCr edentials.UserN ame.Password = "tellme";
    >
    >
    nl = client.getCustI nfo();
    int i = 0;
    while (i <= (nl.Length - 1))
    {
    Console.WriteLi ne(nl[i].name + " " + nl[i].address);
    i++;
    }
    >
    >
    ERROR which I am getting, is this:
    >
    System.Configur ation.Configura tionErrorsExcep tion: The value of the
    property 'cl
    ientCredentialT ype' cannot be parsed. The error is: The enumeration value
    must b
    e one of the following: None, Basic, Digest, Ntlm, Windows, Certificate.
    (C:\Use
    rs\localhost\Do cuments\Visual Studio
    2008\Projects\R etrieveRTDataFr omNYISO\Retri
    eveRTDataFromNY ISO\bin\Debug\R etrieveRTDataFr omNYISO.exe.Con fig line 28)
    at System.Configur ation.BaseConfi gurationRecord. EvaluateOne(Str ing[]
    keys, Se
    ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord,
    SectionRecord
    sectionRecord, Object parentResult)
    at System.Configur ation.BaseConfi gurationRecord. Evaluate(Factor yRecord
    factor
    yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg,
    Boole
    an getRuntimeObjec t, Object& result, Object& resultRuntimeOb ject)
    at
    System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean
    getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at
    System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean
    getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at
    System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
    nfigKey, Boolean getLkg, Boolean checkPermission , Boolean
    getRuntimeObjec t, Bool
    ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
    at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng
    configKey,
    Boolean getLkg, Boolean checkPermission )
    at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng
    configKey)
    at
    System.Configur ation.ClientCon figurationSyste m.System.Config uration.Intern
    al.IInternalCon figSystem.GetSe ction(String sectionName)
    at System.Configur ation.Configura tionManager.Get Section(String
    sectionName)
    at
    System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetSectionFro
    mConfigurationM anager(String sectionPath)
    at
    System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetAssociated
    Section(Context Information evalContext, String sectionPath)
    at System.ServiceM odel.Configurat ion.ClientSecti on.UnsafeGetSec tion()
    at System.ServiceM odel.Descriptio n.ConfigLoader. LookupChannel(S tring
    configur
    ationName, String contractName, Boolean wildcard)
    at
    System.ServiceM odel.Descriptio n.ConfigLoader. LoadChannelBeha viors(ServiceE
    ndpoint serviceEndpoint , String configurationNa me)
    at System.ServiceM odel.ChannelFac tory.ApplyConfi guration(String
    configuration
    Name)
    at System.ServiceM odel.ChannelFac tory.Initialize Endpoint(String
    configuration
    Name, EndpointAddress address)
    at System.ServiceM odel.ChannelFac tory`1..ctor(St ring
    endpointConfigu rationNam
    e, EndpointAddress remoteAddress)
    at System.ServiceM odel.EndpointTr ait`1.CreateSim plexFactory()
    at System.ServiceM odel.EndpointTr ait`1.CreateCha nnelFactory()
    at
    System.ServiceM odel.ClientBase `1.CreateChanne lFactoryRef(End pointTrait`1 e
    ndpointTrait)
    at System.ServiceM odel.ClientBase `1.InitializeCh annelFactoryRef ()
    at System.ServiceM odel.ClientBase `1..ctor()
    at RetrieveRTDataF romNYISO.Servic eReference.eDat aFeedSoapClient ..ctor()
    in C:
    \Users\localhos t\Documents\Vis ual Studio
    2008\Projects\R etrieveRTDataFr omNYISO\R
    etrieveRTDataFr omNYISO\Service
    References\Serv iceReference\Re ference.cs:line 154
    5
    at RetrieveRTDataF romNYISO.Progra m.Main() in
    C:\Users\localh ost\Documents\V is
    ual Studio
    2008\Projects\R etrieveRTDataFr omNYISO\Retriev eRTDataFromNYIS O\Program
    .cs:line 26
    >
    >
    can you tell me how to fix this problem? According to me, it is not
    accepting the username and password.
    >

    Comment

    • Anil S

      #3
      Here is my app.config file if it helps

      <system.service Model>
      <bindings>
      <basicHttpBindi ng>
      <binding name="eFeedSoap " closeTimeout="0 0:01:00" openTimeout="00 :01:00"
      receiveTimeout= "00:10:00" sendTimeout="00 :01:00" allowCookies="f alse"
      bypassProxyOnLo cal="false" hostNameCompari sonMode="Strong Wildcard"
      maxBufferSize=" 65536" maxBufferPoolSi ze="524288" maxReceivedMess ageSize="65536"
      messageEncoding ="Text" textEncoding="u tf-8" transferMode="B uffered"
      useDefaultWebPr oxy="true">
      <readerQuotas maxDepth="32" maxStringConten tLength="8192" maxArrayLength= "16384"
      maxBytesPerRead ="4096" maxNameTableCha rCount="16384" />
      <security mode="Transport ">
      <transport clientCredentia lType="Basic" proxyCredential Type="Basic" realm="" />
      <message clientCredentia lType="UserName " algorithmSuite= "Default" />
      </security>
      </binding>
      </basicHttpBindin g>
      </bindings>
      <client>
      <endpoint address="https://efeed.test.com/efeed/eFeed.jws?WSDL= "
      binding="basicH ttpBinding" bindingConfigur ation="eFeedSoa p"
      contract="Servi ceReference.eFe edSoap" name="eFeedSoap " />
      </client>

      </system.serviceM odel>

      Comment

      • Anil S

        #4
        Here is my app.config file if it helps

        <system.service Model>
        <bindings>
        <basicHttpBindi ng>
        <binding name="eFeedSoap " closeTimeout="0 0:01:00" openTimeout="00 :01:00"
        receiveTimeout= "00:10:00" sendTimeout="00 :01:00" allowCookies="f alse"
        bypassProxyOnLo cal="false" hostNameCompari sonMode="Strong Wildcard"
        maxBufferSize=" 65536" maxBufferPoolSi ze="524288" maxReceivedMess ageSize="65536"
        messageEncoding ="Text" textEncoding="u tf-8" transferMode="B uffered"
        useDefaultWebPr oxy="true">
        <readerQuotas maxDepth="32" maxStringConten tLength="8192" maxArrayLength= "16384"
        maxBytesPerRead ="4096" maxNameTableCha rCount="16384" />
        <security mode="Transport ">
        <transport clientCredentia lType="Basic" proxyCredential Type="Basic" realm="" />
        <message clientCredentia lType="UserName " algorithmSuite= "Default" />
        </security>
        </binding>
        </basicHttpBindin g>
        </bindings>
        <client>
        <endpoint address="https://efeed.test.com: 443/efeed/eFeed.jws?WSDL= "
        binding="basicH ttpBinding" bindingConfigur ation="eFeedSoa p"
        contract="Servi ceReference.eFe edSoap" name="eFeedSoap " />
        </client>

        </system.serviceM odel>

        Comment

        Working...