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 "Alcaraz Galofre, Joan Eugeni" <jo...@t-systems.es> on 2009/04/03 15:32:35 UTC

RV: problems with Axis2

Sr Developers of Axis2:
 
I have a problem with Axis2 after a couple of days  working without
success
 
I develop a axis2 webservice client embeded into a web application. 
The objective is download a binary file using MTOM technology
 
The webservice client generate the following exception
 
Caused by: javax.activation.UnsupportedDataTypeException: 
no object DCH for MIME type text/xml; charset=UTF-8
 at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
 
The code of the web service client is like this:
 
EndpointReference targetEPR = new EndpointReference(URLConnexion);
Options options = new Options();
options.setTo(targetEPR); 
options.setAction("urn:"+functionName);
options.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE); //configure MTOM at client side
options.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HT
TP, false); //optimize MTOM at client side
options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); 
options.setProperty(Constants.Configuration.MIME_BOUNDARY,
"Axis2_MIME_Boundary"); //force Axis2 MIME head
options.setProperty(HTTPConstants.CHUNKED,Constants.VALUE_TRUE); 
 
options.setTimeOutInMilliSeconds(10000); //delay a maximum of 10 seconds
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OperationClient mepClient =
sender.createClient(ServiceClient.ANON_OUT_IN_OP); //use the
OperationClient method
MessageContext mc = new MessageContext();
SOAPEnvelope env = createEnvelope(XML,functionName);
mc.setEnvelope(env);
 
mepClient.addMessageContext(mc);
mepClient.execute(true); <== GENERATE THE EXCEPTION AT THIS POINT
 

What's it happend? Have anyone any idea?
 
I work with axis2 1.3.jar

for MIME support I use activation.jar (1.1v) and mail.jar (1.4v).
 
Both (client and server) uses the same version of activation.jar and
mail.jar
 
Compiled with WSAD 5.1.1 (WebSphere v5 JRE)
 
The web application is deployed into a WAS 6.1

Both SO are Windows 2000 SP4
 
I hope your answers and thanks in advance!
 
Sincerely
 
Joan Alcaraz
 
PD: sorry my poor english



This e-mail and any attachments may contain confidential or
privileged information. Any unauthorised copying, use or distribution of
this information is strictly prohibited.

Re: RV: problems with Axis2

Posted by Andreas Veithen <an...@gmail.com>.
According to the stacktrace this problem occurs when your code sends
the request. Does your request contain a DataHandler and if so, how is
it constructed?

Andreas

2009/4/6 Alcaraz Galofre, Joan Eugeni <jo...@t-systems.es>:
> Hi Andreas!
>
> The complete stacktrace (as attach file)
>
> Thanks for your answer
>
> Joan
>
> -----Mensaje original-----
> De: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Enviado el: sábado, 04 de abril de 2009 15:06
> Para: axis-user@ws.apache.org
> Asunto: Re: RV: problems with Axis2
>
> Can you post the complete stacktrace of the UnsupportedDataTypeException?
>
> Andreas
>
> On Fri, Apr 3, 2009 at 15:32, Alcaraz Galofre, Joan Eugeni <jo...@t-systems.es> wrote:
>>
>> Sr Developers of Axis2:
>>
>> I have a problem with Axis2 after a couple of days  working without
>> success
>>
>> I develop a axis2 webservice client embeded into a web application.
>> The objective is download a binary file using MTOM technology
>>
>> The webservice client generate the following exception
>>
>> Caused by: javax.activation.UnsupportedDataTypeException:
>> no object DCH for MIME type text/xml; charset=UTF-8
>>  at
>> javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851
>> )
>>
>> The code of the web service client is like this:
>>
>> EndpointReference targetEPR = new EndpointReference(URLConnexion);
>> Options options = new Options(); options.setTo(targetEPR);
>> options.setAction("urn:"+functionName);
>> options.setProperty(Constants.Configuration.ENABLE_MTOM,
>> Constants.VALUE_TRUE); //configure MTOM at client side
>> options.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_
>> HTTP, false); //optimize MTOM at client side
>> options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)
>> ; options.setProperty(Constants.Configuration.MIME_BOUNDARY,
>> "Axis2_MIME_Boundary"); //force Axis2 MIME head
>> options.setProperty(HTTPConstants.CHUNKED,Constants.VALUE_TRUE);
>>
>> options.setTimeOutInMilliSeconds(10000); //delay a maximum of 10
>> seconds ServiceClient sender = new ServiceClient();
>> sender.setOptions(options); OperationClient mepClient =
>> sender.createClient(ServiceClient.ANON_OUT_IN_OP); //use the
>> OperationClient method MessageContext mc = new MessageContext();
>> SOAPEnvelope env = createEnvelope(XML,functionName);
>> mc.setEnvelope(env);
>>
>> mepClient.addMessageContext(mc);
>> mepClient.execute(true); <== GENERATE THE EXCEPTION AT THIS POINT
>>
>> What's it happend? Have anyone any idea?
>>
>> I work with axis2 1.3.jar
>> for MIME support I use activation.jar (1.1v) and mail.jar (1.4v).
>>
>> Both (client and server) uses the same version of activation.jar and
>> mail.jar
>>
>> Compiled with WSAD 5.1.1 (WebSphere v5 JRE)
>>
>> The web application is deployed into a WAS 6.1 Both SO are Windows
>> 2000 SP4
>>
>> I hope your answers and thanks in advance!
>>
>> Sincerely
>>
>> Joan Alcaraz
>>
>> PD: sorry my poor english
>>
>> This e-mail and any attachments may contain confidential or privileged
>> information. Any unauthorised copying, use or distribution of this
>> information is strictly prohibited.
>>
>
>
> This e-mail and any attachments may contain confidential or
> privileged information. Any unauthorised copying, use or distribution of
> this information is strictly prohibited.

