Go Premium for a chance to win a PS4. Enter to Win

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

SOAP

I have written a DLL in VB.  I created a WSDL and a WSML with SoapToolKit 2.0.  The toolkit also created the asp listener page for me.  Now when I try and connect to the listener page with a client page I get an erro which makes me sad.

Here is my Client Code:

<%
     Set soapclient = CreateObject("MSSOAP.SoapClient")
     Call soapclient.mssoapinit("http://localhost/Greetings/Greetings.wsdl", "Greetings", "GreetingsClassSoapPort")
%>

And The Error I get:

Error Type:
Client (0x80020009)
WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057 - WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: No data is available for the requested resource. HRESULT=0x1
/Greetings/Default.asp, line 12

If anyone can help with this I would be most grateful.

Cheers

PS Using Win 2000 Pro and IIS on my local machine

Dave
0
daveamour
Asked:
daveamour
  • 3
  • 3
1 Solution
 
naveenkohliCommented:
This error at line number 0, line position 0 occurs if SOAP client initialization code is not able to locate the WSDL file. Make sure that the URL you specified during creation of WSDL file matches the URL that you are using in mssoapinit call. You can also do a simple test. FRom the client machine from where you are initializing soap, try to open the WSDL file thrugh browser. Meaning try to open http://loaclhost/Greetings/Greetings.wsdl. And see if you can open it. Most important is that URLs should match in WSDL and init call. Also check the authentication mechinism for the web folder wherr WSDL file is located. It should not be WIndows authentication.

Naveen
0
 
daveamourAuthor Commented:
The url for the wsdl file is correct

There is no authentication for the web folder

This is my wsdl file, does this look ok?

Cheers

Dave

<?xml version='1.0' encoding='UTF-8' ?>
 <!-- Generated 05/09/02 by Microsoft SOAP Toolkit WSDL File Generator, Version 1.02.813.0 -->
<definitions  name ='Greetings'   targetNamespace = 'http://tempuri.org/wsdl/'
      xmlns:wsdlns='http://tempuri.org/wsdl/'
      xmlns:typens='http://tempuri.org/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='http://schemas.xmlsoap.org/wsdl/'>
  <types>
    <schema targetNamespace='http://tempuri.org/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'>
    </schema>
  </types>
  <message name='GreetingsClass.Greetings'>
  </message>
  <message name='GreetingsClass.GreetingsResponse'>
    <part name='Result' type='xsd:string'/>
  </message>
  <portType name='GreetingsClassSoapPort'>
    <operation name='Greetings' parameterOrder=''>
      <input message='wsdlns:GreetingsClass.Greetings' />
      <output message='wsdlns:GreetingsClass.GreetingsResponse' />
    </operation>
  </portType>
  <binding name='GreetingsClassSoapBinding' type='wsdlns:GreetingsClassSoapPort' >
    <stk:binding preferredEncoding='UTF-8'/>
    <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http' />
    <operation name='Greetings' >
      <soap:operation soapAction='http://tempuri.org/action/GreetingsClass.Greetings' />
      <input>
        <soap:body use='encoded' namespace='http://tempuri.org/message/'
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
      </input>
      <output>
        <soap:body use='encoded' namespace='http://tempuri.org/message/'
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
      </output>
    </operation>
  </binding>
  <service name='Greetings' >
    <port name='GreetingsClassSoapPort' binding='wsdlns:GreetingsClassSoapBinding' >
      <soap:address location='http://localhost/Greetings/Greetings.ASP' />
    </port>
  </service>
</definitions>
0
 
naveenkohliCommented:
Your WSDL is correct. You may have already done this... but can u check if 'http://localhost/Greetings' is created as a web application or not.
Also try changing "localhost" to your machine name?
And were you open to able WSDL file in browser?

Naveen
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
daveamourAuthor Commented:
Hey, thanks for your help but I managed to get it working by adding the following line of code:

myObj.ClientProperty("ServerHTTPRequest") = True

Points to you if you can explain why this needs to be done?

Cheers

Dave
0
 
naveenkohliCommented:
Infact, I had the same issues when i started using MS SOAP tool kit. And now I am so used to setting this client property that it did not even cross my mind that it could be the same problem you are having. Anyway, here is the explanation from documentation.

A True/False value indicating whether to use the "server-safe" XML components to load the Web Services Description Language (WSDL) and Web Services Meta Language (WSML) files. Set to True when an Active Server Pages (ASP) application or an ISAPI DLL uses the SoapClient object.
When ServerHTTPRequest is set to true, the WinHTTP Proxy Configuration Utility must be used to configure WinHTTP. This is necessary even if a proxy server is not being used.

Naveen
0
 
daveamourAuthor Commented:
Thanks dude :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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