Hi,

after verification of the behavior I filed a JIRA (AXIS2-3340).

Thanks again,
-Rainer


Thilina Gunarathne wrote:
Hi,
When the flag is set to "optional" and the request message is a
MTOMized one, then the system is expected to work as MTOM was enabled.
 Does the "optional" work for non-fault cases.. Please log a jira if
it is not working even for the non-fault scenarios.

Not sure what is going wrong.. I'll do some testing when I find a time.

thanks,
Thilina

On Nov 7, 2007 8:52 AM, Rainer Menzner <[EMAIL PROTECTED]> wrote:
Hi,

Thilina Gunarathne wrote:
Hi,


Thilina recently helped me out on how to enforce the output encoding to
be MTOM if input is also MTOM, using this kind of code:

This is little bit more easy with the 1.3 release.. You can change the
enableMTOM parameter as follows to get the behaviour you wanted..
<parameter name="enableMTOM">optional</parameter>
But unfortunately Axis2 1.3 release seems to have a problem with
interoperating MTOM with .net. That issue is fixed in the nightly
builds..

I'm not sure whether the above would work for faults though...


after checking several combination of settings and source code
modifications I would say it does not work for faults. Setting
enableMTOM to false or optional has no effect.

What is the behaviour you get if you set the parameter to "true"..
Does it send the faults using MTOM encoding..


If enableMTOM is set to true, it sends the AxisFault as MTOM mime
multipart message. But then it does this always, even for clients and
that do not send  and are not able to process MTOM messages. Hence this
is not a viable way for us.

Anyhow, the only drawback is that the true error message is not
propagated to the end user. We can still log it internally, and after
all, I think that WSE3 is not acting properly. I do not see much sense
in sending and error message as MTOM.

All I said refers to Axis2-1.3. I did not check the nightly build.

Greetings,
-Rainer


thanks,
Thilina


            MessageContext        inMessageContextL    =
MessageContext.getCurrentMessageContext();
            OperationContext    operationContextL    =
inMessageContextL.getOperationContext();
            MessageContext        outMessageContextL    =
operationContextL.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            boolean                isInputMtomL        =
inMessageContextL.isDoingMTOM();

 outMessageContextL.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);

The problem I now encounter is that WSE3 also expects AxisFaults to be
dummy-encoded in MTOM. In ...MessageReceiverInOut.java I have tried to
use code similar to the above like


            MessageContext        inMessageContextL    =
MessageContext.getCurrentMessageContext();
            OperationContext    operationContextL    =
inMessageContextL.getOperationContext();
            MessageContext        outMessageContextL    =
operationContextL.getMessageContext(WSDLConstants.MESSAGE_LABEL_FAULT_VALUE);
            boolean                isInputMtomL        =
inMessageContextL.isDoingMTOM();

outMessageContextL.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);

which did not work. Neither did a


 msgContext.setProperty(Constants.Configuration.ENABLE_MTOM,
isInputMtomL);

in the catch-handler of invokeBusinessLogic() do it.  The AxisFault is
always formatted as XML/Text message.

I would appreciate if anybody could give me a hint on how to resolve
this final issue. Axis seems to be flexible enough to compensate the
peculiarities of other well-known vendor's software.

Thanks,
-Rainer



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--

______________________________________________

*Dr. Rainer Menzner*
Principal Engineer, R&D

*L-1 Identity Solutions AG*
/Protecting and Securing Personal Identities and Assets/

Universitätsstr. 160
44801 Bochum, Germany
Telephone:      +49-234-9787-41
Facsimile:      +49-234-9787-77
Mobile:         0160 / 700 99 07
email:  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>


www.L1ID.com <http://www.l1id.com/>

This message is only for the use of the intended recipient and may contain information that is CONFIDENTIAL and PROPRIETARY to L-1 Identity Solutions. If you are not the intended recipient, please erase all copies of the message and its attachments and notify the sender immediately.

VORSTAND / EXECUTIVE BOARD Hartmuth von Maltzahn (Vors. / Chairman), Dr. Stefan Gehlen | AUFSICHTSRAT / SUPERVISORY BOARD James H. Moar (Vors. / Chairman) | GERICHTSSTAND / REGISTER COURT Amtsgericht Bochum, HRB 69 54 | UST-ID / VAT-REG.-NO. DE 813124378

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to