Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

Dynamic binding in webservices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stoney el frío - 06 May 2005 08:47 GMT
hi, how can i make 'programatically' a dynamic binding to a webservice? what
namespace or classes to use?

thanks in advance...
Brock Allen - 06 May 2005 17:35 GMT
> 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] - 06 May 2005 19:33 GMT
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....

Signature

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

>> hi, how can i make 'programatically' a dynamic binding to a
>> webservice? what namespace or classes to use?
[quoted text clipped - 15 lines]
> DevelopMentor
> http://staff.develop.com/ballen
Stoney el frío - 09 May 2005 12:59 GMT
Thank you. SoapHttpClientProtocol.Discover Is what I need...

> I am working on this subject for whole day. Finally i did it. The keypoints
> are;
[quoted text clipped - 35 lines]
> > DevelopMentor
> > http://staff.develop.com/ballen

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.