WSDL11ToAxisServiceBuilder.getMEP(Operation) doesn't always return the correct
MEP
----------------------------------------------------------------------------------
Key: AXIS2-4559
URL: https://issues.apache.org/jira/browse/AXIS2-4559
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: deployment, wsdl
Affects Versions: 1.4
Reporter: Ben Reif
If you want to define a Robust-In-Only operation in WSDL 1.1 you can't just
define a <wsdl:operation> in a <wsdl:portType> that only has a <wsdl:input> and
a <wsdl:fault>. The schema says that you have to also define a <wsdl:output>
tag, which then gets mapped to an empty <wsdl:message> element.
Because the operation now has a <wsdl:input> and also a <wsdl:output>, this
causes the WSDL parser to set the operation style to REQUEST-RESPONSE instead
of ONE-WAY. This might seem to be an issue with the WSDL parser, but one could
make the argument that WSDL 1.1 doesn't support the Robust-In-Only MEP.
However, it seems that the Axis2 code has been written to account for it anyway.
Rather then just relying on the Operation.getStyle() method to determine the
MEP, the WSDL11ToAxisServiceBuilder.getMEP(Operation) method should be looking
at the Message Parts within the Input and Output to determine the correct MEP.
Maybe something similar to this:
private String getMEP(Operation operation) throws AxisFault {
if (isServerSide) {
if(OperationType.NOTIFICATION.equals(operation.getStyle())){
return WSDL2Constants.MEP_URI_OUT_ONLY;
} else
if(OperationType.SOLICIT_RESPONSE.equals(operation.getStyle())){
return WSDL2Constants.MEP_URI_OUT_IN;
} else
if(!operation.getInput().getMessage().getParts().isEmpty()){
if(!operation.getOutput().getMessage().getParts().isEmpty()){
return WSDL2Constants.MEP_URI_IN_OUT;
} else if(operation.getFaults().isEmpty()) {
return WSDL2Constants.MEP_URI_IN_ONLY;
} else {
return WSDL2Constants.MEP_URI_ROBUST_IN_ONLY;
}
} else {
return WSDL2Constants.MEP_URI_IN_OUT;
}
}
else {
if(OperationType.NOTIFICATION.equals(operation.getStyle())){
return WSDL2Constants.MEP_URI_IN_ONLY;
} else
if(OperationType.SOLICIT_RESPONSE.equals(operation.getStyle())){
return WSDL2Constants.MEP_URI_IN_OUT;
} else
if(!operation.getInput().getMessage().getParts().isEmpty()){
if(!operation.getOutput().getMessage().getParts().isEmpty()){
return WSDL2Constants.MEP_URI_OUT_IN;
} else if(operation.getFaults().isEmpty()) {
return WSDL2Constants.MEP_URI_OUT_ONLY;
} else {
return WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY;
}
} else {
return WSDL2Constants.MEP_URI_OUT_IN;
}
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.