[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1939
  • Last Modified:

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='qualified'>

                  <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.getHelloResponse'>
            <part name='Result' type='xsd:string'/>
      </message>

      <portType name='HelloSoapPort'>

            <operation name='getHello' parameterOrder=''>
                  <input message='wsdlns:Hello.getHello'/>
                  <output message='wsdlns:Hello.getHelloResponse'/>
            </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:HelloSoapBinding' >
                  <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("ServerHTTPRequest") = 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.
---
0
hongjun
Asked:
hongjun
  • 6
  • 3
1 Solution
 
peterxlaneCommented:
I don't know much about this, but here is my thoughts...

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)


0
 
hongjunAuthor Commented:
No luck
0
 
peterxlaneCommented:
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




0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
hongjunAuthor Commented:
Ya.. I cannot see.
This is weird.
I have added the ISAPI for wsdl in IIS.
What am I lacking?
0
 
hongjunAuthor Commented:
Added .wsdl ISAPI and point to SOAPIS30.dll
0
 
hongjunAuthor Commented:
0
 
hongjunAuthor Commented:
Any help?
0
 
sakuya_suCommented:
did you tell IIS that you allow access to WSDL?
>>add a new webservice extension in IIS. In the Extension Name box, enter "SOAP Webservices" (or whatever you prefer). Add "C:\Program Files\Common Files\MSSoap\Binaries\SOAPIS30.dll" to the Required Files list.

0
 
hongjunAuthor Commented:
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
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now