Justin,

Can you package your service in an AAR file (or any other deployable
artifact) and post a simple test client that reproduces the problem?

Andreas

On Fri, Aug 14, 2009 at 00:19, JFeisty<[email protected]> wrote:
>
> Axis newbie here....I have a very simple (pojo) web service and am serving it
> using Axis2 v1.5 in Tomcat 6.  I have one web method called test().  It
> takes as a parameter a 'Placeholder' object.  That 'Placeholder' object has
> two private byte array fields exposed with getters and setters.  Here is the
> server-side code:
>
> public class TestWS {
>        public void test(Placeholder p) {
>                System.out.println("Placeholder.first size: " + 
> p.getFirst().length);
>                System.out.println("Placeholder.second size: " + 
> p.getSecond().length);
>        }
>
>
> public class Placeholder {
>        private byte[] first = null;
>        private byte[] second = null;
>
>        public byte[] getFirst() {
>                return first;
>        }
>
>        public void setFirst(byte[] first) {
>                this.first = first;
>        }
>
>        public byte[] getSecond() {
>                return second;
>        }
>
>        public void setSecond(byte[] second) {
>                this.second = second;
>        }
> }
>
> I call this web method and set the Placeholder's 'first' property to a
> 5-byte byte array and the 'second' property to a 2-byte byte array.  The
> output is very surprising:
>
> Placeholder.first size: 5
> Placeholder.second size: 5
>
> What is going on here?  Why is the second byte array the same as the first?
>
> Thanks,
> Justin
> --
> View this message in context: 
> http://www.nabble.com/Passing-2-byte-arrays-to-web-service-is-yielding-strange-results-tp24960357p24960357.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>

Reply via email to