axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r381908 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/ core/src/org/apache/axis2/transport/http/ integration/test/org/apache/axis2/e...
Date Wed, 01 Mar 2006 05:15:31 GMT
Author: deepal
Date: Tue Feb 28 21:15:27 2006
New Revision: 381908

URL: http://svn.apache.org/viewcvs?rev=381908&view=rev
Log:
-fixing ?wsdl (when generating multiple ports)

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
Tue Feb 28 21:15:27 2006
@@ -20,12 +20,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.ParameterInclude;
-import org.apache.axis2.description.PolicyInclude;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisObserver;
 import org.apache.axis2.engine.MessageReceiver;
@@ -112,7 +107,7 @@
                 processHostCongiguration(hostElement, axisConfig);
             }
 
-           // processing <wsp:Policy> .. </..> elements
+            // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
                     TAG_POLICY));
 
@@ -202,41 +197,32 @@
      *
      * @param oservers
      */
-    private void processObservers(Iterator oservers) throws DeploymentException {
+    private void processObservers(Iterator oservers) {
         while (oservers.hasNext()) {
-            OMElement observerelement = (OMElement) oservers.next();
-            AxisObserver observer;
-            OMAttribute trsClas = observerelement.getAttribute(new QName(TAG_CLASS_NAME));
-            String clasName;
-
-            if (trsClas != null) {
-                clasName = trsClas.getAttributeValue();
-            } else {
-                throw new DeploymentException(
-                        Messages.getMessage(DeploymentErrorMsgs.OBSERVER_ERROR));
-            }
-
             try {
+                OMElement observerelement = (OMElement) oservers.next();
+                AxisObserver observer;
+                OMAttribute trsClas = observerelement.getAttribute(new QName(TAG_CLASS_NAME));
+                String clasName ;
+                if (trsClas != null) {
+                    clasName = trsClas.getAttributeValue();
+                } else {
+                    log.info(Messages.getMessage(DeploymentErrorMsgs.OBSERVER_ERROR));
+                    return;
+                }
+
                 Class observerclass = Class.forName(clasName, true,
                         Thread.currentThread().getContextClassLoader());
-
                 observer = (AxisObserver) observerclass.newInstance();
-
                 // processing Parameters
                 // Processing service level parameters
                 Iterator itr = observerelement.getChildrenWithName(new QName(TAG_PARAMETER));
-
                 processParameters(itr, observer, axisConfig);
-
                 // initialization
                 observer.init(axisConfig);
                 axisConfig.addObservers(observer);
-            } catch (ClassNotFoundException e) {
-                throw new DeploymentException(e);
-            } catch (IllegalAccessException e) {
-                throw new DeploymentException(e);
-            } catch (InstantiationException e) {
-                throw new DeploymentException(e);
+            } catch (Exception e) {
+                log.info(e.getMessage());
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
Tue Feb 28 21:15:27 2006
@@ -328,7 +328,7 @@
         return null;
     }
 
-    public void printWSDL(OutputStream out, String serviceURL) throws AxisFault {
+    public void printWSDL(OutputStream out) throws AxisFault {
         ArrayList eprList = new ArrayList();
         AxisConfiguration axisConfig = getAxisConfiguration();
         if (enableAllTransport) {
@@ -373,8 +373,9 @@
         try {
             Definition wsdlDefinition = getWSDLDefinition();
             Iterator itr_bindings = wsdlDefinition.getBindings().values().iterator();
+            Binding binding = null;
             while (itr_bindings.hasNext()) {
-                Binding binding = (Binding) itr_bindings.next();
+                binding = (Binding) itr_bindings.next();
                 binding.getExtensibilityElements().clear();
                 javax.wsdl.extensions.soap.SOAPBinding soapBinding = new SOAPBindingImpl();
                 soapBinding.setStyle("document");
@@ -423,6 +424,8 @@
                     soapAddress.setElementType(SOAPConstants.Q_ELEM_SOAP_ADDRESS);
                     soapAddress.setLocationURI(url);
                     port.addExtensibilityElement(soapAddress);
+                    port.setName(getName() + "Port" + i);
+                    port.setBinding(binding);
                     service.addPort(port);
                 }
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
Tue Feb 28 21:15:27 2006
@@ -243,7 +243,7 @@
             String epr = URL[i];
             WSDLEndpoint endpoints = wsdlComponentFactory.createEndpoint();
             endpoints.setBinding(binding);
-            endpoints.setName(new QName(ServiceName + "PortType"));
+            endpoints.setName(new QName(ServiceName + "PortType" + i));
             SOAPAddressImpl address = new SOAPAddressImpl();
             address.setLocationURI(epr);
             endpoints.addExtensibilityElement(address);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
Tue Feb 28 21:15:27 2006
@@ -108,7 +108,7 @@
                 }
             } catch (Exception e) {
                 log.info(e.getMessage());
-            }
+            } 
         }
         stopped = false;
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
Tue Feb 28 21:15:27 2006
@@ -150,7 +150,7 @@
                     if (service != null) {
                         response.addHeader(new Header("Content-Type", "text/xml"));
                         String url = conn.getURL(uri.substring(1, uri.length() - 5));
-                        service.printWSDL(baos, url);
+                        service.printWSDL(baos);
                         byte[] buf = baos.toByteArray();
                         response.setBody(new ByteArrayInputStream(buf));
                         conn.writeResponse(response);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
Tue Feb 28 21:15:27 2006
@@ -463,7 +463,7 @@
             if (serviceObj != null) {
                 if (wsdl != null) {
                     res.setContentType("text/xml");
-                    ((AxisService) serviceObj).printWSDL(out, filePart);
+                    ((AxisService) serviceObj).printWSDL(out);
                     out.flush();
                     out.close();
                     return;

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
Tue Feb 28 21:15:27 2006
@@ -62,7 +62,7 @@
         assertNotNull(messge.getSchemaElement());
         assertNotNull(service.getOperation(new QName("putValue")));
         assertNotNull(axisConfig.getService("MyService"));
-        service.printWSDL(System.out, "http://127.0.0.1:8080/axis2/services/");
+        service.printWSDL(System.out);
 
         RPCServiceClient client = new RPCServiceClient(clinetConfigurationctx, null);
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?rev=381908&r1=381907&r2=381908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
Tue Feb 28 21:15:27 2006
@@ -55,7 +55,7 @@
                     "/axis2/services/EchoXMLService?wsdl");
             ServiceClient serviceClient = new ServiceClient(null, wsdlURL,
                     new QName("http://org.apache.axis2/", "EchoXMLService"),
-                    "EchoXMLServicePortType");
+                    "EchoXMLServicePortType0");
             OMElement payload = TestingUtils.createDummyOMElement();
             OMElement response = serviceClient.sendReceive(
                     new QName("http://org.apache.axis2/xsd", "echoOMElement"), payload);



Mime
View raw message