soap client for apache soap server.

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

    #1

    soap client for apache soap server.

    Hi
    I have to find a soap client to be able to connet to java apache soap
    server.And I must send a file and envelope xml.I found nusoap but I
    can t achieve to communicate it.

    Does anybody knows anything about it?

    thks.

  • Michael Placentra II

    #2
    Re: soap client for apache soap server.

    Here's a basic idea of how to use NuSOAP:

    $ns = 'https://name/space/here!!!';
    $nusoap = new soapclient( $ns, true );
    $nusoap->soap_defencodi ng = 'UTF-8';
    $nusoap->setHeaders( '<...>...header s here!!!...</...>' );
    $response = $nusoap->call( 'command', '<...>...data here!...</...>', $ns );

    Then $response will be an associative array of whatever data was
    returned. You should also be checking for errors after each action with
    a function like this:

    function errorCheck( $nusoapObj )
    {
    if( $soapObj->fault )
    {
    trigger_error( "{$soapObj->faultstring} : {$soapObj->faultdetail} ",
    E_USER_ERROR );
    }

    $clientError = $soapObj->getError();
    if( $clientError )
    {
    trigger_error( $clientError, E_USER_ERROR );
    }
    }

    $nusoap = new soapclient( $ns, true );

    errorCheck( $nusoap );

    Comment

    Working...