You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/10/19 20:17:04 UTC

svn commit: r826746 - in /cxf/branches/2.2.x-fixes: ./ rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

Author: dkulp
Date: Mon Oct 19 18:17:03 2009
New Revision: 826746

URL: http://svn.apache.org/viewvc?rev=826746&view=rev
Log:
Merged revisions 826724 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r826724 | dkulp | 2009-10-19 12:58:20 -0400 (Mon, 19 Oct 2009) | 1 line
  
  Update sts client to be smarter about finding the operation it needs
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=826746&r1=826745&r2=826746&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java (original)
+++ cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Mon Oct 19 18:17:03 2009
@@ -69,6 +69,7 @@
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.transport.Conduit;
@@ -295,6 +296,16 @@
                 return boi;
             }
         }
+        //operation is not correct as the Action is not set correctly.   Let's see if
+        //we can at least find it by name and then set the action and such manually later.
+        for (BindingOperationInfo boi : bi.getOperations()) {
+            if (boi.getInput().getMessageInfo().getMessageParts().size() > 0) {
+                MessagePartInfo mpi = boi.getInput().getMessageInfo().getMessagePart(0);
+                if ("RequestSecurityToken".equals(mpi.getConcreteName().getLocalPart())) {
+                    return boi;
+                }
+            }
+        }
         return null;
     }
 
@@ -318,6 +329,9 @@
         client.getRequestContext().putAll(ctx);
         if (action != null) {
             client.getRequestContext().put(SoapBindingConstants.SOAP_ACTION, action);
+        } else {
+            client.getRequestContext().put(SoapBindingConstants.SOAP_ACTION, 
+                                           namespace + "/RST/Issue");
         }
 
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();