axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor (JIRA)" <>
Subject [jira] [Commented] (AXIS2-4551) AxisOperationFactory.getAxisOperation(int mepURI) returns the wrong AxisOperation instance for MEPs
Date Thu, 20 Aug 2015 13:16:46 GMT


Victor commented on AXIS2-4551:


I am facing problems related with this issue using Axis2 1.6.3 : org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(Operation,
PortType, Definition) create an OutOnlyAxisOperation from a RobustInOnly declared operation
in the wsdl (it has an input and a fault in consumer mode).

The problem is that then I can't access the Fault from the corresponding OutOnlyAxisOperationClient
with getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE): I just
get an Exception.
While with an InOut operation declared in the wsdl (with an input and a output in consumer
mode), I get an OutInAxisOperation and I can access the Fault with org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE.

There is something fishy there :)


> AxisOperationFactory.getAxisOperation(int mepURI) returns the wrong AxisOperation instance
for MEPs
> --------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-4551
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen, deployment, wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
> AxisOperationFactory.getAxisOperation(int mepURI) returns the wrong AxisOperation instance
for the ROBUST_IN_ONLY MEP. The code returns an InOutAxisOperation from this:
>      abOpdesc = new InOutAxisOperation();
>      abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY);
>       break;
> }
> There should be a coresponding RobustInOnlyAxisOperation that it returns like this:
>      abOpdesc = new RobustInOnlyAxisOperation();
>      abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY);
>       break;
> }
> This causes issues because it adds an out AxisMessage to the operation and also generates
an <output> in the WSDL operations. This in-turn causes other code to think that it's
a Request-Response style service and you get exceptions when no response comes back, like
"The input stream for an incoming message is null".
> On the same note, AxisOperationFactory.getAxisOperationDescription(String mepURI)  also
needs to be fixed for Robust-Out-Only and Robust-In-Only MEPs
> else if (WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI) ||
>              WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI) ||
>              WSDL20_2004_Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
>      abOpdesc = new RobustOutOnlyAxisOperation();
>      abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY);
> } else if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI) ||
>                WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI) ||
>                WSDL20_2004_Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
>      abOpdesc = new RobustInOnlyAxisOperation();
>      abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY);
> }
> If a new RobustInOnlyAxisOperation is unnecessary for some reason, then at least the
AxisOperationFactory.getAxisOperationDescription(String mepURI)  method should be made consistent
and the check for the ROBUST_IN_ONLY MEP should return an instance of InOutAxisOperation,
the same way that AxisOperationFactory.getAxisOperation(int mepURI) does.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message