[SoapRMI] [SPAM:# 51%] =?iso-8859-1?Q?Re:_[SoapRMI]_[SPAM:#_51%]_bytearray?=
nodep@libero.it
nodep_at_libero.it
Mon, 11 Nov 2002 10:11:48 +0100
> "nodep_at_libero.it" wrote:
>
> > I would like to use byte arrays as parameters.
> > Can you tell me how to modify the Hello sample
> > to pass "byte[]" instead of a "String"?
>
> hi,
>
> you can find example of how byte array is echoed in samples/interop
> and in particular loom on InteropImpl.java - this sample implements
>
> http://www.apache.org/~rubys/ApacheClientInterop.html#25-soap
>
> (interoperability you can check results for XSOAP - look for SoapRMI
> though we have sometimes strange networks problem in indiana.edu
> so XSOAP endpoint http://www.extreme.indiana.edu:1568 is reported as
down)
>
> let me know if you have problems with it.
>
> thanks,
>
> alek
> --
> The ancestor of every action is a thought. - Ralph Waldo Emerson
>
Hi, I just readed your message but I would to add a few
information. I've modified the Hello sample and I used a
byte[] instead of String (the service's interface is:
public interface HelloService extends Remote {
public String sayHello(byte[] array) throws RemoteException;})
and I can see that it send my bytearray, but the response
is an error. I copied below that error:
[ connection1on8090: HttpSocketSoapServerConnection.java:107 process ]
TRACE wai
ting for first line of HTTP request
[ connection1on8090: HttpSocketSoapServerConnection.java:124 process ]
TRACE rec
eiving first line with request:---
POST / HTTP/1.0---
Host: localhost
User-Agent: SoapRMI/1.2
Content-Type: text/xml; charset=utf-8
Content-Length: 1810
SOAPAction: ""
Connection: Close
[ connection1on8090: HttpSocketSoapServerConnection.java:219
process ] received
request:---
<SOAP-ENV:Envelope xmlns:SOAP-
ENV='http://schemas.xmlsoap.org/soap/envelope/' xm
lns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w
3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema' SOAP
-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<m:sayHello xmlns:m='urn:hello:sampl
ello>
<null>yv66vgAAAC4APQoAEQAiCAAjCQAQ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AA4AGw
APAAEAGwAXAAEAGAAAAEUABAABAAAAKbIAB7sACFm3AAkSCrYACyq0AAO2AAsSDLYACyq0A
Aa2AA22AA
62AA+xAAAAAQAZAAAACgACAAAAEwAoABQAAQAcAB0AAQAYAAAAHQACAAEAAAAFKrQABq8AA
AABABkAAA
AGAAEAAAAYAAEAHgAfAAEAGAAAACIAAwADAAAABiontQAGsQAAAAEAGQAAAAoAAgAAAB0AB
QAeAAEAIA
AAAAIAIQ==</null>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
[ connection1on8090: HttpSocketSoapServerConnection.java:275 process ]
TRACE: se
nding response:---
HTTP/1.0 200 OK
Date: 11 Nov 2002 08:43:34 GMT
Server: SoapRMI/1.2
Content-Type: text/xml; charset="utf-8"
Content-Length: 2006
<SOAP-ENV:Envelope xmlns:SOAP-
ENV='http://schemas.xmlsoap.org/soap/envelope/' xm
lns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w
3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema' SOAP
-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/enco
ultcode>SOAP-ENV:Client</faultcode>
<faultstring>soaprmi.soap.DeserializeException: expected class type
must be spec
ified to deserialize object without explicit type information StartTag=
{ 'null'
} at line 6 and column 7 seen "...</m:sayHello>\n<null>"...
(parser state
START_TAG)</faultstring>
<detail><stackTrace>soaprmi.soap.DeserializeException: expected class
type must
be specified to deserialize object without explicit type information
StartTag={
'null' } at line 6 and column 7
seen "...</m:sayHello>\n<null>"... (parser
state START_TAG)
at soaprmi.soapenc.SoapEnc.readObject(SoapEnc.java:396)
at soaprmi.soap.SoapDeserializeContextImpl.readRoots
(SoapDeserializeCont
extImpl.java:317)
at soaprmi.soap.SoapDeserializeContextImpl.done
(SoapDeserializeContextIm
pl.java:135)
at soaprmi.soaprpc.MethodDispatcher.receiveRequest
(MethodDispatcher.java
:252)
at soaprmi.soaprpc.MethodDispatcher.dispatch
(MethodDispatcher.java:139)&
#xD;
at soaprmi.soaprpc.SoapDynamicSkeleton.dispatch
(SoapDynamicSkeleton.java
:75)
at soaprmi.soaprpc.SoapDispatcherImpl.dispatchToService
(SoapDispatcherIm
pl.java:274)
at soaprmi.soaprpc.SoapDispatcherImpl.dispatch
(SoapDispatcherImpl.java:2
00)
at soaprmi.soaprpc.HttpSocketSoapServerConnection.doPost
(HttpSocketSoapS
erverConnection.java:323)
at soaprmi.soaprpc.HttpSocketSoapServerConnection.process
(HttpSocketSoap
ServerConnection.java:250)
at soaprmi.soaprpc.HttpSocketSoapServerConnection.run
(HttpSocketSoapServ
erConnection.java:78)
at java.lang.Thread.run(Thread.java:536)
</stackTrace></detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
[ connection1on8090: HttpSocketSoapServerConnection.java:277 process ]
TRACE: se
nding response headers
I see there's a problem with the "StartTag" but I don't understand
what setting I've to do to solve.
Thanks!
Stefano Pedon