axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r525760 - in /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2: deployment/WarBasedAxisConfigurator.java description/AxisEndpoint.java description/AxisService2OM.java description/AxisService2WSDL2.java
Date Thu, 05 Apr 2007 08:41:01 GMT
Author: keithc
Date: Thu Apr  5 01:41:00 2007
New Revision: 525760

URL: http://svn.apache.org/viewvc?view=rev&rev=525760
Log:
Removing enableHTTP parameter as its of no use now, We can show HTTP binding in both war and
simpleAxis server
Fixing the epr in ?wsdl2.

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java?view=diff&rev=525760&r1=525759&r2=525760
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
Thu Apr  5 01:41:00 2007
@@ -159,18 +159,7 @@
             log.error(e.getMessage(), e);
         } catch (IOException e) {
             log.error(e.getMessage(), e);
-        } finally {
-            try {
-                Parameter enableHttp = new Parameter("enableHTTP", "true");
-                if (axisConfig != null) {
-                    axisConfig.addParameter(enableHttp);
-                } else {
-                    log.error("axisConfig was null after initialization");
-                }
-            } catch (AxisFault axisFault) {
-                log.info(axisFault.getMessage());
-            }
-        }
+        } 
     }
 
 

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=525760&r1=525759&r2=525760
==============================================================================
--- 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
Thu Apr  5 01:41:00 2007
@@ -112,13 +112,13 @@
 
     }
 
-    public OMElement toWSDL20(OMNamespace tns, OMNamespace whttp) {
+    public OMElement toWSDL20(OMNamespace tns, OMNamespace whttp, String epr) {
         String property;
         OMFactory omFactory = OMAbstractFactory.getOMFactory();
         OMElement endpointElement = omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME,
null);
         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, getEndpointURL()));
+        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));

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java?view=diff&rev=525760&r1=525759&r2=525760
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
Thu Apr  5 01:41:00 2007
@@ -78,8 +78,6 @@
 
     private String servicePath;
 
-    private boolean generateHttp = false;
-
     private HashMap policiesInDefinitions;
 
     private ExternalPolicySerializer serializer;
@@ -185,18 +183,8 @@
         generatePortType(fac, ele);
         generateSOAP11Binding(fac, ele);
         generateSOAP12Binding(fac, ele);
-        // generateHttp
-        if (axisService.getParent() != null) {
-            AxisDescription axisdesc = axisService.getParent().getParent();
-            Parameter parameter = axisdesc.getParameter("enableHTTP");
-            if (parameter != null) {
-                Object value = parameter.getValue();
-                if ("true".equals(value.toString())) {
-                    generateHttp = true;
-                    generatePostBinding(fac, ele);
-                }
-            }
-        }
+        generateHTTPBinding(fac, ele);
+
         generateService(fac, ele);
         addPoliciesToDefinitionElement(policiesInDefinitions.values()
                 .iterator(), definition);
@@ -426,11 +414,7 @@
 
         addPolicyAsExtElement(PolicyInclude.SERVICE_POLICY, axisService
                 .getPolicyInclude(), service, fac);
-
-        if (generateHttp) {
-            generateHTTPPorts(fac, service);
-        }
-
+        generateHTTPPorts(fac, service);
     }
 
     private void generateSOAP11Ports(OMFactory fac, OMElement service)
@@ -782,7 +766,7 @@
         }
     }
 
-    private void generatePostBinding(OMFactory fac, OMElement defintions)
+    private void generateHTTPBinding(OMFactory fac, OMElement defintions)
             throws Exception {
         OMElement binding = fac.createOMElement(BINDING_LOCAL_NAME, wsdl);
         defintions.addChild(binding);

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java?view=diff&rev=525760&r1=525759&r2=525760
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
Thu Apr  5 01:41:00 2007
@@ -142,11 +142,15 @@
         // generate default endpoint elements.
         Map endpointMap = axisService.getEndpoints();
         if (endpointMap != null && endpointMap.size() > 0) {
+            String[] eprs = axisService.getEPRs();
+            if (eprs == null) {
+                eprs = new String[]{axisService.getName()};
+            }
             OMElement serviceElement = getServiceElement(tns, omFactory, interfaceName);
             Iterator iterator = endpointMap.values().iterator();
             while (iterator.hasNext()) {
                 AxisEndpoint axisEndpoint = (AxisEndpoint) iterator.next();
-                serviceElement.addChild(axisEndpoint.toWSDL20(tns, whttp));
+                serviceElement.addChild(axisEndpoint.toWSDL20(tns, whttp, eprs[0]));
 
                 descriptionElement.addChild(axisEndpoint.getBinding().toWSDL20(tns, wsoap,
whttp,
                                                                                interfaceName,



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


Mime
View raw message