See http://java.sun.com/javase/6/docs/api/javax/jws/soap/SOAPBinding.html#parameterStyle.
From: Ruault Gaetan Sent: Thursday, March 25, 2010 1:34 AM To: [email protected] Subject: RE: Problem with generated SOAP message by tuscany Hi , i added @WebParam in my interface then it's work. thank. I have a last question : With the same WS is it possible to modify the interface method signature from public java.lang.String Login( java.lang.String userID,java.lang.String passwd); to public java.lang.String Login( RequestLogin request); with RequestLogin define like this. class RequestLogin{ private String loginID; private String passwd; ...... with getters and setters. } i try it then tuscany generate SOAP body like this <ns2:Login xmlns:ns2="http://_1.login.ws.linedata.com/"> <arg0> <userID>myUser</userID> <passwd>myPassword</passwd> </arg0> </ns2:Login> Is it possible to remove arg0 element ? thanks Gaetan -------------------------------------------------------------------------------- De : Raymond Feng [mailto:[email protected]] Envoyé : mercredi 24 mars 2010 22:32 À : [email protected] Objet : Re: Problem with generated SOAP message by tuscany The element names such as arg0 are mapped from the java interface. To be consistent with your web service, you should use "wsimport" to generate the JAX-WS interfaces from the WSDL. The other option is to annotate your interface with JAX-WS annotations such as @WebParam and @WebResult to customize the element names. Thanks, Raymond From: Ruault Gaetan Sent: Wednesday, March 24, 2010 2:17 PM To: [email protected] Subject: Problem with generated SOAP message by tuscany Hello, I try to consume a WS like which need this type of request <ns2:Login xmlns:ns2="http://_1.login.ws.linedata.com/"> <userID>myUser</userID> <passwd>myPassword</passwd> </ns2:Login> but when i trap message send by tuscany i get this : <ns2:Login xmlns:ns2="http://_1.login.ws.linedata.com/"> <arg0>myUser</arg0> <arg1>myPassword</arg1> </ns2:Login> then the WS send error because it not receive userID and passwd. the composite contain : <sca:reference name="Login" promote="ModificationAdresseMail/Login"> <sca:interface.java interface="com.linedata.ws.login._1.LoginPort"/> <sca:binding.ws name="Login" uri="http://wwwwwwww/mgrequest9" sca:wsdlLocation="http://wwwwww/wsdl/masteri_login.wsdl"/> </sca:reference> and the interface for service Login like this @Remotable public interface LoginPort { public java.lang.String Login( java.lang.String userID,java.lang.String passwd); I use it in my component implementation like this. login.Login("myUser","myPassword"); could you help me to configure or add somethings to Java code for send the good message to the WS. the only bad thing is the element name arg0 to userID and arg1 to passwd. thanks Gaetan
