Re: Dynamic binding in webservices



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" <ballen@xxxxxxxxxxxxxxxxx> wrote in message
news:664441632509797281944176@xxxxxxxxxxxxxxxxxxxxxxx
>> 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
>
>
>
>


.



Relevant Pages

  • Re: publishing Hello World to local IIS
    ... "Decorate" means to beautify to me and I was at a loss as to how that worked with web services. ... The "WebMethodAttribute" I mentioned is used to indicate that a certain class method of the webservice class should be exposed as "webmethod". ... Public Function HelloWorld() As String ... Public Class Service1 ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: use SOAP header for asp.net session state
    ... We are creating web services for our customer to get data in and out of the system. ... HttpWebRequest class to send/receive webservice request/response SOAP ... cookie returned from server-side ASP.NET webservice. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Dynamic binding in webservices
    ... > My code uses web services to transfer some secure data over SSL. ... > webservice which is triggered by an asp page. ... Then to work wiht the XML ... >> you can use the classes from the System.Xml namespace (like ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Webservice Callbacks
    ... and needs to tell the calling application. ... > Asynchronous Web Service Calls over HTTP with the .NET Framework ... which allow for efficient calls to Web services without blocking ... >> have a webservice with functions etc, no problems there, but some tasks ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Business Objects / COM+ / MTS
    ... could be two seperate assemblies made available through .net remoting. ... CF> multiple web services using Microsoft and .Net. ... wsUpdateChecking- this webservice will update the amount ... If either call failed, the entire transaction ...
    (microsoft.public.dotnet.distributed_apps)