Forums Register Login

Jax-ws ri 2.2.10 and PHP SoapClient

+Pie Number of slices to send: Send
Hi guys!, a have been a long time without opening my eclipse ide. But today i start over again in an old Java EE project. My clients needs a webservice to be consumed through soap 1.2 from PHP 5.

I write the webservice using jax-ws ri 2.2.10 (latest) and try to consume it from PHP using SoapClient.

The problem is when i try to map the classes returned by the WS to PHP classes, using classmap array on SoapClient constructor.

My WS returns an object called "InformesListResponse" which has an attribute called "informes" of type ArrayList<InformeResponse>; InformeResponse is an object who has only strings attributes.

This is my code:

WS Inteface


WS implementation


The PHP client:



The generated wsdl:


And the schema xsd



If i change the value "name" of @WebResult to something different of "return" (which is the default value). So var_dump($result); returns NULL. But if live the value name to its default, the ws returns this:



array(2) {
[0]=> object(stdClass)#4 (8) {
["apynPaciente"]=> string(11) "Diaz Pepe"
["documentoPaciente"]=> string(8) "25452917"
["exploracion"]=> string(46) "Ecografía Obstétrica - Morfología Detallada"
["fechaCreacion"]=> string(21) "10 de Octubre de 2009"
["historiaClinica"]=> string(5) "57205"
["id"]=> string(2) "54"
["realizadoPor"]=> string(17) "Romero, Javier"
["solicitadoPor"]=> string(3) "ggg" }
[1]=> object(stdClass)#5 (8) {
["apynPaciente"]=> string(11) "Diaz Pepe"
["documentoPaciente"]=> string(8) "25452917"
["exploracion"]=> string(24) "Ecografía Ginecológica"
["fechaCreacion"]=> string(20) "8 de Octubre de 2009"
["historiaClinica"]=> string(5) "57205"
["id"]=> string(2) "14"
["realizadoPor"]=> string(20) "Salvans, Pedro"
["solicitadoPor"]=> string(11) "DELLAVEDOVA" }



Any ideas?

Thanks in advanced!
JM
+Pie Number of slices to send: Send
I reply to my self:

The problem was on the PHP Client.

This is the working code:

Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1800 times.
Similar Threads
JAX WS
XmlException on calling WSDL2Java
Axis2 Issue, Please Help!
RAD 7.5 - Top down EJB - Wizard throws Exception
XMLSpy won't work with our AXIS2 WSDL but our system works with it fine
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:43:57.