S
Steve Ricketts
I've written a .Net web service running on IIS, W2K Server and using
IE with the webservice.htc behavior to call it and all works fine.
However, when I call the web service with Mozilla using the its SOAP
API, the message is received by the web service but all the parameters
equate to "Nothing". I've checked the outgoing message and the values
are in the message sent by Mozilla to the .Net web service, but not
picked up.
I change the code to return data when the parameters are empty and I'm
able to get data from the .Net web service into Mozilla. I've
searched everywhere and just can't find anything on how you can talk
to a .Net web service from Mozilla's SOAP API. Surely, this is
something that lots of people must want to be doing, but I can't
figure out what I'm doing wrong.
Anyway, here's a summary of my situation
1. MS .Net Web Service written in Visual Studio 2003 VB, on W2K Server
2. IE with webservice.htc works fine
3. Call the service with Mozilla SOAP API, values are sent fine
4. .Net Web Service receives message, runs method, but parameters are
empty
5. Mozilla can receive .Net responses
6. Copies of messages and code below
Any direction you can give is greatly appreciated. I've been
struggling with this problem for a long, long time. Thanks very much
for any information you can provide.
Steve Ricketts
The web method on the server side looks like:
<WebMethod(Description:="Launchs a SCO")> _
Public Function LMSLaunch(ByVal org_int As String, ByVal person_int As
String, ByVal course_int As String, ByVal sco_identifier As String,
ByVal
strData As String) As String
The Javascript in Mozilla looks like:
var method = "LMSLaunch"
var soapVersion = 0
var headers = [ ]
var params = [
new SOAPParameter(org_int,"org_int"),
new SOAPParameter(person_int,"person_int"),
new SOAPParameter(course_int,"course_int"),
new SOAPParameter(SCO,"sco_identifier"),
new SOAPParameter("<%=url%>","strData")
]
var CADEAPI = new SOAPCall();
CADEAPI.transportURI =
"http://www.velocedge.com/net/LMWAPI/service1.asmx"
CADEAPI.actionURI = "SCORM12/" + method
CADEAPI.encode(soapVersion, method, "SCORM12/", headers.length,
headers,
params.length, params)
var results = CADEAPI.invoke()
if (results.fault) {
alert(results.fault.faultString)
}
else {
var returnValue = new Array()
returnValue = results.getParameters(false,{})
alert('Returned ' + returnValue[0].value)
}
Copies of SOAP messages follow:
SOAP Message Sent From IE
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="SCORM12/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<LMSLaunch xmlns="SCORM12/">
<org_int>99</org_int>
<person_int>9</person_int>
<course_int>67</course_int>
<sco_identifier></sco_identifier>
<strData>0</strData></LMSLaunch></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP Message From Mozilla:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><env:Header/><env:Body><a0:LMSLaunch
xmlns:a0="SCORM12/"><org_int
xsi:type="xs:string">99</org_int><person_int
xsi:type="xs:string">9</person_int><course_int
xsi:type="xs:string">67</course_int><sco_identifier
xsi:type="xs:string">1</sco_identifier><strData
xsi:type="xs:string">http://www.velocedge.com/LMWi/net/1_2/CADEcontent.htm</strData></a0:LMSLaunch></env:Body></env:Envelope>
Test return from .Net web service to Mozilla
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Sun, 22 Feb 2004 21:04:05 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 368
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LMSTestResponse
xmlns="SCORM12/"><LMSTestResult xsi:type="xsd:string">I can return
data</LMSTestResult></LMSTestResponse></soap:Body></soap:Envelope>
IE with the webservice.htc behavior to call it and all works fine.
However, when I call the web service with Mozilla using the its SOAP
API, the message is received by the web service but all the parameters
equate to "Nothing". I've checked the outgoing message and the values
are in the message sent by Mozilla to the .Net web service, but not
picked up.
I change the code to return data when the parameters are empty and I'm
able to get data from the .Net web service into Mozilla. I've
searched everywhere and just can't find anything on how you can talk
to a .Net web service from Mozilla's SOAP API. Surely, this is
something that lots of people must want to be doing, but I can't
figure out what I'm doing wrong.
Anyway, here's a summary of my situation
1. MS .Net Web Service written in Visual Studio 2003 VB, on W2K Server
2. IE with webservice.htc works fine
3. Call the service with Mozilla SOAP API, values are sent fine
4. .Net Web Service receives message, runs method, but parameters are
empty
5. Mozilla can receive .Net responses
6. Copies of messages and code below
Any direction you can give is greatly appreciated. I've been
struggling with this problem for a long, long time. Thanks very much
for any information you can provide.
Steve Ricketts
The web method on the server side looks like:
<WebMethod(Description:="Launchs a SCO")> _
Public Function LMSLaunch(ByVal org_int As String, ByVal person_int As
String, ByVal course_int As String, ByVal sco_identifier As String,
ByVal
strData As String) As String
The Javascript in Mozilla looks like:
var method = "LMSLaunch"
var soapVersion = 0
var headers = [ ]
var params = [
new SOAPParameter(org_int,"org_int"),
new SOAPParameter(person_int,"person_int"),
new SOAPParameter(course_int,"course_int"),
new SOAPParameter(SCO,"sco_identifier"),
new SOAPParameter("<%=url%>","strData")
]
var CADEAPI = new SOAPCall();
CADEAPI.transportURI =
"http://www.velocedge.com/net/LMWAPI/service1.asmx"
CADEAPI.actionURI = "SCORM12/" + method
CADEAPI.encode(soapVersion, method, "SCORM12/", headers.length,
headers,
params.length, params)
var results = CADEAPI.invoke()
if (results.fault) {
alert(results.fault.faultString)
}
else {
var returnValue = new Array()
returnValue = results.getParameters(false,{})
alert('Returned ' + returnValue[0].value)
}
Copies of SOAP messages follow:
SOAP Message Sent From IE
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="SCORM12/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<LMSLaunch xmlns="SCORM12/">
<org_int>99</org_int>
<person_int>9</person_int>
<course_int>67</course_int>
<sco_identifier></sco_identifier>
<strData>0</strData></LMSLaunch></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP Message From Mozilla:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><env:Header/><env:Body><a0:LMSLaunch
xmlns:a0="SCORM12/"><org_int
xsi:type="xs:string">99</org_int><person_int
xsi:type="xs:string">9</person_int><course_int
xsi:type="xs:string">67</course_int><sco_identifier
xsi:type="xs:string">1</sco_identifier><strData
xsi:type="xs:string">http://www.velocedge.com/LMWi/net/1_2/CADEcontent.htm</strData></a0:LMSLaunch></env:Body></env:Envelope>
Test return from .Net web service to Mozilla
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Sun, 22 Feb 2004 21:04:05 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 368
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LMSTestResponse
xmlns="SCORM12/"><LMSTestResult xsi:type="xsd:string">I can return
data</LMSTestResult></LMSTestResponse></soap:Body></soap:Envelope>