I'm trying to call webservice using jax-ws from code deployed in WAS 6.1 and when i do it, execptions are thrown.
I have WAS 6.1 on my machine:
*Base 6.1.0.19*
*EJB 3.0 6.1.0.19*
*WS FEP 6.1.0.19*
I have a service's wsdl. I try to generate proxy classes using wsimport in *jax-ws ri 2.1* and wsimport in *WebSphere's bin directory*.
When I try to call service using proxy classes generated using jax-ws ri 2.1 I have next exception:
{code}
java.lang.TypeNotPresentException: Type javax.xml.bind.annotation.XmlSeeAlso not present
at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38)
at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
at java.lang.Class.getDeclaredAnnotations(Class.java:1648)
at java.lang.Class.getAnnotations(Class.java:1609)
at java.lang.Class.getAnnotation(Class.java:1589)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl$4.run(EndpointDescriptionImpl.java:1912)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:74)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.getAnnotation(EndpointDescriptionImpl.java:1910)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl. (EndpointDescriptionImpl.java:201)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.(EndpointDescriptionImpl.java:189)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:317)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:241)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:102)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:242)
at javax.xml.ws.Service.getPort(Service.java:94)
{code}
And if I use proxy classes generated with wsimport in WebSphere's bin directory, I have another exception:
{code}
javax.xml.ws.WebServiceException: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: java.lang.NullPointerException
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:180)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:134)
at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.marshalRequest(DocLitWrappedMethodMarshaller.java:490)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createRequest(JAXWSProxyHandler.java:330)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:165)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:147)
at $Proxy283.request(Unknown Source)
{code}
If I call webservice from client side, it successfully dones and I get a result from webservice. This call successfull in both cases: using jax-ws ri 2.1 and using proxy classes generated with WAS6.1 wsimport.
Tell me please, what should I do to call webservice from WAS 6.1 using jax-ws ?
Thanks.
WAS 7 includes support for JAX-WS 2.1 and JAXB 2.1, which is why artifacts generated by the 2.1 RI tooling will work on WAS 7.
I don't quite understand the second option of your post. It seems to imply that you get the NPE when you use the proxy classes generated with the WAS 6.1 wsimport, then you say it works. Can you explain the second problem again?
David
[1] https://jax-ws.dev.java.net/nonav/2.1.4/docs/wsimport.html
I mean that proxy classes generated with the WAS 6.1 wsimport works when I use them in the desktop application. When I try to call web service in the J2EE aplication deployed in WAS 6.1 using this proxy classes, I get NPE.