jaxb - Empty uri in rest response -


i developing plugin nexus oss .my app creates rest call response(to request server) . when server receives , throws error follows

 javax.xml.bind.unmarshalexception:  unexpected element (uri:"", local:"com.collabnet.teamforge.ia.types.getconfigurationparametersresponse").  expected elements  \lt{http://www.collab.net/teamforge/integratedapp}createprojectconfigurationrequest\gt, \lt{http://www.collab.net/teamforge/integratedapp}getconfigurationparametersrequest\gt, \lt{http://www.collab.net/teamforge/integratedapp}getconfigurationparametersresponse\gt, \lt{http://www.collab.net/teamforge/integratedapp}getpagecomponentparametersrequest> 

i guess reason behind exception response doesn't match expected because uri ( guess , if it's wrong please correct me),that namespace in response not set .

snip of code in plugin follows

 @xmlaccessortype(xmlaccesstype.field) @xmltype(name = "", proporder = {     "configurationparameter" }) @xmlrootelement(name = "getconfigurationparametersresponse", namespace = "http://www.collab.net/teamforge/integratedapp") public class getconfigurationparametersresponse     extends baseresponse {  

why name space not picked while creating response ?

even correct me if real reason exception not empty uri. if real reason behind exception ? please .

based on error message xml document being passed jaxb is. appears though xml being created other jaxb (i suspect xstream).

<com.collabnet.teamforge.ia.types.getconfigurationparametersresponse>     ... </com.collabnet.teamforge.ia.types.getconfigurationparametersresponse> 

your jaxb mappings expecting xml document following:

<getconfigurationparametersresponse xmlns="http://www.collab.net/teamforge/integratedapp">     ... </getconfigurationparametersresponse> 

if need interact following xml:

<com.collabnet.teamforge.ia.types.getconfigurationparametersresponse>     ... </com.collabnet.teamforge.ia.types.getconfigurationparametersresponse> 

then can change mapping be:

@xmlaccessortype(xmlaccesstype.field) @xmltype(name = "", proporder = {     "configurationparameter" }) @xmlrootelement(name = "com.collabnet.teamforge.ia.types.getconfigurationparametersresponse") public class getconfigurationparametersresponse     extends baseresponse { 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -