You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Bartek Wasko <ba...@consol.pl> on 2004/10/22 10:05:04 UTC
get value from soap as stream
Hi
Is it possible to read data from soap message in my deserializer as stream ?. So I don't want to register such value, I got from soap, directly with some object in onStartChild() method of my deserializer but
get it directly as stream and write to filesystem without memory overload (attachment can be huge - 200MB). I dont use soap attachments but send attachments as byte64 encoded data within soap envelope.
public SOAPHandler onStartChild(String namespace,
String localName,
String prefix,
Attributes attributes,
DeserializationContext context)
throws SAXException
{
QName typeQName = (QName) typesByMemberName.get(localName);
if (typeQName == null) {
throw new SAXException("Invalid element in Data struct - " + localName);
}
// These can come in either order.
Deserializer dSer = context.getDeserializerForType(typeQName);
if(localName.equals("myBigArray")){
what should I do here????????to get the byte array value as stream
}else{
try {
dSer.registerValueTarget(new FieldTarget(store, localName));
} catch (NoSuchFieldException e) {
throw new SAXException(e);
}
}
return (SOAPHandler) dSer;
}
Regards
Bartek