Solved

SOAP

Posted on 2002-05-09
6
1,603 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
API Location, separating out information 10 46
Classic ASP, Search Recordset on pick list change 1 52
UTC (timezone) without using an API 16 40
Copy only dates 3 81
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

867 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

18 Experts available now in Live!

Get 1:1 Help Now