Solved

SOAP

Posted on 2002-05-09
6
1,591 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Author Comment

by:daveamour
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks dude :)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now