473,396 Members | 1,866 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,396 software developers and data experts.

web services & firefox.

Hi,
I was curious if I could make my webservice work with firefox client
webservice functionality. (i got it to work with webservice.htc)

I am able to get firefox to see my serverside web service methods
(instantiate a proxy and alert proxy.MyMethod to tell its a valid
function), but when I submit to them, I either get, "Cannot convert
javascript arg 0" or "not enough arguments" javascript errors. I am
thinking that perhaps firefox does not understand auto generated WSDL.
I do not have much experience with WSDL and so perhaps someone has
attempted such feat....

FireFoxTest.aspx
<script>
var proxy = null;
var wsdl_uri = "http://localhost/webtesting/service.xml";
function run (aValue1, aValue2)
{
if (!proxy) {

var listener = {
onLoad: function (aProxy)
{
proxy = aProxy;
proxy.setListener(listener);
requestTranslation(aValue1, aValue2);
},
onError: function (aError)
{
alert(aError);
},

MyMathCallback : function (val)
{
alert('inside callback');
alert(val);
}
};

createProxy(listener);

}
else {
requestTranslation(aValue1, aValue2);
}
}
function createProxy(aCreationListener)
{
try {
var factory = new WebServiceProxyFactory();

factory.createProxyAsync(wsdl_uri, "MyMathSoap", "", true,
aCreationListener);

}
catch (ex) {
alert(ex);
}
}
function requestTranslation (value1, value2)
{
if (proxy) {
alert(proxy.Add);
proxy.Add();
}
else {
alert("Error: Proxy set up not complete!");
}
}
</script>
</head>
<body MS_POSITIONING="GridLayout">
firefox version<br><br>
<form id="Form1" method="post" runat="server">
<a href="javascript:;" onclick="run(2,7);">run</a>
WSDL:
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://tempuri.org/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="Add">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="n1"
type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="n2"
type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AddResult"
type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetTest">
<s:complexType />
</s:element>
<s:element name="GetTestResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="GetTestResult" type="s0:TestObject" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="TestObject">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Caption"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="InnerObject"
type="s0:TestInnerObject" />
</s:sequence>
</s:complexType>
<s:complexType name="TestInnerObject">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="InnerValue"
type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</types>
<message name="AddSoapIn">
<part name="parameters" element="s0:Add" />
</message>
<message name="AddSoapOut">
<part name="parameters" element="s0:AddResponse" />
</message>
<message name="GetTestSoapIn">
<part name="parameters" element="s0:GetTest" />
</message>
<message name="GetTestSoapOut">
<part name="parameters" element="s0:GetTestResponse" />
</message>
<portType name="MyMathSoap">
<operation name="Add">
<input message="s0:AddSoapIn" />
<output message="s0:AddSoapOut" />
</operation>
<operation name="GetTest">
<input message="s0:GetTestSoapIn" />
<output message="s0:GetTestSoapOut" />
</operation>
</portType>
<binding name="MyMathSoap" type="s0:MyMathSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<operation name="Add">
<soap:operation soapAction="http://tempuri.org/Add"
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
<operation name="GetTest">
<soap:operation soapAction="http://tempuri.org/GetTest"
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="MyMath">
<port name="MyMathSoap" binding="s0:MyMathSoap">
<soap:address location="http://localhost/webtesting/testwebservice.asmx"
/>
</port>
</service>
</definitions>
Jul 21 '05 #1
4 4069
Hi,

I'm interested in working on this. Can you post your whole HTML file? I
don't see below where you put the reference to webservice.htc. I put it in
a div tag that has an onresult attribute when working with IE. Thanks.
Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"sonic_soul" <sq**********@hotmail.com> wrote in message
news:f0**************************@posting.google.c om...
Hi,
I was curious if I could make my webservice work with firefox client
webservice functionality. (i got it to work with webservice.htc)

I am able to get firefox to see my serverside web service methods
(instantiate a proxy and alert proxy.MyMethod to tell its a valid
function), but when I submit to them, I either get, "Cannot convert
javascript arg 0" or "not enough arguments" javascript errors. I am
thinking that perhaps firefox does not understand auto generated WSDL.
I do not have much experience with WSDL and so perhaps someone has
attempted such feat....

