Thanks Sagara,
I am very happy about your response. Thanks
What I do not understand is: I have built axis2-1.6.1 from sources using
maven-2.2.1 and once with maven-3.0.4 always from JDK 1.6.0_22. WITH SUCCESS.
There was no claim from maven that a certain feature can not be compiled or
from surefire that a certain feature can not be tested when built against JDK
1.6.
Or interpreting your words, that Axis2 uses newer versions of both artifacts.
In case of i.e. a @RequestWrapper#partName introduced starting from JAX-WS 2.2
[1] will not be available with previous versions[2] of JAX-WS found in JDK1.6.
Please note: There are axis2-1.6.1/samples/jaxws-samples which under this
circumstances do not run on JDK 1.6.0_30 i.e.
org.apache.axis2.jaxws.calculator.CalculatorServer.main(CalculatorServer.java:33),
at least not without a word about moving certain libs into endorsed
directories.
AND because axis2-1.6.1 code at package
org.apache.axis2.jaxws.description.builder.converter.JavaMethodsToMDCConverter
uses a call which dependes on JDK 7.0 and artifacts, or in short, will not run
on JDK 6.0 without particular artifacts endorsed. Why does maven not produce a
failure or warning that the full functionality of JAX-WS 2.2 is only available
when axis2-1.6.1 runs on top of JDK 7.0
/**
* This method will drive the attachment of @ResponeWrapper annotation data
to the
* <code>MethodDescriptionComposite</code>
*
* @param mdc - <code>MethodDescriptionComposite</code>
* @param method - <code>Method</code>
*/
private void attachResponseWrapperAnnotation(MethodDescriptionComposite
mdc, Method
method) {
ResponseWrapper responseWrapper =
(ResponseWrapper)ConverterUtils.getAnnotation(
ResponseWrapper.class, method);
if (responseWrapper != null) {
ResponseWrapperAnnot rwAnnot =
ResponseWrapperAnnot.createResponseWrapperAnnotImpl();
rwAnnot.setClassName(responseWrapper.className());
rwAnnot.setLocalName(responseWrapper.localName());
rwAnnot.setTargetNamespace(responseWrapper.targetNamespace());
rwAnnot.setPartName(responseWrapper.partName());
mdc.setResponseWrapperAnnot(rwAnnot);
}
}
What I do not understand is that axis2-1.6.1 sources can compile against JDK
1.6.0 where as .partName is clearly not an artifact delivered with JDK 1.6.0
and/or dependent artifacs; I am not a Java Expert and have no explanation for
that. Maven regulates so many dependecies; why not such a dependency; at least
I would expect one word of caution in the SAMPLE README file for i.e. the
Calculator Sample, stating that @Addressing or certain other known @Annotations
are not working when used by Axis2 with JDK 1.6.0
After all: In short and in my mind, please correct if I am wrong "@Addressing"
is only supported with JDK 1.7 when used in a JAX-WS annotaion.
Josef
-----Ursprüngliche Nachricht-----
Von: Sagara Gunathunga [mailto:[email protected]]
Gesendet: Montag, 9. April 2012 06:44
An: [email protected]
Betreff: Re: [axis2-1.6.1] RequestWrapper.partName() not supported on JDK 1.6.0
but used by JAX-WS
This is not a Axis2 issue instead JDK 1.6 related JAX-WS issue, JDK 6
shipped JAXB 2.0 and JAX-WS 2.0 as a part of JDK but Axis2 uses newer
versions of both artifacts. In your case @RequestWrapper#partName
introduced starting from JAX-WS 2.2 [1] and not available on previous
versions[2].
It is recommended to use one of a endorsed mechanisms mentioned here
[3] [4] to solve those issues. For Axis2 you can easily find artifacts
that needed to be endorsed within the /lob/endorsed/ directory of
binary distribution.
[1] - http://docs.oracle.com/javase/6/docs/api/javax/xml/ws/RequestWrapper.html
[2] -
http://docs.oracle.com/javase/7/docs/api/javax/xml/ws/RequestWrapper.html#partName%28%29
[2] -
http://weblogs.java.net/blog/ramapulavarthi/archive/2007/01/problems_using.html
[3] - http://weblogs.java.net/blog/vivekp/archive/2007/01/running_jaxws_2.html
Thanks !
On Thu, Apr 5, 2012 at 10:17 PM, Stadelmann Josef
<[email protected]> wrote:
> [exec:exec]
>
> Starting Server
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> javax.xml.ws.RequestWrapper.partName()Ljava/lang/String;
>
> at
> org.apache.axis2.jaxws.description.builder.converter.JavaMethodsToMDCConverter.attachRequestWrapperAnnotation(JavaMethodsToMDCConverter.java:203)
>
> at
> org.apache.axis2.jaxws.description.builder.converter.JavaMethodsToMDCConverter.convertMethods(JavaMethodsToMDCConverter.java:85)
>
> at
> org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.introspectClass(JavaClassToDBCConverter.java:193)
>
> at
> org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.buildDBC(JavaClassToDBCConverter.java:141)
>
> at
> org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.produceDBC(JavaClassToDBCConverter.java:120)
>
> at
> org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:215)
>
> at
> org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:206)
>
> at
> org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:542)
>
> at
> org.apache.axis2.jaxws.server.endpoint.EndpointImpl.initialize(EndpointImpl.java:85)
>
> at
> org.apache.axis2.jaxws.server.endpoint.EndpointImpl.<init>(EndpointImpl.java:67)
>
> at
> org.apache.axis2.jaxws.spi.Provider.createAndPublishEndpoint(Provider.java:56)
>
> at
> org.apache.axis2.jaxws.spi.Provider.createAndPublishEndpoint(Provider.java:52)
>
> at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
>
> at
> org.apache.axis2.jaxws.calculator.CalculatorServer.<init>(CalculatorServer.java:29)
>
> at
> org.apache.axis2.jaxws.calculator.CalculatorServer.main(CalculatorServer.java:33)
>
> ------------------------------------------------------------------------
>
> BUILD FAILURE
>
> call it a feature, but the axis2-1.6.1/samples/jaxws-calculator project runs
> only with JDK 1.7.0 !!!
>
> javax.xml.ws.RequestWrapper.partName()
>
> can only run if you are on a JDK 1.7.0 platform as .partName() method does
> not exist with the JDK 1.6.0
>
> So that is one more time why it should be said in the release notes that
>
> JAX-WS 2.0 is not fully supported on axis2-1.6.1 to run on a JDK 1.6.0
> platform.
>
> my thoughts,
>
> Josef
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]