This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Issues in JAXB conversion of List<String> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Issues in JAXB conversion of List<String>" Watch "Issues in JAXB conversion of List<String>" New topic
Author

Issues in JAXB conversion of List<String>

Pankaj Rajankar
Greenhorn

Joined: Mar 12, 2010
Posts: 1
Hello everyone,

I have a SOAP based WebService, that returns the following object as response


The SOAP message looks like this

<ReportResult>
<reportRowId>1</reportRowId>
...................
<customFieldNames>Sales Associate ID</customFieldNames>
<customFieldNames>feedback</customFieldNames>
</ReportResult>
<ReportResult>
<reportRowId>2</reportRowId>
...................
<customFieldNames>Sales Associate ID</customFieldNames>
</ReportResult>


When this SOAP message is converted to a JAXB object I get a List<String> for customFieldNames
The customFieldNames list should have 2 elemnts
customFieldNames[0]= Sales Associate ID
customFieldNames[1]= feedback

Instead I get a list with 4 elements
customFieldNames[0]= Sales
customFieldNames[1]= Associate
customFieldNames[2]= ID
customFieldNames[3]= feedback

Any idea why this is happening? Any pointers are highly appreciated.

Thanks,
Pankaj.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
<customFieldNames>Sales Associate ID</customFieldNames>

Can you try with under score like <customFieldNames>Sales_Associate_ID</customFieldNames>
 
 
subject: Issues in JAXB conversion of List<String>
 
Similar Threads
WDSL2Java using Axis2 via Ant in Eclipse
How to access byte array web method
Cannot create service instance, service 'x' not found in wsdl
How to create arrays in WSDL
question - "all" group