Package javax.xml.ws

Examples of javax.xml.ws.Action


        //nothing
        if (method == null) {
            return;
        }

        Action action = method.getAnnotation(Action.class);
        if (action == null) {
            return;
        }
        MessageInfo input = operation.getInput();
        if (!StringUtils.isEmpty(action.input())) {
            input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.input());
        }
       
        MessageInfo output = operation.getOutput();
        if (output != null && !StringUtils.isEmpty(action.output())) {
            output.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.output());
        }
       
        FaultAction[] faultActions = action.fault();
        if (faultActions != null
            && faultActions.length > 0
            && operation.getFaults() != null) {
            for (FaultAction faultAction : faultActions) {               
                FaultInfo faultInfo = getFaultInfo(operation, faultAction.className());
View Full Code Here


    @Override
    public void addOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
        if (!enabled)
            return;

        Action a = method.getSEIMethod().getAnnotation(Action.class);
        if (a != null && !a.input().equals("")) {
            addAttribute(input, a.input());
        } else {
            if (method.getBinding().getSOAPAction().equals("")) {
                //hack: generate default action for interop with .Net3.0 when soapAction is non-empty
                String defaultAction = getDefaultAction(method);
                addAttribute(input, defaultAction);
View Full Code Here

    @Override
    public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
        if (!enabled)
            return;

        Action a = method.getSEIMethod().getAnnotation(Action.class);
        if (a != null && !a.output().equals("")) {
            addAttribute(output, a.output());
        }
    }
View Full Code Here

    @Override
    public void addOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
        if (!enabled)
            return;

        Action a = method.getSEIMethod().getAnnotation(Action.class);
        Class[] exs = method.getSEIMethod().getExceptionTypes();

        if (exs == null)
            return;

        if (a != null && a.fault() != null) {
            for (FaultAction fa : a.fault()) {
                if (fa.className().getName().equals(ce.getExceptionClass().getName())) {
                    if (fa.value().equals(""))
                        return;

                    addAttribute(fault, fa.value());
View Full Code Here

     */
    public JavaMethodImpl(AbstractSEIModelImpl owner, Method method, Method seiMethod) {
        this.owner = owner;
        this.method = method;
        this.seiMethod = seiMethod;
        Action action = method.getAnnotation(Action.class);
        if(action != null) {
            inputAction = action.input();
            outputAction = action.output();
        }
    }
View Full Code Here

        String action = "";
        if (wm != null) {
            action = wm.action();
        }
        if (StringUtils.isEmpty(action)) {
            Action act = method.getAnnotation(Action.class);
            if (act != null) {
                action = act.input();
            }
        }
        return action;
    }
View Full Code Here

     * @param mdc    - <code>MethodDescriptionComposite</code>
     * @param method - <code>Method</code>
     */
    private void attachActionAnnotation(MethodDescriptionComposite mdc, Method
            method) {
        Action action = (Action)ConverterUtils.getAnnotation(Action.class,
                                                             method);
        if (action != null) {
            ActionAnnot actionAnnot = ActionAnnot.createActionAnnotImpl();
            FaultAction[] faults = action.fault();
           
            if (faults != null && faults.length != 0) {
                List<FaultAction> list = new ArrayList<FaultAction>();
                for (FaultAction fault : faults) {
                    FaultActionAnnot faultAnnot =
                        FaultActionAnnot.createFaultActionAnnotImpl();
                    faultAnnot.setClassName(fault.className());
                    faultAnnot.setValue(fault.value());
                    list.add(faultAnnot);
                }
                actionAnnot.setFault(list.toArray(new FaultAction[0]));
            }
           
            actionAnnot.setInput(action.input());
            actionAnnot.setOutput(action.output());
            mdc.setActionAnnot(actionAnnot);
        }
    }
View Full Code Here

        //nothing
        if (method == null) {
            return;
        }

        Action action = method.getAnnotation(Action.class);
        if (action == null) {
            return;
        }
        MessageInfo input = operation.getInput();
        if (!StringUtils.isEmpty(action.input())) {
            input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.input());
        }
       
        MessageInfo output = operation.getOutput();
        if (output != null && !StringUtils.isEmpty(action.output())) {
            output.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.output());
        }
       
        FaultAction[] faultActions = action.fault();
        if (faultActions != null
            && faultActions.length > 0
            && operation.getFaults() != null) {
            for (FaultAction faultAction : faultActions) {               
                FaultInfo faultInfo = getFaultInfo(operation, faultAction.className());
View Full Code Here

        //nothing
        if (method == null) {
            return;
        }

        Action action = method.getAnnotation(Action.class);
        Addressing addressing = method.getDeclaringClass().getAnnotation(Addressing.class);
        if (action == null && addressing == null) {
            return;
        }
        WebMethod wm = method.getAnnotation(WebMethod.class);
        String inputAction = "";
        if (action != null) {
            inputAction = action.input();
        }
        if (wm != null && StringUtils.isEmpty(inputAction)) {
            inputAction = wm.action();
        }
        if (StringUtils.isEmpty(inputAction)) {
            inputAction = computeAction(operation, "Request");
        }
        if (action == null && addressing != null) {
            operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
                                                       inputAction);
            operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
                                                       inputAction);
            if (operation.getOutput() != null) {
                operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
                                                            computeAction(operation, "Response"));
                operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
                                                            computeAction(operation, "Response"));
            }

        } else {
            MessageInfo input = operation.getInput();
            input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, inputAction);
            if (!StringUtils.isEmpty(action.input())) {
                input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, inputAction);
            }

            MessageInfo output = operation.getOutput();
            if (output != null && !StringUtils.isEmpty(action.output())) {
                output.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.output());
                output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, action.output());
            } else if (output != null) {
                output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, computeAction(operation,
                                                                                              "Response"));
            }

            FaultAction[] faultActions = action.fault();
            if (faultActions != null && faultActions.length > 0 && operation.getFaults() != null) {
                for (FaultAction faultAction : faultActions) {
                    FaultInfo faultInfo = getFaultInfo(operation, faultAction.className());
                    if (faultInfo != null && !StringUtils.isEmpty(faultAction.value())) {
                        faultInfo.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, faultAction
View Full Code Here

        String action = "";
        if (wm != null) {
            action = wm.action();
        }
        if (StringUtils.isEmpty(action)) {
            Action act = method.getAnnotation(Action.class);
            if (act != null) {
                action = act.input();
            }
        }
        return action;
    }
View Full Code Here

TOP

Related Classes of javax.xml.ws.Action

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.