[ 
http://issues.apache.org/jira/browse/AXIS2-1666?page=comments#action_12449021 ] 
            
Rich Scheuerle commented on AXIS2-1666:
---------------------------------------

The problem here is a little more complicated, I would like to discuss a better 
solution.

In order to unmarshal a JAXB object, an appropriate JAXBContext must be 
available.
The JAXBContext must be populated with the packages that correspond to the 
possible target ELEMENT.

      JAXBContext...packages of target element
      ......  
      JAXBContext get unmarshaller
       ......
       Object jaxb = unmarshaller.unmarshal(reader)

Currently the code tries to get the list of packages by inspecting  the 
possible formal target classes.
However this won't work in at least two cases:
   1) The target object is a primitive or other non-JAXB object (i.e. int)
    2) The target object is a derived JAXB object but is in a different package 
than the formal parameter.

The real solution here is to get the list of packages from the 
EndpointInterfaceDescription.
(currently this information is not fully available, but there should be a 
method on the EndpointInterfaceDescription to 
get a Set of package names for all of the relevant parameters/exceptions. )

The EndpointInfterfaceDescription would need to get this informtion when the 
wsdl / endpoint information to ensure that
it includes all of the packages for each included schema.

A more temporary solution is to:
   1) Add the getPackages() method to the EndpointInterfaceDescription.
    2) The initial implemenation will simply look at all of the types and 
exceptions ref'ed in the operations.  (This will fix
         the BareTest because the problematic schema contains elements that are 
not mapped to primitives).
    3) Change the relevant Marshal code to get the Packages from the 
EndpointInterfaceDescription...via the OperationDescription.

(Note that this solution is logically equivalent to what is done in Axis v1.  
All of the referenced types from the schema are
added to a type mapping, and these are automatically available during 
deserialization).







> Doc/Lit Bare with empty soap body scenario with Proxy fails
> -----------------------------------------------------------
>
>                 Key: AXIS2-1666
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1666
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Nikhil Thaker
>         Assigned To: Rich Scheuerle
>         Attachments: JIRA_1666_doclitbareemptymessage.txt
>
>
> Currently proxy cannot handle Doc/lit bare with empty payload. 
> There are two problems associated with it:
> 1) Proxy Fails with xmlStreamException when we try to create empty soap 
> message payload.
> 2) If an empty body is sent out to the server we have no way of resolving 
> operation usign the dispatcher code.
> I am going to attach fix for problem #1 and let users use SOAPAction to 
> resolve the operation on server side. Further down the road we need to update 
> the Dispatcher code so it can resolve operations by reading  soap message 
> payload.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to