axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject Re: [Axis2] Can I enforce MTOM message encoding programatically?
Date Mon, 29 Oct 2007 20:02:34 GMT
Hi,
>>msgContextL.getConfigurationContext().setProperty(Constants.Configuration.ENABLE_MTOM,
> > Constants.VALUE_TRUE);
> This creates a correct MTOM message, however, finally the service
> encounters an exception (something about Mime and writing) and is no
> longer usable from then on.
What is the exception you are getting...

Try the following...
    MessageContext inMessageContext = MessageContext.getCurrentMessageContext();
   OperationContext operationContext = inMessageContext.getOperationContext();
   MessageContext outMessageContext = operationContext

.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
    outMessageContext.setProperty(Constants.Configuration.ENABLE_MTOM,
    Constants.VALUE_TRUE);
thanks,
Thilina
>
> I also tried:
>
> >             MessageContext    msgContextL    =
> > MessageContext.getCurrentMessageContext();
> >
> > msgContextL.getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
> > Constants.VALUE_TRUE);
> This does not work at all, I still get Base64 encoded text messages.
>
> I would much appreciate if someone could tell me the correct way of
> enforcing MTOM encoding programatically
>
> Thanks,
> -Rainer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Thilina Gunarathne  - http://thilinag.blogspot.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