Being honest you are probably first person ,i know of, who uses
commons annotations :). So can't help much here. But you can setup
SOAPAction via aegis mapping files ( i tested it few day ago). To make
it work you just need to use latest snapshot , not last stable (1.2.6)

On 6/14/07, MattJax <[EMAIL PROTECTED]> wrote:

Does anyone have any ideas about this one?  I've also been unable to do this
with Java 1.4 / xfire 1.2.6 and Aegis bindings as well.

Thanks in advance,

Matt


MattJax wrote:
>
> I have a client set up which calls an external WS.  The body of the SOAP
> response I get is:
> <soap:Body>
>       <LoginResponse xmlns="http://myexample.com";>
>               <LoginResult>
>                       <id>9</id>
>                       <key>12345</key>
>               </LoginResult>
>       </LoginResponse>
> </soap:Body>
>
> The interface I've set up to model the operation is:
>
> /**
>  * @@WebService("Partners")
>  */
> public interface IPartners {
>
>       /**
>      * @@WebMethod(operationName = "Login",
> action="http://myexample.com/Login";)
>      * @@.username WebParam("username")
>      * @@.password WebParam("password")
>      * @@.return WebResult("LoginResponse")
>      */
>       public LoginResult login(String username, String password);
>
> }
>
> However, the LoginResult object:
>
> public class LoginResult {
>       private int id;
>       private String key;
>         ... getters and setters
> }
>
> is never populated with the values from the SOAP body.
>
> I'm calling the web service using the following:
>
> <snip>
>       XFire xfire = XFireFactory.newInstance().getXFire();
>       TypeMappingRegistry registry = new DefaultTypeMappingRegistry();
>       AnnotationServiceFactory factory = new
> AnnotationServiceFactory(xfire.getTransportManager());
>       Service service = factory.create(IPartners.class, "Partners",
> "http://myexample.com";, null);
>       xfire.getServiceRegistry().register(service);
>
>       IPartners serviceToCall = (IPartners) new
> XFireProxyFactory().create(service, "http://localhost:50/Partners.asmx";);
>
>       LoginResult ls = serviceToCall.login("theUsername", "thePassword");
> </snip>
>
> I'm bound to using Java 1.4 and I've used commons annotations, as I need
> to populate SOAPaction into the HTTP header (which I could not get to work
> with Aegis bindings).
>
> What step am I missing?  Do I need to use some annotations on the
> LoginResult class?
>
> Thanks in advance,
>
> Matt
>

--
View this message in context: 
http://www.nabble.com/Unmarshalling-with-Commons-Annotations-tf3871884.html#a11117562
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to