[JBossWS] - org.jboss.xb.binding.JBossXBRuntimeException: Neither getter
by sneha_munnangi
Hi ,
Iam developing webservice using Jbossws.
I have a problem acessing webservice methods.
All the methods return a type of string or void.
These methods when invoked gives me the following exception :
17:48:21,080 ERROR [SOAPFaultExceptionHelper] SOAP request exception
javax.xml.rpc.JAXRPCException: Cannot create or send response message
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:311)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:236)
at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Neither getter nor field where found for defaultAssertionStatus in class java.lang.ClassL
at org.jboss.xb.binding.MappingObjectModelProvider$FieldToElementMapping.(MappingObjectModelProvider.java:368)
at org.jboss.xb.binding.MappingObjectModelProvider.mapFieldToElement(MappingObjectModelProvider.java:71)
at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:149)
at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:100)
at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:172)
at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:844)
at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:761)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:211)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.print(DOMWriter.java:186)
at org.jboss.util.xml.DOMWriter.printNode(DOMWriter.java:135)
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:305)
Any help on this would be really helpful and highly appreciated.
Thanks in advance
--sneha
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068732#4068732
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068732
17 years, 5 months
[JBossWS] - Re: JBOSS-WS Client not sending COOKIE after 2 calls
by lowecg2004
Hello,
I'm using 2.0.0 web services in a similar way to the author but I'm getting some slightly different problems with sessions.
I call a web service method that creates a HttpSession and saves some state to that session using httpSession.setAttribute("userId", userId). At the client, I get JSESSIONID back from a HTTP cookie which I pass on to a subsequent call to a servlet that is part of the same JEE context. In the servlet I verify that httpSession.getId() matches the session ID created in the web service, however a call to httpSession.getAttribute("userId") is null.
Could this be part of the same problem? The web service is declared under Seam 2.0.0b1, so is it possible that this could also be part of the problem?
To try and see if I could work around the issue, I thought I would experiment and create a jsession in a separate servlet call and then make the web service call participate in the existing session (rather than rely on the web service creating the session). Now I cannot even get a cookie (or any other HTTP header value for that matter) to pass to the server.
After reading the following:
https://jax-ws.dev.java.net/guide/HTTP_compression.html
I thought that this code would work:
final DevelopmentService_Service service = new DevelopmentService_Service();
| final DevelopmentService proxy = service.getDevelopmentServicePort();
| ((BindingProvider)proxy).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
| final HttpCookie jSessionId = getJSessionId();
| ((BindingProvider)proxy).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,
| Collections.singletonMap("Cookie",Collections.singletonList(jSessionId.toString())));
But no joy. Incidentally, the HTTP compression example given at the URL above doesn't work either.
Should I be able to pass HTTP parameters from the client to the server in this way?
Cheers,
Chris.
Clients were generated using wsconsume
JBossWS 2.0.0.GA
JBossAS 4.2.0.GA
JBoss Seam 2.0.0.b1
Java 1.6.0_02 client and server
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068575#4068575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068575
17 years, 5 months
[JBossWS] - Re: User authorization in Web Service
by ike
It causes ClassCastException (cannot cast port to BindingProvider).
Actually, I've found another recommendation:
((Stub)port)._setProperty(Stub.USERNAME_PROPERTY, "joe");
((Stub)port)._setProperty(Stub.PASSWORD_PROPERTY, "joe");
But it doesn't work too:
javax.ejb.EJBAccessException: Authentication failure
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:68)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:174)
at org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3.invokeServiceEndpointInstance(ServiceEndpointInvokerEJB3.java:114)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:207)
at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
When I debug UserPasswordLoginModule I see that both login and password are nulls :(
Are @SecurityDomain and @RolesAllowed intended to web servicess too, not only for EJB's?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068547#4068547
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068547
17 years, 5 months