You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ke...@apache.org on 2006/11/24 14:12:00 UTC

svn commit: r478868 - in /webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description: AxisBinding.java AxisBindingMessage.java AxisBindingOperation.java AxisEndpoint.java WSDL20ToAxisServiceBuilder.java

Author: keithc
Date: Fri Nov 24 05:11:59 2006
New Revision: 478868

URL: http://svn.apache.org/viewvc?view=rev&rev=478868
Log:
added the classes to support multiple endpoints

Added:
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
Modified:
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java

Added: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBinding.java?view=auto&rev=478868
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBinding.java (added)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBinding.java Fri Nov 24 05:11:59 2006
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+
+             http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.     
+ */
+package org.apache.axis2.description;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.Map;
+import java.util.HashMap;
+
+public class AxisBinding extends AxisDescription{
+
+    private String name;
+
+    private String type;
+
+    private Map options;
+
+    public AxisBinding() {
+        options = new HashMap();
+    }
+
+
+    public void setProperty(String name, Object value) {
+        options.put(name, value);
+    }
+
+    /**
+     * @param name name of the property to search for
+     * @return the value of the property, or null if the property is not found
+     */
+    public Object getProperty(String name) {
+        Object obj = options.get(name);
+        if (obj != null) {
+            return obj;
+        }
+
+        return null;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Object getKey() {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void engageModule(AxisModule axisModule, AxisConfiguration axisConfig) throws AxisFault {
+        throw new UnsupportedOperationException("Sorry we do not support this");
+    }
+
+    public boolean isEngaged(QName moduleName) {
+        throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+
+    }
+}

Added: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=auto&rev=478868
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (added)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Fri Nov 24 05:11:59 2006
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+
+             http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.     
+ */
+package org.apache.axis2.description;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.Map;
+import java.util.HashMap;
+
+public class AxisBindingMessage extends AxisDescription{
+
+    private String direction;
+
+    private Map options;
+
+    private AxisMessage axisMessage;
+
+    public AxisMessage getAxisMessage() {
+        return axisMessage;
+    }
+
+    public void setAxisMessage(AxisMessage axisMessage) {
+        this.axisMessage = axisMessage;
+    }
+
+    public String getDirection() {
+        return direction;
+    }
+
+    public void setDirection(String direction) {
+        this.direction = direction;
+    }
+
+    public AxisBindingMessage() {
+        options = new HashMap();
+    }
+
+
+    public void setProperty(String name, Object value) {
+        options.put(name, value);
+    }
+
+    /**
+     * @param name name of the property to search for
+     * @return the value of the property, or null if the property is not found
+     */
+    public Object getProperty(String name) {
+        Object obj = options.get(name);
+        if (obj != null) {
+            return obj;
+        }
+
+        return null;
+    }
+
+
+    public Object getKey() {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void engageModule(AxisModule axisModule, AxisConfiguration axisConfig) throws AxisFault {
+        throw new UnsupportedOperationException("Sorry we do not support this");
+    }
+
+    public boolean isEngaged(QName moduleName) {
+        throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+
+    }
+}
+

Added: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java?view=auto&rev=478868
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java (added)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java Fri Nov 24 05:11:59 2006
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+
+             http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.     
+ */
+package org.apache.axis2.description;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.Map;
+import java.util.HashMap;
+
+public class AxisBindingOperation extends AxisDescription{
+
+    private AxisOperation axisOperation;
+
+    public AxisOperation getAxisOperation() {
+        return axisOperation;
+    }
+
+    public void setAxisOperation(AxisOperation axisOperation) {
+        this.axisOperation = axisOperation;
+    }
+
+    private Map options;
+
+    public AxisBindingOperation() {
+        options = new HashMap();
+    }
+
+
+    public void setProperty(String name, Object value) {
+        options.put(name, value);
+    }
+
+
+    //todo faults
+    
+    public Object getKey() {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void engageModule(AxisModule axisModule, AxisConfiguration axisConfig) throws AxisFault {
+        throw new UnsupportedOperationException("Sorry we do not support this");
+    }
+
+    public boolean isEngaged(QName moduleName) {
+        throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+
+    }
+}

Added: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=auto&rev=478868
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (added)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Fri Nov 24 05:11:59 2006
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+
+             http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.     
+ */
+package org.apache.axis2.description;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+
+public class AxisEndpoint extends AxisDescription{
+
+    // The name of the endpoint
+    private String name;
+
+    // The binding reffered to by the endpoint
+    private AxisBinding binding;
+
+    // The alias used for the endpoint
+    private String alias;
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public AxisBinding getBinding() {
+        return binding;
+    }
+
+    public void setBinding(AxisBinding binding) {
+        this.binding = binding;
+    }
+
+    public Object getKey() {
+        //ToDO
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void engageModule(AxisModule axisModule, AxisConfiguration axisConfig) throws AxisFault {
+        throw new UnsupportedOperationException("Sorry we do not support this");
+    }
+
+    public boolean isEngaged(QName moduleName) {
+        throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+
+    }
+}

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=478868&r1=478867&r2=478868
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Fri Nov 24 05:11:59 2006
@@ -168,7 +168,20 @@
                 }
             }
 
-            Binding binding = findBinding(description);
+            processService();
+
+            Endpoint [] endpoints = wsdlService.getEndpoints();
+
+            for (int i = 0; i < endpoints.length; i++)
+            {
+                processEndpoint(endpoints[i]);
+            }
+
+
+
+            Binding binding = findBinding();
+
+
             processBinding(binding);
 
             return axisService;
@@ -177,6 +190,24 @@
         }
     }
 
+    private void processService() throws AxisFault {
+
+        Service[] services = description.getServices();
+        if (services.length == 0) {
+            throw new AxisFault("No wsdlService found in the WSDL");
+        }
+
+        if (serviceName != null) {
+            wsdlService = services[0];
+        }
+    }
+
+    private void processEndpoint(Endpoint endpoint){
+
+
+
+    }
+
     /**
      * contains all code which gathers non-wsdlService specific information from the
      * wsdl.
@@ -553,8 +584,10 @@
         }
     }
 
-    private Binding findBinding(Description discription) throws AxisFault {
-        Service[] services = discription.getServices();
+
+
+    private Binding findBinding() throws AxisFault {
+        Service[] services = description.getServices();
         wsdlService = null;
         Endpoint endpoint = null;
         Binding binding = null;



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