FireFoxTest.aspx
<script>
var proxy = null;
var wsdl_uri = "http://localhost/webtesting/service.xml";
function run (aValue1, aValue2)
{
if (!proxy) {

var listener = {
onLoad: function (aProxy)
{
proxy = aProxy;
proxy.setListener(listener);
requestTranslation(aValue1, aValue2);
},
onError: function (aError)
{
alert(aError);
},

MyMathCallback : function (val)
{
alert('inside callback');
alert(val);
}
};

createProxy(listener);

}
else {
requestTranslation(aValue1, aValue2);
}
}
function createProxy(aCreationListener)
{
try {
var factory = new WebServiceProxyFactory();

factory.createProxyAsync(wsdl_uri, "MyMathSoap", "", true,
aCreationListener);

}
catch (ex) {
alert(ex);
}
}
function requestTranslation (value1, value2)
{
if (proxy) {
alert(proxy.Add);
proxy.Add();
}
else {
alert("Error: Proxy set up not complete!");
}
}
</script>
</head>
<body MS_POSITIONING="GridLayout">
firefox version<br><br>
<form id="Form1" method="post" runat="server">
<a href="javascript:;" onclick="run(2,7);">run</a>
WSDL:
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://tempuri.org/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="Add">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="n1"
type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="n2"
type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AddResult"
type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetTest">
<s:complexType />
</s:element>
<s:element name="GetTestResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="GetTestResult" type="s0:TestObject" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="TestObject">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Caption"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="InnerObject"
type="s0:TestInnerObject" />
</s:sequence>
</s:complexType>
<s:complexType name="TestInnerObject">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="InnerValue"
type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</types>
<message name="AddSoapIn">
<part name="parameters" element="s0:Add" />
</message>
<message name="AddSoapOut">
<part name="parameters" element="s0:AddResponse" />
</message>
<message name="GetTestSoapIn">
<part name="parameters" element="s0:GetTest" />
</message>
<message name="GetTestSoapOut">
<part name="parameters" element="s0:GetTestResponse" />
</message>
<portType name="MyMathSoap">
<operation name="Add">
<input message="s0:AddSoapIn" />
<output message="s0:AddSoapOut" />
</operation>
<operation name="GetTest">
<input message="s0:GetTestSoapIn" />
<output message="s0:GetTestSoapOut" />
</operation>
</portType>
<binding name="MyMathSoap" type="s0:MyMathSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<operation name="Add">
<soap:operation soapAction="http://tempuri.org/Add"
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
<operation name="GetTest">
<soap:operation soapAction="http://tempuri.org/GetTest"
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="MyMath">
<port name="MyMathSoap" binding="s0:MyMathSoap">
<soap:address location="http://localhost/webtesting/testwebservice.asmx" />
</port>
</service>
</definitions>

Jul 21 '05 #2
Hi, thanks for replying.

That was a complete call actually. firefox does not need a registration
with a div like msie does and it has native support for webservices
which means no .htc file is needed. its support is actually superior to
that of msie, because all you do is instantiate a proxy and call it as
if the webservice was a local object.

here is an example of a working firefox webservice:
http://www.mozilla.org/projects/webs...fish-wsdl/inde
x.html

just look at the javascript include.

the sample i posted gets to the point of seeing the service methods. it
just seems to give weird errors when those methods are actually called
(see error messages included in original post).

thank you!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
Hi, thanks for replying.

That was a complete call actually. firefox does not need a
registration with a div like msie does and it has native support for
webservices which means no .htc file is needed. its support is
actually superior to that of msie, because all you do is instantiate a
proxy and call it as if the webservice was a local object.

here is an example of a working firefox webservice:
http://www.mozilla.org/projects/webs...sdl/index.html

just look at the javascript include.

the sample i posted gets to the point of seeing the service methods.
it just seems to give weird errors when those methods are actually
called (see error messages included in original post).

thank you!

On Mon, 4 Oct 2004 19:33:50 -0500, "Ken Dopierala Jr."
<kd*********@wi.rr.com> wrote:
Hi,

I'm interested in working on this. Can you post your whole HTML file? I
don't see below where you put the reference to webservice.htc. I put it in
a div tag that has an onresult attribute when working with IE. Thanks.
Ken.


Jul 21 '05 #4
Hi,

Okay I took a look and I'm getting the same result as you. It appears that
the problem revolves around Firefox's inability to conform to the standards
set forth by the W3C. Not surprising since they still have a handful of
security and SSL standards open in Bugzilla. Anyways, to get this to work
get rid of all your <s: tags, the ones that define elements and complex
types. Then in your <message tags remove the <part tags that rely on the <s
tags and define your arguments there instead. Basically you need to model
this:

http://www.xmethods.net/sd/2001/BabelFishService.wsdl

Then you should be all set. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Rafal" <no@spam.com> wrote in message
news:0r********************************@4ax.com...
Hi, thanks for replying.

That was a complete call actually. firefox does not need a
registration with a div like msie does and it has native support for
webservices which means no .htc file is needed. its support is
actually superior to that of msie, because all you do is instantiate a
proxy and call it as if the webservice was a local object.

here is an example of a working firefox webservice:
http://www.mozilla.org/projects/webs...sdl/index.html
just look at the javascript include.

the sample i posted gets to the point of seeing the service methods.
it just seems to give weird errors when those methods are actually
called (see error messages included in original post).

thank you!

On Mon, 4 Oct 2004 19:33:50 -0500, "Ken Dopierala Jr."
<kd*********@wi.rr.com> wrote:
Hi,

I'm interested in working on this. Can you post your whole HTML file? I
don't see below where you put the reference to webservice.htc. I put it ina div tag that has an onresult attribute when working with IE. Thanks.
Ken.

Jul 21 '05 #5

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

Similar topics

4
by: kinne | last post by:
The following code is supposed to reverse the date in "yyyy-mm-dd" format, but it produces different results in Firefox 1.0 and in Internet Explorer 6SP1. In Firefox, the result is correct...
4
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: ...
5
by: sonic_soul | last post by:
Hi, I was curious if I could make my webservice work with firefox client webservice functionality. (i got it to work with webservice.htc) I am able to get firefox to see my serverside web...
12
by: PMA | last post by:
Hi all, I am porting a web application from IE 6.0 to FireFox 1.5. I have solved almost all compatibility issues (quite a lot but not too bad) except two of them : 1) Clipboard access thru'...
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
3
by: Nathan Sokalski | last post by:
I am adding an onmouseover attribute using the Attributes.Add() method, and the String I am using for the value contains the & character. However, when rendered the & is converted to the HTML...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.