Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAS 6.1 Call webservice using JAX-WS

99 views
Skip to first unread message

filip...@gmail.com

unread,
Oct 20, 2008, 8:59:07 AM10/20/08
to
Good Day.

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.

filip...@gmail.com

unread,
Oct 20, 2008, 10:08:53 AM10/20/08
to
I'v just try to do this call in WAS 7.0 and it was successfull. It seems that the failure's reason in WAS6.1 :( But I need to call webservice from WAS6.1, not 7.0 ...

da...@illsley.org

unread,
Oct 20, 2008, 11:45:45 AM10/20/08
to
The Web Services Feature Pack includes support for JAX-WS 2.0 and JAXB 2.0, so clients generated with the JAX-WS 2.1 tooling may not work on the Web Services Feature Pack. See the -target option in the JAX-WS 2.1 RI documentation [1] for the ability to force the 2.1 tooling to generate 2.0 compatible artifacts.

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

filip...@gmail.com

unread,
Oct 20, 2008, 3:23:43 PM10/20/08
to
{code}

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?
{code}

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.

da...@illsley.org

unread,
Oct 20, 2008, 5:51:49 PM10/20/08
to
OK, I understand. In that case, it sounds like a problem in the Web Services Feature Pack so I suggest raising a PMR to have it investigated.
David

filip...@gmail.com

unread,
Oct 21, 2008, 9:30:35 AM10/21/08
to
Tell me please what version of axis2 is used in WS FEP 6.1.0.19 ?

filip...@gmail.com

unread,
Oct 27, 2008, 11:43:33 AM10/27/08
to
It high-maintenance that the reason of failure in axis2v1.3 wich used in WS FEP 6.1.0.19. I try to call service using axis2v1.3 from desktop application and get same NullPointerException.
0 new messages