Hi

So you have

@POST
@Path("/{id}/localIds")
public Response addLocalId( @Context HttpHeaders requestHeaders,
@PathParam("id") Integer id, JAXBElement<IdentifierType> jaxbElement )  {}

and it does not work when an incoming XML fragment represents a subclass of
IdentifierType ? (with or without using JAXBElement) ?

I'd say it's a JAXB issue but may be your XML just misses some xsi:type info
?
cheers, Sergey


Nathaniel Auvil wrote:
> 
> Ok.  I changed my operation to wrap my type in a JAXBElement as in....
> 
> @POST
> public Response addAccount( @Context HttpHeaders requestHeaders,
> JAXBElement<AccountType> jaxbElement )
> 
> 
> and this works.  However when making this change to my other operations i
> have hit an issue.  One of my operations takes in a superclass and then i
> cast it to one of three types under the covers as in:
> 
> 
> @POST
> @Path("/{id}/localIds")
> public Response addLocalId( @Context HttpHeaders requestHeaders,
> @PathParam("id") Integer id, JAXBElement<IdentifierType> jaxbElement )
> 
> where IdentiferType is the Superclass of three different types.  This
> worked
> before i had to wrap everything in JAXBElement objects.
> 
> 
> This is a _showstopper_ for me and any help would be greatly
> appreciated....
> 
> 
> 
> On Wed, Aug 12, 2009 at 10:59 AM, Nathaniel Auvil
> <[email protected]
>> wrote:
> 
>> org.apache.cxf.interceptor.Fault: argument type mismatch while invoking
>> public javax.ws.rs.core.Response
>> com.xxx.ws.AccountsService.addAccount&#40;javax.ws.rs.core.HttpHeaders,com.xxx.ws.types.AccountType&#41;
>> with params [org.apache.cxf.jaxrs.impl.httpheadersi...@1a242fc,
>> javax.xml.bind.jaxbelem...@1a2bf9b]
>>
>> I have not seen this error before and i did not change my JAXB generated
>> types since the other day when i compiled.  I have my maven properties
>> set
>> to 2.2.2
>>
>> Any ideas?
>>
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/getting-a-new-exception-tp24938446p24970140.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to