RE: RV: problems with Axis2

Posted by "Alcaraz Galofre, Joan Eugeni" <jo...@t-systems.es>.
Hi Andreas!

The complete stacktrace (as attach file) 

Thanks for your answer

Joan 

-----Mensaje original-----
De: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Enviado el: sábado, 04 de abril de 2009 15:06
Para: axis-user@ws.apache.org
Asunto: Re: RV: problems with Axis2

Can you post the complete stacktrace of the UnsupportedDataTypeException?

Andreas

On Fri, Apr 3, 2009 at 15:32, Alcaraz Galofre, Joan Eugeni <jo...@t-systems.es> wrote:
>
> Sr Developers of Axis2:
>
> I have a problem with Axis2 after a couple of days  working without 
> success
>
> I develop a axis2 webservice client embeded into a web application.
> The objective is download a binary file using MTOM technology
>
> The webservice client generate the following exception
>
> Caused by: javax.activation.UnsupportedDataTypeException:
> no object DCH for MIME type text/xml; charset=UTF-8
>  at 
> javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851
> )
>
> The code of the web service client is like this:
>
> EndpointReference targetEPR = new EndpointReference(URLConnexion); 
> Options options = new Options(); options.setTo(targetEPR); 
> options.setAction("urn:"+functionName);
> options.setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE); //configure MTOM at client side 
> options.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_
> HTTP, false); //optimize MTOM at client side 
> options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)
> ; options.setProperty(Constants.Configuration.MIME_BOUNDARY,
> "Axis2_MIME_Boundary"); //force Axis2 MIME head 
> options.setProperty(HTTPConstants.CHUNKED,Constants.VALUE_TRUE);
>
> options.setTimeOutInMilliSeconds(10000); //delay a maximum of 10 
> seconds ServiceClient sender = new ServiceClient(); 
> sender.setOptions(options); OperationClient mepClient = 
> sender.createClient(ServiceClient.ANON_OUT_IN_OP); //use the 
> OperationClient method MessageContext mc = new MessageContext(); 
> SOAPEnvelope env = createEnvelope(XML,functionName); 
> mc.setEnvelope(env);
>
> mepClient.addMessageContext(mc);
> mepClient.execute(true); <== GENERATE THE EXCEPTION AT THIS POINT
>
> What's it happend? Have anyone any idea?
>
> I work with axis2 1.3.jar
> for MIME support I use activation.jar (1.1v) and mail.jar (1.4v).
>
> Both (client and server) uses the same version of activation.jar and 
> mail.jar
>
> Compiled with WSAD 5.1.1 (WebSphere v5 JRE)
>
> The web application is deployed into a WAS 6.1 Both SO are Windows 
> 2000 SP4
>
> I hope your answers and thanks in advance!
>
> Sincerely
>
> Joan Alcaraz
>
> PD: sorry my poor english
>
> This e-mail and any attachments may contain confidential or privileged 
> information. Any unauthorised copying, use or distribution of this 
> information is strictly prohibited.
>


This e-mail and any attachments may contain confidential or
privileged information. Any unauthorised copying, use or distribution of
this information is strictly prohibited.

Re: RV: problems with Axis2

Posted by Andreas Veithen <an...@gmail.com>.
Can you post the complete stacktrace of the UnsupportedDataTypeException?

Andreas

On Fri, Apr 3, 2009 at 15:32, Alcaraz Galofre, Joan Eugeni
<jo...@t-systems.es> wrote:
>
> Sr Developers of Axis2:
>
> I have a problem with Axis2 after a couple of days  working without success
>
> I develop a axis2 webservice client embeded into a web application.
> The objective is download a binary file using MTOM technology
>
> The webservice client generate the following exception
>
> Caused by: javax.activation.UnsupportedDataTypeException:
> no object DCH for MIME type text/xml; charset=UTF-8
>  at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
>
> The code of the web service client is like this:
>
> EndpointReference targetEPR = new EndpointReference(URLConnexion);
> Options options = new Options();
> options.setTo(targetEPR);
> options.setAction("urn:"+functionName);
> options.setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE); //configure MTOM at client side
> options.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,
> false); //optimize MTOM at client side
> options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> options.setProperty(Constants.Configuration.MIME_BOUNDARY,
> "Axis2_MIME_Boundary"); //force Axis2 MIME head
> options.setProperty(HTTPConstants.CHUNKED,Constants.VALUE_TRUE);
>
> options.setTimeOutInMilliSeconds(10000); //delay a maximum of 10 seconds
> ServiceClient sender = new ServiceClient();
> sender.setOptions(options);
> OperationClient mepClient =
> sender.createClient(ServiceClient.ANON_OUT_IN_OP); //use the OperationClient
> method
> MessageContext mc = new MessageContext();
> SOAPEnvelope env = createEnvelope(XML,functionName);
> mc.setEnvelope(env);
>
> mepClient.addMessageContext(mc);
> mepClient.execute(true); <== GENERATE THE EXCEPTION AT THIS POINT
>
> What's it happend? Have anyone any idea?
>
> I work with axis2 1.3.jar
> for MIME support I use activation.jar (1.1v) and mail.jar (1.4v).
>
> Both (client and server) uses the same version of activation.jar and
> mail.jar
>
> Compiled with WSAD 5.1.1 (WebSphere v5 JRE)
>
> The web application is deployed into a WAS 6.1
> Both SO are Windows 2000 SP4
>
> I hope your answers and thanks in advance!
>
> Sincerely
>
> Joan Alcaraz
>
> PD: sorry my poor english
>
> This e-mail and any attachments may contain confidential or
> privileged information. Any unauthorised copying, use or distribution of
> this information is strictly prohibited.
>