0

i would send with retrofit this type of xml structure:

...<Responses>
<Response>
  <QuestionID>ApplicantName</QuestionID>
  <ResponseText>Judy JobSeeker</ResponseText>
</Response>
<Response>
  <QuestionID>ApplicantEmail</QuestionID>
  <ResponseText>Judy.JobSeeker@bogusemail.com</ResponseText>
</Response>...

My entity has this structure:

@Root(name = "RequestApplication") public class CRequestApplication {
@Element(name = "DeveloperKey")
public String DeveloperKey;

@Element(name = "JobDID")
public String JobDID;

@Element(name = "Test")
public boolean Test;

@Element(name = "Resume")
public CResume Resume;

@ElementList(name = "Responses")
public List<CResponse> Responses;

}

but when i post the request the soap message sent is:

<Responses class="java.util.ArrayList">
<Response>
<QuestionID>ApplicantName</QuestionID>
<ResponseText>Alfredo De Vito</ResponseText>
</Response>
<Response>
<QuestionID>ApplicantEmail</QuestionID>
<ResponseText>alfdev@gmail.com</ResponseText>
</Response>
</Responses>

the issue is the responses'attribute 'class="java.util.ArrayList"' that couse this server error message: "The 'class' attribute is not declared."

Any idea to how can i avoid to render this class="..." attribute?

Thanks

alfdev
  • 1,039
  • 1
  • 10
  • 23

1 Answers1

0

You can remove the class=... as described here: Remove class= attribute

Use the first solution mentioned there (if possible).

Community
  • 1
  • 1
ollo
  • 24,797
  • 14
  • 106
  • 155