You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ke...@apache.org on 2007/05/09 07:56:23 UTC

svn commit: r536430 - in /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description: AxisBindingMessage.java AxisEndpoint.java

Author: keithc
Date: Tue May  8 22:56:22 2007
New Revision: 536430

URL: http://svn.apache.org/viewvc?view=rev&rev=536430
Log:
Fixing AXIS2-2627.

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=diff&rev=536430&r1=536429&r2=536430
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Tue May  8 22:56:22 2007
@@ -31,6 +31,8 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.neethi.Policy;
+import org.apache.woden.wsdl20.extensions.soap.SOAPFaultCode;
+import org.apache.woden.wsdl20.extensions.soap.SOAPFaultSubcodes;
 
 import javax.xml.namespace.QName;
 import java.util.HashMap;
@@ -161,17 +163,20 @@
                     WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":"
                             + this.name));
             // Fault specific properties
-            property = (String) this.options
+            SOAPFaultCode faultCode = (SOAPFaultCode) this.options
                     .get(WSDL2Constants.ATTR_WSOAP_CODE);
-            if (property != null) {
+            if (faultCode != null && faultCode.getQName() != null) {
                 bindingMessageElement.addAttribute(omFactory.createOMAttribute(
-                        WSDL2Constants.ATTRIBUTE_CODE, wsoap, property));
+                        WSDL2Constants.ATTRIBUTE_CODE, wsoap, faultCode.getQName().getLocalPart()));
             }
-            property = (String) this.options
+            SOAPFaultSubcodes soapFaultSubcodes = (SOAPFaultSubcodes) this.options
                     .get(WSDL2Constants.ATTR_WSOAP_SUBCODES);
-            if (property != null) {
+            QName faultCodes [];
+            if (soapFaultSubcodes != null && (faultCodes = soapFaultSubcodes.getQNames()) != null) {
+                for (int i=0 ; i < faultCodes.length; i++) {
                 bindingMessageElement.addAttribute(omFactory.createOMAttribute(
-                        WSDL2Constants.ATTRIBUTE_SUBCODES, wsoap, property));
+                        WSDL2Constants.ATTRIBUTE_SUBCODES, wsoap, faultCodes[0].getLocalPart()));
+                }
             }
             Integer code = (Integer) this.options
                     .get(WSDL2Constants.ATTR_WHTTP_CODE);

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=536430&r1=536429&r2=536430
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Tue May  8 22:56:22 2007
@@ -24,6 +24,7 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.woden.wsdl20.extensions.http.HTTPAuthenticationScheme;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -119,9 +120,9 @@
         endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, this.getName()));
         endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.BINDING_LOCAL_NAME, null, tns.getPrefix() + ":" + getBinding().getName().getLocalPart()));
         endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
-        property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE);
-        if (property != null) {
-           endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_AUTHENTICATION_TYPE, whttp, property));
+        HTTPAuthenticationScheme authenticationScheme = (HTTPAuthenticationScheme) this.options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE);
+        if (authenticationScheme != null) {
+           endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_AUTHENTICATION_TYPE, whttp, authenticationScheme.toString()));
         }
         property = (String)options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_REALM);
         if (property != null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org