troubleshooting Question

How can i get the wsdl xml string from pear soap server

Avatar of mwskuzzy
mwskuzzy asked on
Web Languages and StandardsPHP
4 Comments1 Solution1052 ViewsLast Modified:
I need to access a pear web service from Delphi but I cannot get the wsdl xml string for this web service. Does anybody know how to retrieve the wsdl string.

The php code client code is below. This is the php client code to access the web service but I need the wsdl to access it from Delphi if that is even possible.

<?php

// create SOAP object
$client = new SoapClient( null, array( 'location' => 'http://dev.gaumina.lt/examcraft_v1/ws/server.php?type=users',
                                       'uri'      => 'http://dev.gaumina.lt/examcraft_v1/ws/',
            'trace' => 1 ) );

// required password for webservices
$secret_key = 'somekey';
$password = sha1( base64_decode( $secret_key ) . date( 'Ymd' ) );
$user_id = 12345;
echo base64_decode( $secret_key )."<br />";

try {
 
 // calling action with params that were specified in tech doc
 $result = $client->__soapCall(
       'getUser',
       array (
        new SoapParam( $password, 'password' ),
        new SoapParam( $user_id, 'user_id' )
       ) );
     
} catch ( SoapFault $soapFault ) {
 
 // try to find out why we can't get required data
 var_dump( $soapFault );
 echo( '<br />Request: ' . htmlentities( $client->__getLastRequest() ) . '<br />' );
 echo( '<br />Response: ' . htmlentities( $client->__getLastResponse() ) . '<br />' );
}

// echo result from webservice
if ( isset( $result ) ) {
 echo( '

' ); print_r( $result ); echo( '

' );
} else {
 echo 'Can\'t find variable "$result"';
}

?>

Thanks
ASKER CERTIFIED SOLUTION
mwskuzzy

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros