Java Code Examples for com.sun.xml.internal.ws.api.databinding.MetadataReader#getAnnotation()

The following examples show how to use com.sun.xml.internal.ws.api.databinding.MetadataReader#getAnnotation() . 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: JavaMethodImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 2
Source File: JavaMethodImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 3
Source File: JavaMethodImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 4
Source File: JavaMethodImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 5
Source File: JavaMethodImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 6
Source File: JavaMethodImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 7
Source File: JavaMethodImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 8
Source File: JavaMethodImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void setWsaActions(MetadataReader metadataReader) {
    Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
    if(action != null) {
        inputAction = action.input();
        outputAction = action.output();
    }

    //@Action(input) =="", get it from @WebMethod(action)
    WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
    soapAction = "";
    if (webMethod != null )
        soapAction = webMethod.action();
    if(!soapAction.equals("")) {
        //non-empty soapAction
        if(inputAction.equals(""))
            // set input action to non-empty soapAction
            inputAction = soapAction;
        else if(!inputAction.equals(soapAction)){
            //both are explicitly set via annotations, make sure @Action == @WebMethod.action
            //http://java.net/jira/browse/JAX_WS-1108
          //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
        }
    }
}
 
Example 9
Source File: RuntimeModeler.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 10
Source File: RuntimeModeler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 11
Source File: RuntimeModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 12
Source File: RuntimeModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 13
Source File: RuntimeModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 14
Source File: RuntimeModeler.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 15
Source File: RuntimeModeler.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}
 
Example 16
Source File: RuntimeModeler.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
    return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
}