• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issues in JAXB conversion of List<String>

 
Pankaj Rajankar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1478
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<customFieldNames>Sales Associate ID</customFieldNames>

Can you try with under score like <customFieldNames>Sales_Associate_ID</customFieldNames>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic