hongjun
asked on
SOAP Problem
I am trying to create a webservice by converting VB ActiveX dll using Soap Toolkit 3.0
I use a simple example
My ActiveX dll
----
' Project Name: HelloServer
' Class Name: Hello
' I have checked "Unattended Execution" and "Retained In Memory" under Project -> Properties
Option Explicit
Public Function getHello() As String
getHello = "Hello World from Me!"
End Function
-------
My Generated WSDL
-----
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 04/05/06 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
<definitions
name='HelloService'
targetNamespace='http://tempuri.org/HelloService/wsdl/'
xmlns:wsdlns='http://tempuri.org/HelloService/wsdl/'
xmlns:typens='http://tempuri.org/HelloService/type/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema
targetNamespace='http://tempuri.org/HelloService/type/'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualif ied'>
<import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
<import namespace='http://schemas.xmlsoap.org/wsdl/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
</schema>
</types>
<message name='Hello.getHello'>
</message>
<message name='Hello.getHelloRespon se'>
<part name='Result' type='xsd:string'/>
</message>
<portType name='HelloSoapPort'>
<operation name='getHello' parameterOrder=''>
<input message='wsdlns:Hello.getH ello'/>
<output message='wsdlns:Hello.getH elloRespon se'/>
</operation>
</portType>
<binding name='HelloSoapBinding' type='wsdlns:HelloSoapPort ' >
<stk:binding preferredEncoding='UTF-8'/ >
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getHello'>
<soap:operation soapAction='http://tempuri.org/HelloService/action/Hello.getHello'/>
<input>
<soap:body
use='encoded'
namespace='http://tempuri.org/HelloService/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body
use='encoded'
namespace='http://tempuri.org/HelloService/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result'/>
</output>
</operation>
</binding>
<service name='HelloService' >
<port name='HelloSoapPort' binding='wsdlns:HelloSoapB inding' >
<soap:address location='http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL'/>
</port>
</service>
</definitions>
---
test_ws.asp
---
<%
Option Explicit
On Error Resume Next
Dim soapClient3
set soapclient3 = CreateObject ("MSSOAP.SoapClient30")
soapclient3.ClientProperty ("ServerHT TPRequest" ) = True
if err <> 0 then
Response.Write "Set obj failed: " & err.description
Response.End
end if
'Call SoapClient3.mssoapinit("http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL", "HelloService", "HelloSoapPort")
Call SoapClient3.MsSoapInit("http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL", "HelloService", "")
if err <> 0 then
Response.Write "initialization failed: " & err.description
Response.End
end if
Response.Write SoapClient3.getHello()
if err <> 0 then
Response.Write err.description
Response.End
end if
Set soapClient3 = Nothing
%>
I am getting this error message:
---
initialization failed: WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: The download of the specified resource has failed. HRESULT=0x1: Incorrect function. - WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect. - Client:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.
---
I use a simple example
My ActiveX dll
----
' Project Name: HelloServer
' Class Name: Hello
' I have checked "Unattended Execution" and "Retained In Memory" under Project -> Properties
Option Explicit
Public Function getHello() As String
getHello = "Hello World from Me!"
End Function
-------
My Generated WSDL
-----
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 04/05/06 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
<definitions
name='HelloService'
targetNamespace='http://tempuri.org/HelloService/wsdl/'
xmlns:wsdlns='http://tempuri.org/HelloService/wsdl/'
xmlns:typens='http://tempuri.org/HelloService/type/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema
targetNamespace='http://tempuri.org/HelloService/type/'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualif
<import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
<import namespace='http://schemas.xmlsoap.org/wsdl/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
</schema>
</types>
<message name='Hello.getHello'>
</message>
<message name='Hello.getHelloRespon
<part name='Result' type='xsd:string'/>
</message>
<portType name='HelloSoapPort'>
<operation name='getHello' parameterOrder=''>
<input message='wsdlns:Hello.getH
<output message='wsdlns:Hello.getH
</operation>
</portType>
<binding name='HelloSoapBinding' type='wsdlns:HelloSoapPort
<stk:binding preferredEncoding='UTF-8'/
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getHello'>
<soap:operation soapAction='http://tempuri.org/HelloService/action/Hello.getHello'/>
<input>
<soap:body
use='encoded'
namespace='http://tempuri.org/HelloService/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body
use='encoded'
namespace='http://tempuri.org/HelloService/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result'/>
</output>
</operation>
</binding>
<service name='HelloService' >
<port name='HelloSoapPort' binding='wsdlns:HelloSoapB
<soap:address location='http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL'/>
</port>
</service>
</definitions>
---
test_ws.asp
---
<%
Option Explicit
On Error Resume Next
Dim soapClient3
set soapclient3 = CreateObject ("MSSOAP.SoapClient30")
soapclient3.ClientProperty
if err <> 0 then
Response.Write "Set obj failed: " & err.description
Response.End
end if
'Call SoapClient3.mssoapinit("http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL",
Call SoapClient3.MsSoapInit("http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL",
if err <> 0 then
Response.Write "initialization failed: " & err.description
Response.End
end if
Response.Write SoapClient3.getHello()
if err <> 0 then
Response.Write err.description
Response.End
end if
Set soapClient3 = Nothing
%>
I am getting this error message:
---
initialization failed: WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: The download of the specified resource has failed. HRESULT=0x1: Incorrect function. - WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect. - Client:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.
---
ASKER
No luck
So you can't see http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL in a browser? I think you have to resolve that before anything else
ASKER
Ya.. I cannot see.
This is weird.
I have added the ISAPI for wsdl in IIS.
What am I lacking?
This is weird.
I have added the ISAPI for wsdl in IIS.
What am I lacking?
and what about:
http://localhost/Soap3DocSamples/DocSample1/Server/HelloService?WSDL
or even just
http://localhost/Soap3DocSamples/DocSample1/Server
http://localhost/Soap3DocSamples/DocSample1/Server/HelloService?WSDL
or even just
http://localhost/Soap3DocSamples/DocSample1/Server
ASKER
Added .wsdl ISAPI and point to SOAPIS30.dll
ASKER
Any help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I actually solved this problem quite some time back. It's time to close this question.
I did this instead.
Get to cmd
Go to C:\Program Files\MSSOAP\Binaries\
Type SOAPVDIR.CMD update soap3docsamples
And I got it.
Thanks
hongjun
I did this instead.
Get to cmd
Go to C:\Program Files\MSSOAP\Binaries\
Type SOAPVDIR.CMD update soap3docsamples
And I got it.
Thanks
hongjun
What happens when you try to go directly to:
http://localhost/Soap3DocSamples/DocSample1/Server/HelloService.WSDL
in a browser?
and shouldn't the address be:
http://localhost/Soap3DocSamples/DocSample1/Server/HelloService?WSDL
(question mark before the WSDL)