[
https://issues.apache.org/jira/browse/AXIS2-4700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rich Scheuerle resolved AXIS2-4700.
-----------------------------------
Resolution: Fixed
> JAX-WS: Wrapper defaulting is wrong
> -----------------------------------
>
> Key: AXIS2-4700
> URL: https://issues.apache.org/jira/browse/AXIS2-4700
> Project: Axis2
> Issue Type: Bug
> Components: jaxws
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
> Original Estimate: 24h
> Remaining Estimate: 24h
>
>
> A JAX-WS Web service client or provider may receive an UnmarshalException
> "unexpected element" error when it receives
> an inbound message. The error indicates that a problem has occurred
> converting the incoming message into the customer's JAXB data object.
> Here is an example message:
> Cause:javax.xml.bind.UnmarshalException
> - with linked exception:
> [javax.xml.bind.UnmarshalException: unexpected element
> (uri:"http://my.test/", local:"myOperation"). Expected elements
> are
> <{http://my.test/}myOperationResponse>]
> All of the following must be true for this error to occur:
> A) The JAX-WS Web service must use the document/literal
> wrapped style.
> B) The method being invoked must not have the
> @RequestWrapper or @ResponseWrapper annotation.
> C) The customer has provided a wrapper bean in the expected
> package (i.e. my.test.jaxws.MyOperationResponse).
> D) The customer has provided another (non-wrapper bean) in
> the same package as the Web service interface (i.e.
> my.test.MyOperationResponse)
> Solution:
> When a JAX-WS Web service method does not have the @RequestWrapper or
> @ResponseWrapper annotation, the JAX-WS project uses an algorithm to locate
> the wrapper classes.
> The algorithm should first look in a sub-package named "jaxws" for the
> wrapper bean. If the wrapper bean is not found, then it should look in the
> package associated with the target namespace.
> The error occurred because the algorithm was examining the packages in the
> wrong order. I am making a correction, and will commit code later today.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]