soapclient using https randomly closes connection

[email protected] (Bernhard Ege)
Newsgroups php.soap
Message-ID <[email protected]>
I am using php 5.2.9 (solaris) and have access to a .NET webservice that I
have to access using https.

In most cases, accessing it works just fine, but every now and again,
SoapClient closes the connection before actually having transfered the
request, erroring with "could not connect to host ...".

I have captured the actual communication using snoop and examined the 
result
in wireshark and I see that the tcp connection to the webservice is
established correct, but before the request is transmitted, SoapClient
closes the tcp-connection which is acknowledged by the webservice which 
also
resets the TCP connection.

When I disable the caching of the WSDL file for SoapClient, I get these
errors (not always, only sometimes):

Warning: SoapClient::SoapClient() [soapclient.soapclient]: failed to create
an SSL context in /space/hom

Warning: SoapClient::SoapClient() [soapclient.soapclient]: Failed to enable
crypto in /space/home

Warning: SoapClient::SoapClient(https://sitename.../pathto?WSDL)
[soapclient.soapclient]: failed to open stream: operation failed in
/space/home

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning :
failed to load external entity "https://sitename.../pathto?WSDL" in
/space/hom

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:
Couldn't load from 'https://...


If I would get this error every time, I'd be more happy, but when it only
occurs once in a while (like every 10. connect), I am more at a loss. 
But it
does seem like SoapClient is at fault.

Any suggestions?

/Bernhard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.