Package org.apache.axis2.jaxws.description

Examples of org.apache.axis2.jaxws.description.OperationDescription


        if (ops.length > 1) {
            throw ExceptionFactory.makeWebServiceException(
                    "More than one operation found. Overloaded WSDL operations are not supported.  WSDL Operation name: " +
                            mc.getOperationName());
        }
        OperationDescription op = ops[0];
        return op;
    }
View Full Code Here


    private boolean checkOperationsMatchMethods(List wsdlOperationList, OperationDescription[]
            opDescArray) {
        List<String> opNameList = createWSDLOperationNameList(wsdlOperationList);
        for (int i = 0; i < opDescArray.length; i++) {
            OperationDescription opDesc = opDescArray[i];
            if (opNameList.contains(opDesc.getOperationName())) {
                opNameList.remove(opDesc.getOperationName());
            } else {
                return false;
            }
        }
        return true;
View Full Code Here

        }
        return method;
    }

    private Method getServiceMethod(MessageContext mc) {
        OperationDescription opDesc = mc.getOperationDescription();
        if (opDesc == null) {
            throw ExceptionFactory.makeWebServiceException("Operation Description was not set");
        }

        Method returnMethod = opDesc.getMethodFromServiceImpl(this.serviceImplClass);
        if (returnMethod == null) {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("JavaBeanDispatcherErr1"));
        }
View Full Code Here

        if (ops.length > 1) {
            throw ExceptionFactory.makeWebServiceException(
                    "More than one operation found. Overloaded WSDL operations are not supported.  WSDL Operation name: " +
                            mc.getOperationName());
        }
        OperationDescription op = ops[0];
        return op;
    }
View Full Code Here

        }
        return method;
    }
   
    private Method getServiceMethod(MessageContext mc) {
        OperationDescription opDesc = mc.getOperationDescription();
        if (opDesc == null) {
            throw ExceptionFactory.makeWebServiceException("Operation Description was not set");
        }

        Method returnMethod = opDesc.getMethodFromServiceImpl(this.serviceImplClass);
        if (returnMethod == null) {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("JavaBeanDispatcherErr1"));
        }
View Full Code Here

        if (ops.length > 1) {
            throw ExceptionFactory.makeWebServiceException(
                    "More than one operation found. Overloaded WSDL operations are not supported.  WSDL Operation name: " +
                            mc.getOperationName());
        }
        OperationDescription op = ops[0];
        return op;
    }
View Full Code Here

        // Per JSR-181 all methods on the SEI are mapped to operations regardless
        // of whether they include an @WebMethod annotation.  That annotation may
        // be present to customize the mapping, but is not required (p14)
        for (Method method : getSEIMethods(dbc.getCorrespondingClass())) {
            OperationDescription operation = new OperationDescriptionImpl(method, this);
            addOperation(operation);
        }
    }
View Full Code Here

        } catch (AxisFault e) {
            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("eiDescrImplErr"),e);
        }
       
        genericProviderAxisOp.setName(new QName(JAXWS_NOWSDL_PROVIDER_OPERATION_NAME));
        OperationDescription opDesc = new OperationDescriptionImpl(genericProviderAxisOp, this);
       
        addOperation(opDesc);
        AxisService axisService = getEndpointDescription().getAxisService();
        axisService.addOperation(genericProviderAxisOp);
    }
View Full Code Here

                AxisService axisService = getEndpointDescription().getAxisService();
                AxisOperation axisOperation = axisService
                        .getOperation(OperationDescriptionImpl.determineOperationQName(this, mdc));
               
                OperationDescription operation =
                    new OperationDescriptionImpl(mdc, this, axisOperation);

                //1) if wsdl is defined then we should only expose operations that are in wsdl.
                //NOTE:If wsdl is defined AxisService will have all operations found in wsdl,
                //AxisServiceBuilder will do that part before metadata layer is invoked.
                //2) if wsdl not defined we need to expose operations based on annotation, in
                //which case we need add operations not found in AxisService.
                if(getWSDLDefinition() != null){
                    if(log.isDebugEnabled()){
                        log.debug("wsdl definition found, we will not expose operation not found in AxisService.");
                    }
                    if (log.isDebugEnabled())
                        log.debug("EID: Just added operation= " + operation.getOperationName());
                    addOperation(operation);
                    //Cater to partial wsdl case, if wsdl is found but AxisService was
                    //not built using this wsdl we need to add operation to AxisService.
                    if(!getEndpointDescriptionImpl().isWSDLFullySpecified()){
                        if(log.isDebugEnabled()){
                            log.debug("Partial wsdl definition found, we will add operation to the AxisService.");
                        }
                        ((OperationDescriptionImpl)operation).addToAxisService(axisService);
                    }
                }
                //Since wsdl is not defined add all operations to AxisService and OperationDescriptionList.
                else if(axisOperation == null) {
                    if(log.isDebugEnabled()){
                        log.debug("wsdl defintion NOT found, we will expose operation using annotations.");
                    }
                    // This axisOperation did not already exist on the AxisService, and so was created
                    // with the OperationDescription, so we need to add the operation to the service
                    ((OperationDescriptionImpl)operation).addToAxisService(axisService);
                    if (log.isDebugEnabled())
                        log.debug("EID: Just added operation= " + operation.getOperationName());
                    addOperation(operation);
                }
                //This is the case where wsdl is not defined and AxisOperation is found in Axis Service.
                //Here we have to ensure that corresponding OperationDescription is added to OperationDescriptionList.
                else if(getWSDLDefinition()==null && axisOperation!=null){
                    if (log.isDebugEnabled())
                        log.debug("EID: Just added operation= " + operation.getOperationName());
                    addOperation(operation);
                }
            }
          
        }
View Full Code Here

                if (updateOpDesc == null || updateOpDesc.length == 0) {
                    // This operation wasn't defined in the WSDL.  Note that the JAX-WS async methods
                    // which are defined on the SEI are not defined as operations in the WSDL.
                    // Although they usually specific the same OperationName as the WSDL operation,
                    // there may be cases where they do not.
                    OperationDescription operation = new OperationDescriptionImpl(seiMethod, this);
                    addOperation(operation);
                } else {
                    // Currently Axis2 does not support overloaded operations.  That means that even if the WSDL
                    // defined overloaded operations, there would still only be a single AxisOperation, and it
                    // would be the last operation encounterd.
                    // HOWEVER the generated JAX-WS async methods (see above) may (will always?) have the same
                    // operation name and so will come down this path; they need to be added.
                    // TODO: When Axis2 starts supporting overloaded operations, then this logic will need to be changed

                    // Loop through all the opdescs; if one doesn't currently have a java method set, set it
                    // If all have java methods set, then add a new one.  Assume we'll need to add a new one.
                    boolean addOpDesc = true;
                    for (OperationDescription checkOpDesc : updateOpDesc) {
                        if (checkOpDesc.getSEIMethod() == null) {
                            // TODO: Should this be checking (somehow) that the signature matches?  Probably not an issue until overloaded WSDL ops are supported.
                           
                            //Make sure that this is not one of the 'async' methods associated with
                            //this operation. If it is, let it be created as its own opDesc.
                            if (!DescriptionUtils.isAsync(seiMethod)) {
                                ((OperationDescriptionImpl) checkOpDesc).setSEIMethod(seiMethod);
                                addOpDesc = false;
                                break;
                            }
                        }
                    }
                    if (addOpDesc) {
                        OperationDescription operation =
                                new OperationDescriptionImpl(seiMethod, this);
                        addOperation(operation);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.OperationDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.