Hi,
I'm trying to encode binary data to be delivered from an Axis2 web
service based the capabilities that a client explicitly specifies. This
requires that MTOM is programatically enabled or disabled when creating
the responsne message. Hence I cannot use the services.xml.
I tried the following in the service implementation:
MessageContext msgContextL =
MessageContext.getCurrentMessageContext();
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.
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]