I get this previous response structure inherited from the project I work on:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<getInfosEnvironmentResponse>
<child1>
[…]
</child1>
<child2>
[…]
</child2>
</getInfosEnvironnementResponse>
</soapenv:Body>
</soapenv:Envelope>
I doesn’t achieve to get a multi children response with the ResponseWrapper annotation (limited by the fact that Java only allow unique object return).
Here my code:
@WebMethod
@RequestWrapper(className="com.macif.odma.common.ws.objects.GetInfosEnvironnementRequest", localName="getInfosEnvironnementRequest")
@ResponseWrapper(className="com.macif.odma.common.ws.objects.GetInfosEnvironnementResponse", localName="getInfosEnvironnementResponse")
public Response getInfosEnvironnement(DeploiementId deploiement) throws Exception {
// Appel au service pour l'enregistrement de la livraison
GetInfosEnvironnementService getInfosEnvironnementService = (GetInfosEnvironnementService) Component.getInstance("getInfoEnvironnementService", ScopeType.CONVERSATION, true, true);
return getInfosEnvironnementService.inscription(deploiement);
}
And the response wrapper:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"environnementLogique",
"reponse"
})
@XmlRootElement(name = "GetInfosEnvironnementResponse")
public class GetInfosEnvironnementResponse {
@XmlElement(required = true)
public List<EnvironnementLogique> environnementLogique = new ArrayList<EnvironnementLogique>();
@XmlElement(required = true)
public Response reponse;
}
I have also tried with BARE style with no more success.