il***@igsoftwaresolutions.co.uk wrote:
I have a web service that I have written. It is written in C#
I want to use this web service from a browser, but my users all have
different browsers so its important that the code to access the web
service works across IE, Firefox and other browsers
IE/Win has the web service behaviour to allow to make SOAP requests to a
web service where the behviour does all the SOAP encapsulation for you
and your script just calls methods and passes arguments and receives values.
<http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/webservice_node_entry.asp>
Mozilla has two APIs to deal with web services, a low level SOAP API and
a high level WSDL proxy API, the latter again hides all SOAP stuff and
simply loads the WSDL description of the web service to create a
client-side proxy object which then has the methods of the service to be
called by your code.
<http://www.mozilla.org/projects/webservices/>
However interoperability of the Mozilla APIs with .NET web services is
not as you might want it or need it.
Other browsers like Opera or Safari (as far as I am aware) do not have
any special APIs to deal with web services besides providing an
implementation of the XMLHttpRequest object so you have a chance to use
that to either
- build SOAP requests yourself as an XML DOM document, set the SOAP
action as a HTTP request header and make the request, receive the SOAP
response and parse it yourself
- or to forget about SOAP and simply try to make normal POST requests to
the web service. .NET web services can be configured to not only allow
SOAP requests but also GET or POST HTTP requests with Content-Type
application/x-www-form-urlencoded data.
--
Martin Honnen
http://JavaScript.FAQTs.com/