Dynamic binding in webservices

Discussion in 'ASP .Net Web Services' started by Stoney el frío, May 6, 2005.

  1. hi, how can i make 'programatically' a dynamic binding to a webservice? what
    namespace or classes to use?

    thanks in advance...
     
    Stoney el frío, May 6, 2005
    #1
    1. Advertising

  2. Stoney el frío

    Brock Allen Guest

    > hi, how can i make 'programatically' a dynamic binding to a
    > webservice? what namespace or classes to use?
    >
    > thanks in advance...


    You mean how do you dynamically discover a web services' WSDL and then dynamically
    use that info to invove one of its operations?

    Well, you can do it all manually by accessing HTTP via System.Net.HttpWebRequest
    and HttpWebResponse. Then to work wiht the XML you can use the classes from
    the System.Xml namespace (like XmlDocument). This seems like an awful lot
    of work.

    Mindreef (http://www.mindreef.com/) might have a product that already does
    this.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
     
    Brock Allen, May 6, 2005
    #2
    1. Advertising

  3. I am working on this subject for whole day. Finally i did it. The keypoints
    are;
    1. Implement a class that is derived from
    System.Web.Services.Protocols.SoapHttpClientProtocol (Similar to VS.NET
    generated one but not it)
    2. Add a string url address parameter to constructor and set this.Url member
    variable.
    3. There should be a method which should have same name with your web
    service. use invoke to call your ws.
    4. For additional security purposes u should use
    System.Net.CredentialCache.DefaultCredentials

    My code uses web services to transfer some secure data over SSL. There are
    inner webservices whole are coordinated and managed by an asyncronous
    webservice which is triggered by an asp page. This works with no loss. But
    it cost me whole day programming... If it is not too necessary, my advice u
    to call webservice in a normal way. Does your webservice url change
    frequently ? If not use dynamic web service binding which will allow u to
    set web service URL with an XML based configuration file....


    --

    Thanks,
    Yunus Emre ALPÖZEN
    BSc, MCAD.NET

    "Brock Allen" <> wrote in message
    news:...
    >> hi, how can i make 'programatically' a dynamic binding to a
    >> webservice? what namespace or classes to use?
    >>
    >> thanks in advance...

    >
    > You mean how do you dynamically discover a web services' WSDL and then
    > dynamically use that info to invove one of its operations?
    >
    > Well, you can do it all manually by accessing HTTP via
    > System.Net.HttpWebRequest and HttpWebResponse. Then to work wiht the XML
    > you can use the classes from the System.Xml namespace (like XmlDocument).
    > This seems like an awful lot of work.
    >
    > Mindreef (http://www.mindreef.com/) might have a product that already does
    > this.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    >
     
    Yunus Emre ALPÖZEN [MCAD.NET], May 6, 2005
    #3
  4. Thank you. SoapHttpClientProtocol.Discover Is what I need...

    "Yunus Emre ALPÖZEN [MCAD.NET]" <> escribió en el
    mensaje news:...
    > I am working on this subject for whole day. Finally i did it. The

    keypoints
    > are;
    > 1. Implement a class that is derived from
    > System.Web.Services.Protocols.SoapHttpClientProtocol (Similar to VS.NET
    > generated one but not it)
    > 2. Add a string url address parameter to constructor and set this.Url

    member
    > variable.
    > 3. There should be a method which should have same name with your web
    > service. use invoke to call your ws.
    > 4. For additional security purposes u should use
    > System.Net.CredentialCache.DefaultCredentials
    >
    > My code uses web services to transfer some secure data over SSL. There are
    > inner webservices whole are coordinated and managed by an asyncronous
    > webservice which is triggered by an asp page. This works with no loss. But
    > it cost me whole day programming... If it is not too necessary, my advice

    u
    > to call webservice in a normal way. Does your webservice url change
    > frequently ? If not use dynamic web service binding which will allow u to
    > set web service URL with an XML based configuration file....
    >
    >
    > --
    >
    > Thanks,
    > Yunus Emre ALPÖZEN
    > BSc, MCAD.NET
    >
    > "Brock Allen" <> wrote in message
    > news:...
    > >> hi, how can i make 'programatically' a dynamic binding to a
    > >> webservice? what namespace or classes to use?
    > >>
    > >> thanks in advance...

    > >
    > > You mean how do you dynamically discover a web services' WSDL and then
    > > dynamically use that info to invove one of its operations?
    > >
    > > Well, you can do it all manually by accessing HTTP via
    > > System.Net.HttpWebRequest and HttpWebResponse. Then to work wiht the XML
    > > you can use the classes from the System.Xml namespace (like

    XmlDocument).
    > > This seems like an awful lot of work.
    > >
    > > Mindreef (http://www.mindreef.com/) might have a product that already

    does
    > > this.
    > >
    > > -Brock
    > > DevelopMentor
    > > http://staff.develop.com/ballen
    > >
    > >
    > >
    > >

    >
    >
     
    Stoney el frío, May 9, 2005
    #4
    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. Jordan
    Replies:
    2
    Views:
    2,538
    Jordan
    Feb 10, 2004
  2. Amit
    Replies:
    6
    Views:
    13,809
    Assimalyst
    Oct 24, 2006
  3. Replies:
    2
    Views:
    866
    Kevin Grover
    Oct 20, 2006
  4. JcFx
    Replies:
    0
    Views:
    281
  5. Chankas

    dynamic WebServices

    Chankas, Nov 17, 2003, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    150
    Manni
    Nov 18, 2003
Loading...

Share This Page