Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jax-ws ri 2.2.10 and PHP SoapClient  RSS feed

 
Juan Manuel Diaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Juan Manuel Diaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I reply to my self:

The problem was on the PHP Client.

This is the working code:

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!