Dynamic binding in webservices

  • Thread starter Stoney el frío
  • Start date
S

Stoney el frío

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

thanks in advance...
 
B

Brock Allen

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.
 
Y

Yunus Emre ALPÖZEN [MCAD.NET]

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....
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top