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 08:33:57 UTC

svn commit: r536443 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description: AxisBindingMessage.java AxisEndpoint.java

Author: keithc
Date: Tue May  8 23:33:56 2007
New Revision: 536443

URL: http://svn.apache.org/viewvc?view=rev&rev=536443
Log:
Applying fix for axis2-2627


Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=diff&rev=536443&r1=536442&r2=536443
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Tue May  8 23:33:56 2007
@@ -25,7 +25,10 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMAbstractFactory;
+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;
 import java.util.Map;
 import java.util.ArrayList;
@@ -142,15 +145,20 @@
             bindingMessageElement.addAttribute(omFactory.createOMAttribute(
                     WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + this.name));
             // Fault specific properties
-            property = (String) this.options.get(WSDL2Constants.ATTR_WSOAP_CODE);
-            if (property != null) {
+            SOAPFaultCode faultCode = (SOAPFaultCode) this.options
+                    .get(WSDL2Constants.ATTR_WSOAP_CODE);
+            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.get(WSDL2Constants.ATTR_WSOAP_SUBCODES);
-            if (property != null) {
+            SOAPFaultSubcodes soapFaultSubcodes = (SOAPFaultSubcodes) this.options
+                    .get(WSDL2Constants.ATTR_WSOAP_SUBCODES);
+            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);
             if (code != null) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=536443&r1=536442&r2=536443
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Tue May  8 23:33:56 2007
@@ -23,6 +23,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;
@@ -118,9 +119,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