I haven't gotten a response for my problem. Probably, cos it got lost in the multitude of postings :) So I apologize for reposting this and thank anyone who can help me.
Azmi wrote:
Hi, Can anyone help me with this problem?
My web service and client, which includes methods for file uploading and downloading using
the DataHandler class was previously working with Axis 1.1 (both service and client use Axis).
However I have to update axis to 1.2 because of some other application using axis. I've recompiled
my code (both client and service) with all the jars in the axis 1.2 beta distribution (axis, saaj, jaxrpc etc).
The file upload/download now fails.
The exception thrown when I try to upload a file:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Deserializing parameter 'source': could not find deserializer for type {GridX3}DataHandler
faultActor:
.
.
.
Similarly when I download a file from the web service, a similar exception is thrown(on the client side) when it tries to deserialize.
To serialize/deserialize I use in the client code:
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory; import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
as well as typemapping in the upload/download methods:
DataHandler dhSource = new DataHandler(new FileDataSource(localpath + filename));
call.removeAllParameters(); call.setTargetEndpointAddress(endpointURL); call.setOperationName(new QName(webservice, "setFile"));
QName qnameAttachment = new QName(webservice, "DataHandler"); call.registerTypeMapping( dhSource.getClass(), qnameAttachment, JAFDataHandlerSerializerFactory.class, JAFDataHandlerDeserializerFactory.class);
and in the deployment descriptor I wrote:
<typeMapping
qname="ns2:DataHandler"
languageSpecificType="java:javax.activation.DataHandler"
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
Since no exception is thrown when the file is being serialized, I gather that it's succesful. Thus, why
does it fail when its trying to deserialize??
Any help please?
Thanks, Azmi
