SOAP via SSL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Kraume

    SOAP via SSL

    Hi,

    I want to access a Lotus Notes Database via SOAP.

    PHP Version is 5.2.0, OpenSSL support is active (OpenSSL Version
    OpenSSL 0.9.7e 25 Oct 2004)

    But I get this error message:

    Warning: SoapClient::Soa pClient() [function.SoapCl ient-SoapClient]:
    Unable to set private key file `test.cer' in
    /abbreviated/soap-test/index.php on line 7

    Warning: SoapClient::Soa pClient() [function.SoapCl ient-SoapClient]:
    failed to create an SSL handle in /abbreviated/soap-test/index.php on line 7

    Warning: SoapClient::Soa pClient() [function.SoapCl ient-SoapClient]:
    Failed to enable crypto in /abbreviated/soap-test/index.php on line 7

    Warning:
    SoapClient::Soa pClient(https://notes.domain.tld/samson/sama...f/Partner?WSDL)
    [function.SoapCl ient-SoapClient]: failed to open stream: Operation now
    in progress in /abbreviated/soap-test/index.php on line 7

    Warning: SoapClient::Soa pClient() [function.SoapCl ient-SoapClient]: I/O
    warning : failed to load external entity
    "https://notes.domain.tl d/samson/samain20.nsf/Partner?WSDL" in
    /abbreviated/soap-test/index.php on line 7

    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
    WSDL: Couldn't load from
    'https://notes.domain.tl d/samson/samain20.nsf/Partner?WSDL' in
    /abbreviated/soap-test/index.php:7 Stack trace: #0
    /abbreviated/soap-test/index.php(7):
    SoapClient->SoapClient('ht tps://notes.s...', Array) #1 {main} thrown in
    /abbreviated/soap-test/index.php on line 7


    Here is my code snippet:
    <?php
    $wsdl = 'https://notes.domain.tl d/samson/samain20.nsf/Partner?WSDL';
    $options = array(
    'local_cert' ='./test.cer',
    );

    $client = new SoapClient($wsd l, $options);
    ?>

    The aquired the certificate with "openssl s_client -showcerts -connect
    notes.domain.tl d:443"

    My question is now, wether I made a mistake or the SOAP server doesn't
    work properly. But when I access the WSDL file via browser, I get a
    valid XML file back.

    Any ideas for me?

    Thx
    Peter
  • Peter Kraume

    #2
    Re: SOAP via SSL

    Problem solved:
    <?php
    $wsdl = 'https://notes.domain.tl d/samson/samain20.nsf/Partner?WSDL';
    $client = new SoapClient($wsd l);
    ?>
    There is no need to include the certificate!

    Cheers
    Peter

    Comment

    Working...