* created before calling this method since, for a DOC/LIT/BARE (aka UNWRAPPED) message, the
* ParamaterDescription is used to setup the AxisMessage correctly for use in SOAP Body-based
* dispatching on incoming DOC/LIT/BARE messages.
*/
private AxisOperation createAxisOperation() {
AxisOperation newAxisOperation = null;
try {
if (isOneWay()) {
newAxisOperation = AxisOperationFactory
.getOperationDescription(WSDL2Constants.MEP_URI_IN_ONLY);
} else {
newAxisOperation =
AxisOperationFactory.getOperationDescription(WSDL2Constants.MEP_URI_IN_OUT);
}
//TODO: There are several other MEP's, such as: OUT_ONLY, IN_OPTIONAL_OUT, OUT_IN, OUT_OPTIONAL_IN, ROBUST_OUT_ONLY,
// ROBUST_IN_ONLY
// Determine how these MEP's should be handled, if at all
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(
"Unable to build AxisOperation for OperationDescrition; caught exception.",
e);
}
// TODO: NLS & RAS
throw ExceptionFactory
.makeWebServiceException("Caught exception trying to create AxisOperation", e);
}
newAxisOperation.setName(determineOperationQName(this.methodComposite));
newAxisOperation.setSoapAction(this.getAction());
//REVIEW: Determine if other axisOperation values may need to be set
// Currently, the following values are being set on AxisOperation in
// ServiceBuilder.populateService which we are not setting:
// AxisOperation.setPolicyInclude()
// AxisOperation.setWsamappingList()
// AxisOperation.setOutputAction()
// AxisOperation.addFaultAction()
// AxisOperation.setFaultMessages()
// If this is a DOC/LIT/BARE operation, then set the QName of the input AxisMessage to the
// part for the first IN or IN/OUT non-header parameter. If there are no parameters, then don't set
// anything. The AxisMessage name is used to do SOAP-body based routing of DOC/LIT/BARE
// incoming messages.
if (getSoapBindingStyle() == javax.jws.soap.SOAPBinding.Style.DOCUMENT
&& getSoapBindingUse() == javax.jws.soap.SOAPBinding.Use.LITERAL
&& getSoapBindingParameterStyle() == javax.jws.soap.SOAPBinding.ParameterStyle.BARE)
{
ParameterDescription[] paramDescs = getParameterDescriptions();
if (paramDescs != null && paramDescs.length > 0) {
for (ParameterDescription paramDesc : paramDescs) {
WebParam.Mode paramMode = paramDesc.getMode();
if (!paramDesc.isHeader()
&& (paramMode == WebParam.Mode.IN || paramMode == WebParam.Mode.INOUT))
{
// We've found the first IN or INOUT non-header parameter, so set the AxisMessage
// QName based on this parameter then break out of the loop.
AxisMessage axisMessage =
newAxisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
String elementName = paramDesc.getParameterName();
String partNamespace = paramDesc.getTargetNamespace();
if (log.isDebugEnabled()) {
log.debug("Setting up annotation based Doc/Lit/Bare operation: " +
newAxisOperation.getName()
+ "; axisMessage: " + axisMessage + "; name: "
+ elementName + "; partTNS: " + partNamespace);
}
if (axisMessage == null) {
// TODO: RAS & NLS