sachin baveja

Greenhorn
+ Follow
since May 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sachin baveja

Hi
I am trying to implement a JAX-WS web service as asynchronous.
I have implemented the client side code as follows:

/*-------------------------------------------------------------------------------
CallbackHandler callbackHandler = new CallbackHandler ();
Future<?> resp = serverProxy.validateAsAsync(request, callbackHandler);
response = callbackHandler.getResponse();
//*--------------------------------------------------------------------------------

class CallbackHandler implements AsyncHandler<MyResponse> {
private MyResponse output;
public void handleResponse(Response<MyResponse> response) {
try {
output = response.get();
}catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}

MyResponsegetResponse() {
return output;
}
}

The SEI looks like below
@WebMethod
public Future<?> validateAsAsync(
@WebParam(name = "MyRequest", targetNamespace = "", partName = "parameter")
MyRequest parameter,
@WebParam(name = "callbackhandler", targetNamespace = "", partName = "asyncHandler")
AsyncHandler<MyResponse> asyncHandler);

I am getting the following error:
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions
javax.xml.ws.AsyncHandler is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at javax.xml.ws.AsyncHandler
at private javax.xml.ws.AsyncHandler jaxws.ValidateAsAsync.callbackhandler

Looks like Jax-WS is not able to create the Jax-B object for ASyncHandler since it is an interface, how to get around this issue?
I really appreciate your help.

Thanks
12 years ago
Hi
I am getting the following exception when I call the JAX-WS client. I have the client and server side stubs generated through JAX-WS web service runtime. I am running the service on Weblogic 10.3.2

SEVERE: Couldn't create SOAP message due to exception: java.lang.IllegalStateException: Stream already closed
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: java.lang.IllegalStateException: Stream already closed
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:292)
at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:283)
at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:99)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:440)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:319)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:232)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:310)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.IllegalStateException: Stream already closed
at org.jvnet.mimepull.DataHead$ReadMultiStream.fetch(DataHead.java:232)
at org.jvnet.mimepull.DataHead$ReadMultiStream.read(DataHead.java:207)
at com.ctc.wstx.io.StreamBootstrapper.ensureLoaded(StreamBootstrapper.java:443)
at com.ctc.wstx.io.StreamBootstrapper.hasXmlDecl(StreamBootstrapper.java:614)
at com.ctc.wstx.io.StreamBootstrapper.bootstrapInput(StreamBootstrapper.java:133)
at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:619)
at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:348)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$NoLock.doCreate(XMLStreamReaderFactory.java:396)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Woodstox.doCreate(XMLStreamReaderFactory.java:426)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderFactory.java:163)
at com.sun.xml.ws.encoding.MtomCodec.decode(MtomCodec.java:245)
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:343)
at com.sun.xml.ws.encoding.MimeCodec.decode(MimeCodec.java:209)
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:279)
... 23 more
12 years ago
Hi
I downloaded the Weblogic server 11g release patch1 (actual version 10.3.2) that also provides enterprise pack for eclipse from the Oracle site. However it does not have the option for JAX-WS webservice runtime for server runtime of 10.3.2. It has webservice runtime options for Axis and Axis2 which we are not using(windows -> prefrences ->webservices - > server and runtime -> weblogic 10.3.2). Does anybody have any ideas regarding adding JAX-WS web service runtime within eclipse IDE so that I can generate skeleton and client stubs for JAX-WS using the WSDL through IDE. I worked with RAD earlier and that had the option for JAX-WS web service runtime out of the box so never faced this issue before.

Much apreciate your help here.

Thanks
Sachin
12 years ago