Hi all!
I have a little problem with Non WSDL Mode. I define classes for my
complex types, but server seems to not recognize them.
My code:
soap_server.php
==============
/*-----------FUNCTIONS----------*/
**
* Method to create an event subscriber
*
* @param SubscriberData $subscriber
* @return unknown
*/
function CreateSubscriber( $subscriber )
{
}//function CreateSubscriber( $name )
/*------------CLASSES---------*/
class SubscriberData
{
public $id;
public $name;
}//class SubscriberData
/*----------------MAIN-----------------*/
$classmap = array('SubscriberData' => 'SubscriberData');
$server = new SoapServer( null, array( 'uri' =>
'http://localhost/poc/', 'classmap' => $classmap ) );
$server->addFunction( 'CreateSubscriber' );
$server->handle( $GLOBALS['HTTP_RAW_POST_DATA'] );
REQUEST
=======
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://localhost/poc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://xml.apache.org/xml-soap"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:CreateSubscriber><param0
xsi:type="ns2:Map"><item><key xsi:type="xsd:string">name</key><value
xsi:type="xsd:string">Dani</value></item></param0></ns1:CreateSubscriber></SOAP-ENV:Body></SOAP-ENV:Envelope>
As you can see, Subscriberdata class is not recognized. It is something
missing in my server constructor??
Thank you in advance!
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php