C# Client (SoapHttpClientProtocol) and Secure Web Service

Discussion in 'ASP .Net Web Services' started by todd, May 28, 2004.

  1. todd

    todd Guest

    I am having trouble coding this simple soap client to submit a soap
    package over https to the desitnation URL. What do I need to do in my
    class in order to support client -> server soap exchange over secure
    sockets?

    Shouldn't this class SoapHttpClientProtocol handle the SSL stuff for
    me? Does it?

    What is supposed to be a simple test of the akamai purge api (there
    end is written in java I believe) has turned into a four day affair
    for me. Please help, any and all appreciated. Below is my
    testClass...


    [System.Web.Services.WebServiceBindingAttribute(Name="akTestSoap",
    Namespace="http://tempuri.org/")]
    public class akamaiTest :
    System.Web.Services.Protocols.SoapHttpClientProtocol
    {

    public akamaiTest() : base()
    {
    this.Url = "https://ccuapi.akamai.com:443/soap/servlet/soap/purge";
    }

    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    "http://tempuri.org/purgeRequest",
    RequestNamespace="http://tempuri.org/",
    ResponseNamespace="http://tempuri.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Literal,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public string purgeRequest(string name, string pwd, string dns,
    string[] options, string[] uris)
    {
    try
    {
    object[] results = this.Invoke("purgeRequest", new object[]
    {name,pwd,dns,options,uris});
    return ((string)(results[0]));
    }
    catch(Exception e)
    {
    return e.Message ;
    }
    }
    }
    todd, May 28, 2004
    #1
    1. Advertising

  2. todd

    Lucien Guest

    You're probably missing client credentials (you didn't give the error but
    that's my guess).

    myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;


    "todd" <> wrote in message
    news:...
    > I am having trouble coding this simple soap client to submit a soap
    > package over https to the desitnation URL. What do I need to do in my
    > class in order to support client -> server soap exchange over secure
    > sockets?
    >
    > Shouldn't this class SoapHttpClientProtocol handle the SSL stuff for
    > me? Does it?
    >
    > What is supposed to be a simple test of the akamai purge api (there
    > end is written in java I believe) has turned into a four day affair
    > for me. Please help, any and all appreciated. Below is my
    > testClass...
    >
    >
    > [System.Web.Services.WebServiceBindingAttribute(Name="akTestSoap",
    > Namespace="http://tempuri.org/")]
    > public class akamaiTest :
    > System.Web.Services.Protocols.SoapHttpClientProtocol
    > {
    >
    > public akamaiTest() : base()
    > {
    > this.Url = "https://ccuapi.akamai.com:443/soap/servlet/soap/purge";
    > }
    >
    > [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    > "http://tempuri.org/purgeRequest",
    > RequestNamespace="http://tempuri.org/",
    > ResponseNamespace="http://tempuri.org/",
    > Use=System.Web.Services.Description.SoapBindingUse.Literal,
    > ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    > public string purgeRequest(string name, string pwd, string dns,
    > string[] options, string[] uris)
    > {
    > try
    > {
    > object[] results = this.Invoke("purgeRequest", new object[]
    > {name,pwd,dns,options,uris});
    > return ((string)(results[0]));
    > }
    > catch(Exception e)
    > {
    > return e.Message ;
    > }
    > }
    > }
    Lucien, May 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott McFadden

    SoapHttpClientProtocol and Keep-Alive

    Scott McFadden, Oct 8, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    499
    Scott McFadden
    Oct 8, 2003
  2. Soheil

    Overriding SoapHttpClientProtocol.GetWebResponse

    Soheil, Sep 7, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    223
    Soheil
    Sep 7, 2004
  3. Cheung Wai Lun

    SoapHttpClientProtocol.Invoke method problem

    Cheung Wai Lun, Jul 21, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    243
    Cheung Wai Lun
    Jul 21, 2005
  4. manish pendse
    Replies:
    0
    Views:
    183
    manish pendse
    Aug 21, 2005
  5. Ojas
    Replies:
    0
    Views:
    884
Loading...

Share This Page