SOAP : PHP client /Java server

Discussion in 'Java' started by =?iso-8859-1?B?QmVub+50?=, Jul 12, 2005.

  1. 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.
     
    =?iso-8859-1?B?QmVub+50?=, Jul 12, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,413
    Sham Ramakrishnan
    Jul 1, 2003
  2. Replies:
    2
    Views:
    17,431
    IchBin
    Aug 15, 2006
  3. Ivan S
    Replies:
    0
    Views:
    544
    Ivan S
    Aug 13, 2008
  4. Rajive Narain
    Replies:
    0
    Views:
    1,990
    Rajive Narain
    Sep 18, 2009
  5. Mason Brown
    Replies:
    1
    Views:
    387
Loading...

Share This Page