Jump to content

PHP SOAP without WSDL


nikefido

Recommended Posts

Hello all - I am trying to connect to a web service which is not using WSDL:

 

A typical XML schema (according to their documentation) for a send might look like this:

 

<service>
    <partName>Agent.Agent_Bean_Get_Agent</partName>
    <partTokens>Agent_Tkn=</partTokens>
    <logonUserid>webservice</logonUserid>
    <logonPassword>webservice</logonPassword>
</service>
<data>
    <Code>Something1</Code>
    <Password>123456</Password>
    <Successful></Successful>
    <Error_Message></Error_Message>
</data>

 

Now, for this, I am attempting to connect and send this information. Problem is that I receive the error:

 

Fatal error: Uncaught SoapFault exception: [soapenv:Server.generalException] Error: Parameter 'partName' not found. in /home/discount/public_html/dev/index.php:20 Stack trace: #0 /home/discount/public_html/dev/index.php(20): SoapClient->__soapCall('List_Agents', Array) #1 {main} thrown in /home/discount/public_html/dev/index.php on line 20

 

Here is my PHP code:

<?php

$client = new SoapClient(null, array('location' => "https://www.SOMEURL.COM/SERVICE",
                                     'uri'      => "https://www.SOMEURL.COM/"));

$send = array(
'serviceParameters' => array('logonUserid' => 'webservice',
							 'logonPassword' => 'webservice',
							 'partName' => 'Agent.Agent_Bean_List_Agents',
							 'partTokens' => 'Agent_Tkn='
							),
'serviceData' 		=> array('Test_Code' => 123,
							 'Code' => 'Something1',
                                                                 'Password' => '123456',
							 'Successful' => '',
							 'Error_Message' => ''
					  		)
);

$it = $client->__soapCall("List_Agents", $send);

?>

 

Am I totally missing the way in which I should be passing the proper parameters to this SOAP web service?

 

Link to comment
https://forums.phpfreaks.com/topic/137723-php-soap-without-wsdl/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.