[jboss-user] [JBoss Web Services] New message: "How to return a response with multiple children with Document/Literal (Wrapped)?"

Stéphane Daviet do-not-reply at jboss.com
Thu Jan 28 04:49:54 EST 2010


User development,

A new message was posted in the thread "How to return a response with multiple children with Document/Literal (Wrapped)?":

http://community.jboss.org/message/522692#522692

Author  : Stéphane Daviet
Profile : http://community.jboss.org/people/PomCompot

Message:
--------------------------------------------------------------
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.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/522692#522692




More information about the jboss-user mailing list