Hi Dan,
Yes, i awared, that's why i just use it to log, i'm not failed the
processing.
If i can not use jaxws stuff in that module , i guess we should remove
the dependencies from the POM
Yes, i will use the messagePartInfo.getConcreteName().getLocalPart(),
that's next story.
It's not a part of HTTP binding, and i don't think in GET we need to
convert to the document, it'll slow down the processing.
Cheers,
James.
Dan Diephouse 写道:
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
[EMAIL PROTECTED] 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