[ https://issues.apache.org/jira/browse/AXIS2-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rich Scheuerle resolved AXIS2-4393. ----------------------------------- Resolution: Fixed Committed 785755 > JAXWS: If JAXB classes are not packaged with the JAXWS Application, the > service may fail > ---------------------------------------------------------------------------------------- > > Key: AXIS2-4393 > URL: https://issues.apache.org/jira/browse/AXIS2-4393 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: jaxws > Reporter: Rich Scheuerle > Assignee: Rich Scheuerle > Original Estimate: 2h > Remaining Estimate: 2h > > Under normal circumstances, a JAX-WS web service application uses JAXB > classes to represent the method and parameter data > for document/literal operations. However, very simple web service > applications may not contain JAXB classes. > > For example, a JAX-WS document/literal method that only has Java primitive > parameters might be developed without JAXB classes. > > > Another example is a benchmark application. A benchmark application that is > developed by other vendors and might not contain JAXB classes > > > If JAXB classes are not present, the JAX-WS runtime will perform correctly in > most cases. > > When the following conditions are met, the JAX-WS runtime will fail with a > NullPointerException error: > * The JAX-WS web service has a style/use defined as document/literal. > > * The JAX-WS web service is defined as or defaults to the wrapped mapping. > > * The JAX-WS web service does not contain JAXB classes. > * The JAX-WS web service receives a message that indicates that one of the > parameters to the JAX-WS operation is null or missing. > > > The NullPointerException will occur when the JAX-WS runtime > receives the incoming message. Here is an example error: > > javax.xml.ws.WebServiceException: > java.lang.NullPointerException > at > org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175) > > at > org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70) > > at > org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128) > > at > org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMinimalMethodMarshaller.demarshalRequest(DocLitWrappedMinimalMethodMarshaller.java:221) > Solution: > In the scenario described above, the JAX-WS unmarshalling engine uses an > algorithm called "document literal wrapped minimal" unmarshalling. > The algorithm currently does not have the ability to recognize missing > elements/parameters. > The algorithm will be upgraded to handle this scenario. > In addition, other clases in the JAX-WS runtime were changed to provide the > necessary information to detect the missing parameters. > This solution has been tested and will be committed shortly. All of the code > is in the JAXWS runtime. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.