Calling Web Services from independent browser using javascript

N

Nuno

Hello,

I'm trying to call some web services only using javascript from a html
page. I succeeded on doind this in IE with the use of the
behavior:url(webservice.htc); (technique founded in the microsft site)
but when i'm going to try this in a diferente browser (firefox for
example) the behavior command is not accepted in this browser. So i
try to find why and i don't understand, but i found a way of calling
web services using the mozila way (using the WebServiceProxyFactory).

Now i have two problems:
One is that i can't call any of the methods implemented in my web
service (it was a web service that i develop using the visual web
developer 2005 express edition) using the mozila way
(WebServiceProxyFactory). It allways throw an exception when i call
the specific method in the proxy object. Even in the default method
created by the wizard (HelloWorld) the exception gives "Not enough
parameters" and when i use som methods that have parameter it allways
give "Could not convert JavaScript argument", allways allways... i
can't figure what is wrong... i'm guessing that is the web service
that do not support this things?!?!

The other one is that i only know this two techniques to call web
services from javascript, and they are dependent of the browser!! is
there any technique that is not dependent of the browser? or they are
all dependent of the browser??

Can someone help me in this two problems?
Nuno
 
M

Martin Honnen

Nuno said:
The other one is that i only know this two techniques to call web
services from javascript, and they are dependent of the browser!! is
there any technique that is not dependent of the browser? or they are
all dependent of the browser??

You could use XMLHttpRequest (respectively Msxml2.XMLHTTP.3.0 in IE) to
make requests to a web service but that way you have to deal with SOAP
messages in your code. It is not as easy as using a proxy but it has
much better cross-browser support.
 
M

Martin Honnen

-Lost said:
Why not Msxml2.XMLHTTP.4.0?

Mainly because IE 6 comes with MSXML 3 so you can be sure that
Msxml2.XMLHTTP.3.0 (which is a program id for MSXML 3) is available with
IE 6 while MSXML 4 is not necessarily available. Futhermore the
Microsoft XML team has already announced that MSXML 4 is going to be
"kill bit-ed"
<http://blogs.msdn.com/xmlteam/archive/2007/03/12/msxml4-is-going-to-be-kill-bit-ed.aspx>
so then you will not be able to create MSXML 4 objects in IE even if
MSXML 4 is installed on the client.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top