axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Re: Axis2 byte[] transfer/serialization bug ?!
Date Tue, 24 Jul 2007 08:08:53 GMT
Georgi

You could also try the 1.3 RC2. Its probable this has already been fixed.

http://people.apache.org/~deepal/axis2/1.3-RC2/

Paul

On 7/24/07, Paul Fremantle <pzfreo@gmail.com> wrote:
> Georgi
>
> Can you change your POJO to use the DataHandler interface?
>
>
> import javax.activation.DataHandler;
> import org.apache.axiom.attachments.ByteArrayDataSource;
>
> DataHandler dh = new DataHandler(new ByteArrayDataSource(bytes));
>
> This might work around the problem.
>
> You should look out for the result being passed as a base64 instead of
> an array of individual bytes.
>
> Can you also please raise a JIRA about this?
>
> Thanks very much
>
> Paul
>
> On 7/24/07, Georgi Yonchev <g.yonchev@bers-soft.com> wrote:
> > Paul Fremantle wrote:
> > > Can you post the interface (or the POJO itself) and the services.xml.
> > > Its not handling the byte[] correctly as a base64binary.
> > >
> > > Paul
> > >
> > > On 7/24/07, Georgi Yonchev <g.yonchev@bers-soft.com> wrote:
> > >> Paul Fremantle wrote:
> > >> > George
> > >> >
> > >> > Is there any stack trace? How big is the byte[] before it crashes?
Can
> > >> > you attach any code you've generated? What kind of databinding are
you
> > >> > using? Which version of Axis2?
> > >> >
> > >> > Paul
> > >> >
> > >> > On 7/24/07, Georgi Yonchev <g.yonchev@bers-soft.com> wrote:
> > >> >> Hi,
> > >> >> i developing a web service, based on Axis2,
> > >> >> and the client side on gSOAP
> > >> >> and i have a serious problem,
> > >> >> Each call, return a complex type Result,
> > >> >> how contains a String, int & comples type ResultData (i try
with
> > >> Object
> > >> >> (anyType) but always get a null, only if i set the object like
a
> > >> String)
> > >> >> so the ResultData contains again String, int & byte[]
> > >> >> everything goes well, but when i set something bigger in byte[],
the
> > >> >> serialization crashes.
> > >> >> i don't want to use MTOM ...
> > >> >> only works when the return type of a call is byte[], isn't complex
> > >> type
> > >> >>
> > >> >> here is a part of my wsdl:
> > >> >>
> > >> >> <xs:element name="Result" type="ax21:Result" />
> > >> >> <xs:complexType name="Result">
> > >> >> <xs:sequence>
> > >> >> <xs:element name="_Data" nillable="true" type="ax21:ResultData"
/>
> > >> >> <xs:element name="_Description" nillable="true" type="xs:string"
/>
> > >> >> <xs:element name="_ErrorCode" type="xs:int" />
> > >> >> </xs:sequence>
> > >> >> </xs:complexType>
> > >> >> <xs:element name="ResultData" type="ax21:ResultData" />
> > >> >> <xs:complexType name="ResultData">
> > >> >> <xs:sequence>
> > >> >> <xs:element name="byteData" nillable="true" type="xs:base64Binary"
/>
> > >> >> <xs:element name="intData" type="xs:int" />
> > >> >> <xs:element name="stringData" nillable="true" type="xs:string"
/>
> > >> >> </xs:sequence>
> > >> >> </xs:complexType>
> > >> >>
> > >> >> can you give me some help ..
> > >> >>
> > >> >> Best Regards
> > >> >> George
> > >> >>
> > >> >>
> > >> >> ---------------------------------------------------------------------
> > >> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > >> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >> Hi Paul,
> > >> there is no stack trace, no errors, the call i succeed, but on client
> > >> side ... (heap exception)
> > >> I'm using Axis2 1.2, how bigger is the byte[] ?
> > >> works with 4 bytes :) later i try something real and again small (14 kB)
> > >> but the serialization goes nasty ..
> > >>
> > >> i can paste you the payload, which i sniffed with ethereal
> > >>
> > >> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
> > >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:getMailAttachmentResponse
> > >>
> > >> xmlns:ns="http:///xsd"><ns:return><ns:_Data><ns:byteData>77</ns:byteData><ns:byteData>68</ns:byteData><ns:byteData>69</ns:byteData><ns:byteData>121</ns:byteData><ns:byteData>77</ns:byteData><ns:byteData>122</ns:byteData><ns:byteData>81</ns:byteData><ns:byteData>49</ns:byteData><ns:byteData>78<
> > >>
> > >>
> > >> etc..
> > >>
> > >> the service is written in POJO
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: axis-user-help@ws.apache.org
> > >>
> > >>
> > >
> > >
> > Attaching a simple snapshot of my service ..
> > call test1 works with larger size
> > the problem is on test2 & test3, which is complex types
> >
> > here is and the conf file, may there is the problem !?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message