From: Doug on
On a server that we run automated apps on, that has VB code that uses
the MSSoap tool kit to access a web service, we periodically get these
errors:

Soap error: XML Parser failed at linenumber 1, lineposition 0, reason
is: No data is available for the requested resource.

Soap error: Loading of the WSDL file failed.

Soap error: One of the parameters supplied is invalid..

This happens at varying times and only for a very short time but it
causes our applications to go nuts. Then everything clears out and
it's fine.

Does anyone know what these errors are caused by?

From: Duane Arnold on
I think that possibly you have a Function or Subroutine that uses parameters
in the SOAP service that's being accessed by a client application. The
application is passing the wrong type of parameter to the Function or
Subroutine, like Long when it should be Interger, String when it should be
Long or something like that, which is casusing the problem. Or some object
that's not Serialized is being passed to the SOAP Service.

You can set the SoapService.Timeout = -1 'Infinite timeout so you can debug
the SOAP service and see what is happening when it's accessed.

Duane :)

"Doug" wrote:

> On a server that we run automated apps on, that has VB code that uses
> the MSSoap tool kit to access a web service, we periodically get these
> errors:
>
> Soap error: XML Parser failed at linenumber 1, lineposition 0, reason
> is: No data is available for the requested resource.
>
> Soap error: Loading of the WSDL file failed.
>
> Soap error: One of the parameters supplied is invalid..
>
> This happens at varying times and only for a very short time but it
> causes our applications to go nuts. Then everything clears out and
> it's fine.
>
> Does anyone know what these errors are caused by?
>
>
From: Doug on
> I think that possibly you have a Function or Subroutine that uses parameters
> in the SOAP service that's being accessed by a client application.

This is all our code does below, I'm not sure what would be passed in
wrong though?

Dim objSoap as New MSSOAPLib30.SoapClient30
objSoap.MSSoapInit (strWebServicePathValue)
objSoap.WebServiceMethodName(strValue)

> You can set the SoapService.Timeout = -1 'Infinite timeout so you can debug
> the SOAP service and see what is happening when it's accessed.

The Soap Client doesn't appear to have a Timeout value. The only
methods, properties that the Soap Client has are:
ClientProperty
ConnectorProperty
Detail
FaultActor
FaultCode
FaultCodeNamespace
FaultString
HeaderHandler
MSSoapInit
MSSoapInit2

From: Duane Arnold on


"Doug" wrote:

> > I think that possibly you have a Function or Subroutine that uses parameters
> > in the SOAP service that's being accessed by a client application.
>
> This is all our code does below, I'm not sure what would be passed in
> wrong though?
>

You may need to put a Try/Catch around the code below.
> Dim objSoap as New MSSOAPLib30.SoapClient30
> objSoap.MSSoapInit (strWebServicePathValue)
> objSoap.WebServiceMethodName(strValue)
>

You may want to catch the Exception and see what are the vaules that are in
the variables above at the time of failure.

You may want to dump the variables on success and non success to see if you
can spot a difference. Where is the Path pointing to and what's in the file
at the time of failure or success?

> > You can set the SoapService.Timeout = -1 'Infinite timeout so you can debug
> > the SOAP service and see what is happening when it's accessed.
>
> The Soap Client doesn't appear to have a Timeout value. The only
> methods, properties that the Soap Client has are:
> ClientProperty
> ConnectorProperty
> Detail
> FaultActor
> FaultCode
> FaultCodeNamespace
> FaultString
> HeaderHandler
> MSSoapInit
> MSSoapInit2

Web or Soap Service.Timeout = -1 is for debugging the Web service that's
running on the Web server on your development machine. If you're developing a
Web service and you're in the .NET IDE with a Web application running on your
development machine accessing the Web service code, if you set the Timeout to
a -1, you will be able to stay in the Debug of the session. The Web service
code you're trying to debug in development won't do a session timeout on you
while you're trying to use the Debugger to debug the Web service from your
Web application or the Web application itself that's using the Web Service.

Duane :)