Re: [SOAP] Non-WSDL mode
| From: | Heitor Machado | Date: | Tue, 31 Jul 2007 14:05:18 +0000 |
| Subject: | Re: [SOAP] Non-WSDL mode | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2581@lists.php.net to get a copy of this message | ||
i've got the same 'error' using WSDL mode.
Seems to be a bug.
i'm to interested in a solution for this.
regards
Heitor
On 7/9/07, Dani Castaños <danitao.mailists@gmail.com> wrote:
>
> 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=" Àè‘Ùs犂
> …™j.Ùhttp://schemas.xmlsoap.org/soap/encoding/"
> SOAP-ENV:encodingStyle="jR
> ãE'厇b˜¸ªÀBhttp://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
>
>