Solved

SOAP

Posted on 2002-05-09
6
1,618 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
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to hide jquery hemiintro in returning user? 1 84
Generate report pulling data (links) from three tables 31 67
Server Timeout with Loop 6 52
innerHTML 7 35
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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