XMLBeans serializes everything in-memory, so that's likely the cause of
your problems. Depending on your schema you may find either ADB or JiBX
a better option. Both ADB and JiBX provide pretty good support for
complex type extension, though JiBX doesn't support runtime typing (with
xsi:type in instance documents).
Complex type restriction is pretty much a silly idea when used with data
binding (like subclassing, but you're taking stuff away rather than
adding it in). If you need to have the complex type restriction
reflected in your data classes I think you're out of luck with both ADB
and JiBX - but at least in the case of JiBX the base type is just used
instead, so as long as you only set the values which are allowed by the
restriction you're ok. To use JiBX you'd need to generate your data
model from the schemas as a separate step, before running WSDL2Java:
http://jibx.sourceforge.net/fromschema/index.html
Otherwise, you can try JAXB. I haven't investigated the JAXB support in
Axis2 recently, but I'd hope it works directly with the input/output
stream without building an in-memory representation.
- Dennis
Sudhir Mongia wrote:
Hi Dennis,
We are not using WS-Security. Still its paining us.
The problem we are facing is memory consumption while serialization.
We are using xmlbeans databinding, we couldn't go for ADB as it
doesn't supports Complex type extension and restrictions and we have
not evaluated other binding options as of now.
Thanks,
Sudhir
On Wed, May 6, 2009 at 3:01 AM, Dennis Sosnoski <[email protected]
<mailto:[email protected]>> wrote:
Hi Sudhir,
Are you using WS-Security for the service? WS-Security builds an
in-memory model of the XML if you're using signatures (and perhaps
at other times - I haven't checked, but there appeared to be some
issues in this area).
If you're not using WS-Security this type of data should not be
causing problems. What data binding approach are you using? (ADB,
XMLBeans, JiBX, JAXB?)
- Dennis
--
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Sudhir Mongia wrote:
Hi,
Has anyone got any experience in this type of problem ? One
possible solution we used temporarily is, pass data fragment
in in a call and do multiple calls to send the complete
data.But we are reluctant to go with this approach in production.
Any help/pointer ?
Thanks,
Sudhir
On Mon, May 4, 2009 at 2:23 PM, Sudhir Mongia
<[email protected] <mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>> wrote:
Hi,
We have a web method exposed by .net app and we using
client stubs
generated through Axis2. This method accepts an array of
objects.
The object is very heavy object containing 25+ members
variables
of double and string type.
The calls to this method fails sometimes due to memory when
we are
trying to send large number of objects e.g. 100000-200000.
Any suggestions/idea , how can we compress the size of data
to fix
this problem? We have control up to some extent on server
side as
well.
Thanks,
Sudhir