cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <...@envoisolutions.com>
Subject Re: svn commit: r469376 - in /incubator/cxf/trunk/rt: core/src/main/java/org/apache/cxf/interceptor/ frontend/jaxws/src/test/java/org/apache/cxf/jaxws/
Date Tue, 31 Oct 2006 05:42:49 GMT
Hi James,
Are you aware this information is in the service model? Are you also 
aware that this information often times is NOT in the annotations - for 
instance when someone does code first services? There should hardly ever 
be any reason to use the jax-ws annotations outside the 
JaxWsServiceFactory/JaxWsServiceConfiguration classes. Just do 
key.equals(messagePartInfo.getConcreteName().getLocalPart()) to see if 
they match.

Also you might want to look at using the utility code in the HTTP 
binding to turn parameters and their values into a document which 
conforms to the schema.

- Dan


mmao@apache.org wrote:
> +    private boolean isValidParameter(Annotation[][] parameterAnnotation, int index,
String parameterName) {
> +        if (parameterAnnotation == null || parameterAnnotation.length < index) {
> +            return true;
> +        }
> +        Annotation[] annotations = parameterAnnotation[index];
> +        if (annotations == null || annotations.length < 1) {
> +            return true;
> +        }
> +        WebParam webParam = null;
> +        for (Annotation annotation : annotations) {
> +            if (annotation.annotationType() == WebParam.class) {
> +                webParam = (WebParam) annotation;
> +            }
> +        }
> +        if (webParam == null 
> +            || StringUtils.isEmpty(webParam.name()) 
> +            || webParam.name().equals(parameterName)) {
> +            return true;
> +        }
> +        LOG.warning("The parameter name [" + parameterName 
> +                    + "] is not match the one defined in the WebParam name [" + webParam.name()
+ "]");
> +        return false;
> +    }
>   
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog


Mime
View raw message