Java Code Examples for javax.jws.WebParam.Mode#INOUT

The following examples show how to use javax.jws.WebParam.Mode#INOUT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WSDLBoundPortTypeImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 2
Source File: WSDLBoundPortTypeImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 3
Source File: WSDLBoundPortTypeImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 4
Source File: WSDLBoundPortTypeImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 5
Source File: WSDLBoundPortTypeImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 6
Source File: WSDLBoundPortTypeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
 *
 * @param operation wsdl:operation@name value. Must be non-null.
 * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
 * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
 * @return null if the binding could not be resolved for the part.
 */
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
    EditableWSDLBoundOperation op = get(operation);
    if (op == null) {
        //TODO throw exception
        return null;
    }
    if ((Mode.IN == mode) || (Mode.INOUT == mode))
        return op.getInputBinding(part);
    else
        return op.getOutputBinding(part);
}
 
Example 7
Source File: WebParamHolder.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected ErrorDescription[] apply(VariableElement subject, ProblemContext ctx) {
    AnnotationMirror paramAnn = Utilities.findAnnotation(subject, ANNOTATION_WEBPARAM);
    if(paramAnn!=null) {
        AnnotationValue val = Utilities.getAnnotationAttrValue(paramAnn, ANNOTATION_ATTRIBUTE_MODE);
        Mode value = null;
        if(val!=null) {
            try {
                value = Mode.valueOf(val.getValue().toString());
            } catch (Exception e) {
                // we dont need to worry as hints for invalid enum value kicks in.
            }
        }
        if((Mode.INOUT == value || Mode.OUT == value) && 
                !"javax.xml.ws.Holder".equals(getVariableType(subject))) {
            String label = NbBundle.getMessage(WebParamHolder.class, "MSG_WebParam_HolderRequired");
            
            Fix fix = new RemoveAnnotationArgument(ctx.getFileObject(),
                    subject, paramAnn, ANNOTATION_ATTRIBUTE_MODE);
            AnnotationTree annotationTree = (AnnotationTree) ctx.getCompilationInfo().
                    getTrees().getTree(subject, paramAnn);
            Tree problemTree = Utilities.getAnnotationArgumentTree(annotationTree, ANNOTATION_ATTRIBUTE_MODE);
            ctx.setElementToAnnotate(problemTree);
            ErrorDescription problem = createProblem(subject, ctx, label, fix);
            ctx.setElementToAnnotate(null);
            return new ErrorDescription[]{problem};
        }
    }
    return null;
}
 
Example 8
Source File: ParameterImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT() {
    return mode==Mode.INOUT;
}
 
Example 9
Source File: ParameterImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT() {
    return mode==Mode.INOUT;
}
 
Example 10
Source File: Parameter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    return (mode == Mode.INOUT);
}
 
Example 11
Source File: IOParametrs.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@WebMethod(operationName="setName")
public void setName(@WebParam(name="name", mode=Mode.INOUT) String name) {
    String personName = name;
}
 
Example 12
Source File: ParameterImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT() {
    return mode==Mode.INOUT;
}
 
Example 13
Source File: MessagePart.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    if(mode!=null)
        return (mode == Mode.INOUT);
    return false;
}
 
Example 14
Source File: HolderService.java    From cxf with Apache License 2.0 4 votes vote down vote up
String echo3(@WebParam(mode = Mode.INOUT, header = true, name = "header")
Holder<String> header, String s1);
 
Example 15
Source File: ParameterImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT() {
    return mode==Mode.INOUT;
}
 
Example 16
Source File: ParameterImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT() {
    return mode==Mode.INOUT;
}
 
Example 17
Source File: Parameter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    return (mode == Mode.INOUT);
}
 
Example 18
Source File: MessagePart.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    if(mode!=null)
        return (mode == Mode.INOUT);
    return false;
}
 
Example 19
Source File: MessagePart.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    if(mode!=null)
        return (mode == Mode.INOUT);
    return false;
}
 
Example 20
Source File: Parameter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isINOUT(){
    return (mode == Mode.INOUT);
}