Faults generated in .NET service are not handled properly when WS-Addressing is 
used
------------------------------------------------------------------------------------

                 Key: XFIRE-949
                 URL: http://jira.codehaus.org/browse/XFIRE-949
             Project: XFire
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.5
            Reporter: Marek Went
            Assignee: Dan Diephouse


When WS-Addressing is used general faults (not checked service exceptions) and 
not handled properly.
Thats is because action is set by .NET to: 
http://schemas.xmlsoap.org/ws/2004/08/addressing/fault and it is not handled 
properly.
Fault is thrown, but message reports unknown action.

Proposed solution:
WSAConstants.java - add fault action for 2004/08 schema

--- trunk/xfire-core/src/main/org/codehaus/xfire/addressing/WSAConstants.java   
2007/02/02 09:43:11     2278
+++ trunk/xfire-core/src/main/org/codehaus/xfire/addressing/WSAConstants.java   
2007/04/11 11:55:55     2883
@@ -14,7 +14,8 @@
     
     String WSA_200408_ANONYMOUS_URI = 
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";;
 
-    String 
WSA_200508_FAULT_ACTION="http://www.w3.org/2005/08/addressing/fault";;
+    String 
WSA_200408_FAULT_ACTION="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault";;
+    String 
WSA_200508_FAULT_ACTION="http://www.w3.org/2005/08/addressing/fault";;    
     
     String WSA_PREFIX = "wsa";


WSAddressingInhandler.java - return when action is not found on client side, 
and action is WSA_200508_FAULT_ACTION or WSA_200408_FAULT_ACTION


// Check the client side case
                    if (aop == null)
                    {
                        aop = 
AddressingOperationInfo.getOperationByOutAction(service.getServiceInfo(), 
                                                                              
headers.getAction());
                        if (aop != null) 
                        {
                            context.setId(headers.getRelatesTo());
                            return;
                        }
                    }
                    
                    if (aop == null)
                    {
//proposed fix
                        if 
(WSAConstants.WSA_200408_FAULT_ACTION.equals(headers.getAction())
                                        ||
                                        
WSAConstants.WSA_200508_FAULT_ACTION.equals(headers.getAction())) {
                                return;
                        } else {     
// end of proposed fix                          
                                throw new XFireFault("Action '" + 
headers.getAction() + "' was not found for service "
                                                + headers.getTo(), 
XFireFault.SENDER);
                        }
                    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email

Reply via email to