SOAP : PHP client /Java server

  • Thread starter =?iso-8859-1?B?QmVub+50?=
  • Start date
?

=?iso-8859-1?B?QmVub+50?=

Hi,
I have a problem with the string array type. I want to send a string
array from the php client to the java server (Webservice with SOAP).

Here is the code :
----- Java server method : -----

public String[] crypte(String[] message, String name) throws
RemoteException {
String[] messageFinal = new String[message.length];

[...]

return messageend;

}catch(Exception e){
throw new RemoteException(e.getMessage(), e);
}
}

----- PHP client : -----
$message= array ("aze","sdsq","jhgjhgh");
$wsdl = new SOAP_WSDL($url);
$client= $wsdl->getProxy();
[...]
$messageCrypte = $client->crypte($message, "test");

------------------------
It works very well with a simple String, for example :
$message="jkjhkj"; with
public String[] crypte(String message, String name){...}

but not with a string array. Java doesn't recognise this type.The error
:

"JAXRPCTIE01: caught exception while handling request: unexpected
element type:
expected={http://mywebservice/...}StringArray,actual={http://mywebservice/...}Array"

It works well in the other sens : PHP recognise a string array returned
by the java server : print_r($messageCrypte).

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top