• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jax-ws ri 2.2.10 and PHP SoapClient

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I reply to my self:

The problem was on the PHP Client.

This is the working code:

 
reply
    Bookmark Topic Watch Topic
  • New Topic