Hi,
I need to send a byte array (i.e. byte[]) secret key from client to webservice to be used for encryption in both parties.
First I tried to build a method in webservice that accepts a byte [] and retrun byte [] as well but when I initiate the call from client I get this exception at client side:
javax.xml.rpc.JAXRPCException: Simple Type Mismatch
at com.sun.j2mews.xml.rpc.SOAPEncoder.encode(SOAPEncoder.java:81)
at com.sun.j2mews.xml.rpc.OperationImpl.invoke(OperationImpl.java:233)
I think because I edited the type of input/ouput parameters mannually in the stub to be Type.Byte becaue it was giving me UNKNOWN type.
Second I tried to convert byte array to
string (i.e. new String(b,0,b.length) ) but when I initiate webservice call I get this exception at server side:
javax.xml.ws.soap.SOAPFaultException: Bad request
at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.raiseBadXMLFault(SOAPXMLDecoder.java:172)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:87)
please help me how to transfer a byte array as parameter to webservice and get an output of byte array to the client?
is it allowed!!!