Ugh.  Sorry about the html-formatted text.  Here's a PINE-friendly version:

WebMethod wm = op.getMethod().getAnnotation(WebMethod.class);
String action = (wm == null || wm.action() == null) ? "*" : wm.action();
                
op.setProperty(AddressingOperationInfo.ADDRESSING_OPERATION_KEY,
            new AddressingOperationInfo(action, op));
       
return super.getAction(op);

-----Original Message-----
From: Christopher Moesel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 4:10 PM
To: [email protected]
Subject: RE: [xfire-user] WS-Addressing and XFire 1.2.3

Just thought I'd post out my modification of Matthew Good's code snippet.  I 
modified it to use the annotation to set the action name, or if you did not 
specify the annotation, it will set the action name to "*" instead.  I also use 
the 2 arg version of the AddressingOperationInfo class so that a default out 
action is specified as well (I needed this to keep my C# client happy).
 
WebMethod wm = op.getMethod().getAnnotation(WebMethod.class);
String action = (wm == null || wm.action() == null) ? "*" : wm.action();
                
op.setProperty(AddressingOperationInfo.ADDRESSING_OPERATION_KEY,
            new AddressingOperationInfo(action, op));
       
return super.getAction(op);
 
-----Original Message-----
From: Christopher Moesel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 1:28 PM
To: [email protected]
Subject: RE: [xfire-user] WS-Addressing and XFire 1.2.3
 
Ah-OK.  Yeah, pain in the neck, but it's better than the alternatives, I guess. 
 Thanks for the help!
 
As for the lack of JSR-181 WS-Addressing support, the documentation should 
probably be changed to reflect that it doesn't work (or at least to stay silent 
on the issue rather than saying it *does* work).  Can someone from the XFire 
team confirm this before I go and change the user guide?
 
-Chris
 
-----Original Message-----
From: Matthew Good [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 1:14 PM
To: [email protected]
Subject: Re: [xfire-user] WS-Addressing and XFire 1.2.3
 
Annotations don't seem to work.  I did this (found it in user guide 
somewhere).  I tried it using a specific name instead of "*" and it works that 
way too.  I know, pita.

    /**
     * This method is overridden because it is one place where all 
OperationInfo instances
     * go through just once when the application is initialized.
     * It assigns AddressingOperationInfo objects to the operation so that the 
WS-Addressing
     * Action header can be interpreted.  Note that we only have one operation 
and by
     * assigning the action name "*" it will match all actions.
     *
     * @see 
org.codehaus.xfire.service.binding.ObjectServiceFactory#getAction(org.codehaus.xfire.service.OperationInfo)
     */
    @Override
    protected String getAction(OperationInfo op) {
               
        op.setProperty(AddressingOperationInfo.ADDRESSING_OPERATION_KEY
                    , new AddressingOperationInfo("*"
                            , null
                            , op));
       
        return super.getAction(op);
    }
 
 
----- Original Message ----
From: Christopher Moesel <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, December 20, 2006 10:36:52 AM
Subject: [xfire-user] WS-Addressing and XFire 1.2.3
Hello All,
 
I've spent some time trying to determine why I can't get my JSR-181 web service 
to work with a C# client using the WSE 3.0 enhancements.  I think it comes down 
to WS-Addressing:  WSE 3.0 insists on using WS-A, and XFire doesn't appear to 
be properly registering the actions I'm declaring via my annotations-so it 
rejects the client request because it can't find the requested action.
 
According to the documentation at http://xfire.codehaus.org/WS-Addressing, 
XFire supports WS-A (w/ no caveats).  The unresolved XFIRE-156 issue, however, 
states that XFire does not yet support the WS-Addressing 1.0 spec.  I'm not 
familiar w/ the differences in the 1.0 spec, but should this be stated in the 
docs, since it's support is not schedule until 2.0-M1?
 
The documentation also says that the action can be set via JSR-181 
Annotations.  I think this may be incorrect.  Has this been tested and 
confirmed?  I've been running this through my debugger and it looks to me like 
the "action" annotation is never read.  In addition, as far as I can tell, none 
of the constructors for the AddressingOperationInfo class are ever used in the 
XFire codebase-and this appears to be the class consulted to check for a 
registered action.  So I can't see how it would ever work...
 
I'm still fairly new to XFire though... so maybe I'm completely missing 
something.  Can anyone shed some light on this for me?
 
Thanks,
Chris
 
  
 

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

    http://xircles.codehaus.org/manage_email

Reply via email to