Re: More SOAP questions. Also, SOAP bug? Or just me? (long)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> different question asked below.  So I then add in:
>
> echo 'Types: <pre>' . print_r( $oClient->__getTypes(), TRUE ) . '</pre>';
>
> and it turns out that the "data-array" definition in the WSDL is
> getting translated as the following structure:
>
> [XX] => struct data-array {
>  any;
> }
>
> Umm, huh?  What's going on there?  Why is the SoapClient the part of
> the namespace included in the definition for the type in the WSDL
> (<xs:any maxOccurs="unbounded"/>) and turning the "any" into an
> attribute of the structure?  So in order to get the "data-array" node
> in the SOAP message body, I have to change the parameters definition
> to:
>
> $aParameters = array( 'authentication'  => array( 'username' => 'user',
>
> 'password' => 'pass' ),
>                                  'stringvar1'      => 'here',
>                                  'stringvar2'      => 'there',
>                                  'data-array'      => array( 'any' =>
> '<sub-data>Bob</sub-data>' ));
>
> That seems exceptionally silly to me.  Is this a bug in the
> SoapClient's translation of the WSDL?  A problem with the WSDL?  Or a
> problem with my (albeit simplistic) code and is something I can and
> should get around using proper attributes?  If it's the latter, how
> can I define attributes for the various nodes?

It seems like this is having an additional affect of not allowing the
'classmap' functionality to work properly.  When I do:

$oClient->__getLastResponse()

I see the full SOAP message XML and it appears to be properly formed.
So (unless I am profoundly misunderstanding how classmap works) it
should be when I try to do:

$oResponse = $oClient->ServerOperation( $aParameters );

the $oResponse object should be instantiated with it's attributes
populated with the proper values, corresponding with the various
nodes/values that appear in the XML SOAP response.  The problem is, it
isn't.  I've tried creating __get() and __set() methods in the class
to see if they are being called and/or what is getting passed in (if
anything) and I'm not seeing any of my debug outout.  Additionally, if
I run

var_export( $oResponse );

I am seeing:

MyResponseClass::__set_state(array(
   'any' => '',
))

That doesn't seem right.  Further, if I try to access the "any"
property of the object, there is no value (as illustrated above).
It's as if nothing was done with the XML SOAP response w/r/t defining
the classmap option.

So what's going on?  Am I doing something wrong?  Am I totally
misunderstanding something here?

thnx,
Christoph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux