Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SOAP

Posted on 2002-05-09
6
Medium Priority
?
1,678 Views
Last Modified: 2012-05-04
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
Comment
Question by:daveamour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 6998978
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
 
LVL 19

Author Comment

by:daveamour
ID: 6999090
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
 
LVL 23

Expert Comment

by:naveenkohli
ID: 6999253
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Author Comment

by:daveamour
ID: 7000726
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
 
LVL 23

Accepted Solution

by:
naveenkohli earned 150 total points
ID: 7001111
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
 
LVL 19

Author Comment

by:daveamour
ID: 7001125
Thanks dude :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question