473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Calling Web Services from independent browser using javascript

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

Jul 12 '07 #1
4 2486
Nuno wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 12 '07 #2
Martin Honnen wrote:
Nuno wrote:
>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.
Why not Msxml2.XMLHTTP.4.0?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jul 12 '07 #3
-Lost wrote:
>You could use XMLHttpRequest (respectively Msxml2.XMLHTTP.3.0 in IE)
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 13 '07 #4
I would suggest using a third party web service JS library to do this
job. The lib mostly will be cross platform. Following is a good
example. It's cross platform.

http://www.ibm.com/developerworks/we...ary/ws-wsajax/

Jul 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: niftyhawk | last post by:
Hi, Can anybody give me a simple example of how to Call Web Services from Mozilla based Browsers ? I can call web services from IE browser using web service behavior file, without any problems....
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
6
by: szabelin | last post by:
Hello, I am trying to call a function inside the javascript block from asp.net during the postback (NOT button's OnClick event handler though). The javascript function creates new popup window. I...
5
by: YR | last post by:
Hello, I am tasked to write an application for a travel agency, that should be able to get a price for airline tickets from airline's website. Generally, airlines don't provide any web services...
5
by: Ganesh Ramamurthy | last post by:
Hi Experts, I have written a .net Web Service. I want to invoke a web method from the webservice, pass parameters to the webservice and get the resultant value from the web service using...
2
by: Frank | last post by:
Hi, Newbie wondering if it is possible to call an ASP.NET 2.0 WebService from javascript that isn't served up on the same server? For example, I would like to call the WebService using an...
2
by: nams | last post by:
Hi Frnds, Say I have vb code like this: Public Sub ll() MsgBox("heLOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", MsgBoxStyle.OkOnly) End Sub The following script runs as soon as the page loads, no...
4
by: jake | last post by:
Can someone please give me an example on how to call a wcf method that resides on a different domain from JavaScript (not from C#/asp.net)? All the examples that I have seen show how to call from...
1
by: neerom | last post by:
Hi I need to call webservice from xslt in HTTP POST Method. The MSXML should be used. I am using javascript. I have an XML File which is having Integer Node.....Shown Below <?xml version="1.0"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.