History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-172
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Dan Diephouse
Reporter: Jara Cesnek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

Fault thrown when returned byte[] array has zero elements.

Created: 14/Nov/05 06:11 AM   Updated: 28/Nov/05 01:57 PM
Component/s: Core
Affects Version/s: 1.0-M5
Fix Version/s: 1.0-M6

Time Tracking:
Not Specified


 Description  « Hide
When using byte[] (xsd:base64Binary) type it must be sended at least one element in this array.

My fix - before call xfire soap function:
if (returnByteArray.length==0) { returnByteArray = new byte[1];} //must send at least one byte else Fault



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 14/Nov/05 11:41 AM
I can't reproduce this. I'm going to guess it was related to the ArrayOfByte issue? If you still get this with the latest CVS just reopen the issue. Thanks.

Jara Cesnek - 16/Nov/05 08:04 AM
Two days ago and still not fresh build in common location
http://dist.codehaus.org/xfire/jars/xfire-all-1.0-SNAPSHOT.jar

where to get this fix as jar? (Dont like CVS and own build


Jara Cesnek - 18/Nov/05 04:31 AM
This happens in M5 too.

2005-11-18 11:21:33,741 DEBUG [org.codehaus.xfire.transport.DefaultEndpoint] - <Received message to /daisy/remoting/xfire>
2005-11-18 11:21:33,851 DEBUG [org.codehaus.xfire.transport.DefaultEndpoint] - <Fault occurred!>
java.lang.NullPointerException
at org.codehaus.xfire.util.Base64.decode(Base64.java:103)
at org.codehaus.xfire.aegis.type.basic.Base64Type.readObject(Base64Type.java:21)
at org.codehaus.xfire.aegis.type.basic.BeanType.readObject(BeanType.java:87)
at org.codehaus.xfire.aegis.type.basic.ArrayType.readObject(ArrayType.java:51)
at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:139)
at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:92)

POST /daisy/remoting/xfire HTTP/1.1

SOAPAction: ""

Content-Type: text/xml

User-Agent: DaisyMidas

Host: pubal:8090

Cookie: JSESSIONID=385D5AF238F7E8884850B649EA2EB0E7

Connection: Keep-Alive

Cache-Control: no-cache

Authorization: NTLM TlRMTVNTUAADAAAAGAAYAGIAAAAYABgAegAAAAwADABIAAAACgAKAFQAAAAEAAQAXgAAAAAAAACSAAAABQKAAgUCzg4AAAAPTQBBAFIAQgBFAFMAcAB1AGIAYQBsAEsAMwBtt9kh+1lIhv0fyNUIMSvSXLLjU8/CnO5tt9kh+1lIhv0fyNUIMSvSXLLjU8/CnO4=

Content-Length: 605

<?xml version="1.0"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><CO_ExecTran xmlns="http://daisy.marbes.cz"><in0>MARBES\pubal;cesnek;20051118112835348</in0><in1>tfskernel3.ProcessIcons.getMetaDataIcons</in1><in2><StubParam xmlns="http://kernel3.modules.daisy.marbes.cz"><binaryValue></binaryValue><paramName>param1</paramName><paramType>Integer</paramType><value>1</value></StubParam></in2><in3>1</in3></CO_ExecTran></SOAP-ENV:Body></SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error

Server: Apache-Coyote/1.1

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Fri, 18 Nov 2005 10:29:06 GMT

Connection: close

e9

<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>Server</faultcode><faultstring>Fault</faultstring></soap:Fault></soap:Body></soap:Envelope>

0

The wrong part is <binaryValue></binaryValue> which get null not byte[0]

Bye


Dan Diephouse - 18/Nov/05 05:18 AM
Ahhhhhh. Now it makes sense. I actually fixed this last night. I broke it a few weeks before that . Now there is a test so it shouldn't ever happen again. I don't have new snapshots uploaded, but I might be able to do that later tonight.

Dan Diephouse - 23/Nov/05 09:08 PM
This is actually fixed now so I'm closing it. Download a new SNAPSHOT and you'll see

Jara Cesnek - 24/Nov/05 07:57 AM
Latest snapshot (only lines numbers changed from previous build):

java.lang.NullPointerException
at org.codehaus.xfire.util.Base64.decode(Base64.java:103)
at org.codehaus.xfire.aegis.type.basic.Base64Type.readObject(Base64Type.java:21)
at org.codehaus.xfire.aegis.type.basic.BeanType.readObject(BeanType.java:81)
at org.codehaus.xfire.aegis.type.basic.ArrayType.readObject(ArrayType.java:51)
at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:125)
at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:291)
at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50)
at org.codehaus.xfire.soap.handler.SoapBindingHandler.invoke(SoapBindingHandler.java:44)


Dan Diephouse - 27/Nov/05 09:28 PM
Sorry for closing when it didn't work again . I've uploaded a new snapshot, could you try that out? I'm pretty sure I thoroughly test this now.

Jara Cesnek - 28/Nov/05 02:59 AM
Due to design changes in our product, we don use this feature anymore.
So I will not need it / test it.