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 he...@apache.org on 2004/11/08 09:55:45 UTC
svn commit: rev 56912 - in webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom: . impl
Author: hemapani
Date: Mon Nov 8 00:55:44 2004
New Revision: 56912
Added:
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLConstants.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLEndpoint.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLEndpointImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLProcessingException.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLServiceImpl.java
Modified:
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/Component.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLDefinitions.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLInterface.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLService.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/ComponentImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/FaultReferenceImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/MessageReferenceImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WDSLPropertyImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLBindingImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLDefinitionsImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFaultImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFeatureImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLInterfaceImpl.java
webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLOperationImpl.java
Log:
checked in Chatura's changes
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/Component.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/Component.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/Component.java Mon Nov 8 00:55:44 2004
@@ -15,10 +15,14 @@
*/
package org.apache.axis.wsdl.wom;
+import java.util.HashMap;
+
/**
* @author chathura@opensource.lk
*
*/
public interface Component {
+ public HashMap getComponentProperties();
+ public void setComponentProperties(HashMap properties);
}
Added: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLConstants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLConstants.java Mon Nov 8 00:55:44 2004
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.axis.wsdl.wom;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public interface WSDLConstants {
+
+ public static final String WSDL2_0_NAMESPACE = "http://www.w3.org/2004/03/wsdl";
+
+ public static final String WSDL1_1_NAMESPACE = "http://www.schemas.xmlsoap.org/wsdl/";
+
+ public static final String[]WSDL_NAMESPACES = {WSDL2_0_NAMESPACE, WSDL1_1_NAMESPACE};
+}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLDefinitions.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLDefinitions.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLDefinitions.java Mon Nov 8 00:55:44 2004
@@ -16,20 +16,20 @@
package org.apache.axis.wsdl.wom;
import java.net.URI;
-import java.util.List;
+import java.util.HashMap;
/**
* @author chathura@opensource.lk
*
*/
public interface WSDLDefinitions {
- public List getBindings();
+ public HashMap getBindings();
- public void setBindings(List bindings);
+ public void setBindings(HashMap bindings);
- public List getServices();
+ public HashMap getServices();
- public void setServices(List services);
+ public void setServices(HashMap services);
public URI getTargetNameSpace();
@@ -39,7 +39,7 @@
public void setTypes(Object types);
- public List getWsdlInterfaces();
+ public HashMap getWsdlInterfaces();
- public void setWsdlInterfaces(List wsdlInterfaces);
-}
\ No newline at end of file
+ public void setWsdlInterfaces(HashMap wsdlInterfaces);
+}
Added: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLEndpoint.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLEndpoint.java Mon Nov 8 00:55:44 2004
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.axis.wsdl.wom;
+
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public interface WSDLEndpoint {
+ public WSDLBinding getBinding();
+
+ public void setBinding(WSDLBinding binding);
+
+ public String getName();
+
+ public void setName(String name);
+}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLInterface.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLInterface.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLInterface.java Mon Nov 8 00:55:44 2004
@@ -23,7 +23,8 @@
*
*/
public interface WSDLInterface {
- public List getFeatures();
+
+ public List getFeatures();
public void setFeatures(List features);
@@ -84,4 +85,4 @@
* @param uri
*/
public void setTargetnamespace(URI uri);
-}
\ No newline at end of file
+}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLService.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLService.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/WSDLService.java Mon Nov 8 00:55:44 2004
@@ -15,10 +15,30 @@
*/
package org.apache.axis.wsdl.wom;
+import java.net.URI;
+import java.util.HashMap;
+
+
/**
* @author chathura@opensource.lk
*
*/
public interface WSDLService {
+ public HashMap getEndpoints();
+
+ public void setEndpoints(HashMap endpoints);
+
+ public void setEndpoint(WSDLEndpoint endpoint, String nCName);
+
+ public String getName();
+
+ public void setName(String name);
+
+ public URI getNamespaceURI();
+
+ public void setNamespaceURI(URI namespaceURI);
+
+ public WSDLInterface getServiceInterface();
+ public void setServiceInterface(WSDLInterface serviceInterface);
}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/ComponentImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/ComponentImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/ComponentImpl.java Mon Nov 8 00:55:44 2004
@@ -15,10 +15,38 @@
*/
package org.apache.axis.wsdl.wom.impl;
+import java.util.HashMap;
+
+
+
+import org.apache.axis.wsdl.wom.Component;
+import org.apache.axis.wsdl.wom.WSDLConstants;
+import org.apache.xml.utils.QName;
+
+
+
+
/**
* @author Chathura Herath
*
*/
-public class ComponentImpl {
+public class ComponentImpl implements Component, WSDLConstants{
+ protected HashMap componentProperties = new HashMap();
+
+
+ public HashMap getComponentProperties() {
+ return componentProperties;
+ }
+ public void setComponentProperties(HashMap properties) {
+ this.componentProperties = properties;
+ }
+
+ protected void checkValidityOfNamespaceWRTWSDLContext(QName qName){
+ for(int i=0; i< WSDL_NAMESPACES.length; i++){
+ if(qName.getNamespaceURI() == WSDL_NAMESPACES[i])
+ return;
+ }
+ throw new WSDLProcessingException("The Namespace of the QName is not a valid WSDL namespace");
+ }
}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/FaultReferenceImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/FaultReferenceImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/FaultReferenceImpl.java Mon Nov 8 00:55:44 2004
@@ -21,7 +21,7 @@
* @author chathura@opensource.lk
*
*/
-public class FaultReferenceImpl implements FaultReference {
+public class FaultReferenceImpl extends ComponentImpl implements FaultReference {
//TODO make it a QNAME
private String ref;
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/MessageReferenceImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/MessageReferenceImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/MessageReferenceImpl.java Mon Nov 8 00:55:44 2004
@@ -21,7 +21,7 @@
* @author Chathura Herath
*
*/
-public class MessageReferenceImpl implements MessageReference {
+public class MessageReferenceImpl extends ComponentImpl implements MessageReference {
//Referes to the MEP the Message relates to.
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WDSLPropertyImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WDSLPropertyImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WDSLPropertyImpl.java Mon Nov 8 00:55:44 2004
@@ -23,15 +23,15 @@
* @author chathura@opensource.lk
*
*/
-public class WDSLPropertyImpl implements WDSLProperty {
+public class WDSLPropertyImpl extends ComponentImpl implements WDSLProperty {
private URI name;
- //TODO replace with the xmlbeans data binding
+ //TODO replace with the data binding object structure
private Object constraint;
- //TODO replace with the xmlbeans data binding
+ //TODO replace with the data binding object structure
private Object value;
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLBindingImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLBindingImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLBindingImpl.java Mon Nov 8 00:55:44 2004
@@ -26,7 +26,7 @@
* @author chathura@opensource.lk
*
*/
-public class WSDLBindingImpl implements WSDLBinding {
+public class WSDLBindingImpl extends ComponentImpl implements WSDLBinding {
private String name;
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLDefinitionsImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLDefinitionsImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLDefinitionsImpl.java Mon Nov 8 00:55:44 2004
@@ -16,16 +16,21 @@
package org.apache.axis.wsdl.wom.impl;
import java.net.URI;
-import java.util.LinkedList;
-import java.util.List;
+import java.util.HashMap;
+import org.apache.axis.wsdl.wom.WSDLBinding;
import org.apache.axis.wsdl.wom.WSDLDefinitions;
+import org.apache.axis.wsdl.wom.WSDLInterface;
+import org.apache.axis.wsdl.wom.WSDLService;
+import org.apache.xml.utils.QName;
+
+
/**
* @author chathura@opensource.lk
*
*/
-public class WSDLDefinitionsImpl implements WSDLDefinitions {
+public class WSDLDefinitionsImpl extends ComponentImpl implements WSDLDefinitions {
//TODO local name and the naspace name to be made static or through a Constant class.
@@ -36,44 +41,164 @@
//private NamespaceMappings[] namespaceDefinitions;
- //Element Infotmation Items.
+ //TODO The object structure of some external xml data binding is going to be pluged here eventually.
private Object types;
/**
* This List will be a list of <code>WSDLInterface</code> objects.
*/
- private List wsdlInterfaces = new LinkedList();
+ private HashMap wsdlInterfaces = new HashMap();
/**
- * This <code>List </code> is a list of <code>WSDLBinding </code> objects.
+ * This <code>HashMap </code> is a Map of <code>WSDLBinding </code> objects.
*/
- private List bindings = new LinkedList();
+ private HashMap bindings = new HashMap();
/**
- * This <code>List </code> is a list of <code>WSDLService </code> objects.
+ * This <code>HashMap </code> is a list of <code>WSDLService </code> objects.
* Support of multiple is backed by the requirements in the specification.
*/
- private List services = new LinkedList();
-
+ private HashMap services = new HashMap();
+
+ public HashMap getBindings() {
+ return bindings;
+ }
+ public void setBindings(HashMap bindings) {
+ this.bindings = bindings;
+ }
+ /**
+ * The binding will be added despite its namespace being either of
+ * that specified in the WSDLConstants class(WSDL_NAMESPACES) otherwise the checkValidityOfNamespaceWRTWSDLContext()
+ * method will throw an exception.
+ * @param qName The QName of the binding
+ * @param binding Binding Object
+ */
+ public void addBinding(QName qName, WSDLBinding binding){
+ checkValidityOfNamespaceWRTWSDLContext(qName);
+ this.addBinding(qName.getLocalPart(), binding);
+ }
+ /**
+ * Inserts a WSDLBinding to the Collection by keying its NCName.
+ * @param nCName NCName of the Binding
+ * @param binding Binding Object
+ */
+ public void addBinding(String nCName, WSDLBinding binding){
+ this.bindings.put(nCName, binding);
+ }
+ /**
+ * The binding will be retrived despite its namespace being either of
+ * that specified in the WSDLConstants class(WSDL_NAMESPACES) otherwise the checkValidityOfNamespaceWRTWSDLContext()
+ * method will throw an exception.
+ * @param qName THe Namespace of the QName should be either of the WSDL_NAMESPACES
+ * mentioned in the WSDLConstants interface.
+ * @return The Binding with the relavent QName which have a namespace
+ * that qualifies that of the versions in the WSDLConstants interface.
+ */
+ public WSDLBinding getBinding(QName qName){
+ checkValidityOfNamespaceWRTWSDLContext(qName);
+ return this.getBinding(qName.getLocalPart());
+ }
+ /**
+ * Binding will be retrived by its NCName and the Namespace of the QName
+ * is assumed to be in line with that of the WSDL_NAMESPACES in the WSDLConstants
+ * interface, Thus no namespace checking will be done.
+ * @param nCName NCName of the Binding
+ * @return WSDLBinding Object or will throw an WSDLProcessingException in the case of object not found.
+ */
+ public WSDLBinding getBinding(String nCName){
+ WSDLBinding temp = (WSDLBinding)this.bindings.get(nCName);
+ if(null == temp) throw new WSDLProcessingException("Binding not found for NCName "+nCName);
+ return temp;
+ }
+
+ /**
+ * The Inteface will be added despite its namespace being either of
+ * that specified in the WSDLConstants class(WSDL_NAMESPACES) otherwise the checkValidityOfNamespaceWRTWSDLContext()
+ * method will throw an exception.
+ * @param qName The QName of the Inteface
+ * @param interfaceComponent WSDLInterface Object
+ */
+ public void addInterface(QName qName, WSDLInterface interfaceComponent){
+ checkValidityOfNamespaceWRTWSDLContext(qName);
+ this.wsdlInterfaces.put(qName.getLocalPart(), interfaceComponent);
+ }
- public List getBindings() {
- return bindings;
+ /**
+ * Inserts a WSDLInterface to the Collection by keying its NCName.
+ * @param nCName NCName of the WSDLInterface
+ * @param interfaceComponent WSDLInterface Object
+ */
+ public void addInterface(String nCName, WSDLInterface interfaceComponent){
+ this.wsdlInterfaces.put(nCName, interfaceComponent);
}
- public void setBindings(List bindings) {
- this.bindings = bindings;
+
+
+ /**
+ * The Interface Component will be retrived despite its namespace being either of
+ * that specified in the WSDLConstants class(WSDL_NAMESPACES) otherwise the checkValidityOfNamespaceWRTWSDLContext()
+ * method will throw an exception.
+ * @param qName THe Namespace of the QName should be either of the WSDL_NAMESPACES
+ * mentioned in the WSDLConstants interface.
+ * @return The Interface Component with the relavent QName which have a namespace
+ * that qualifies that of the versions in the WSDLConstants interface.
+ */
+ public WSDLInterface getInterface(QName qName){
+ checkValidityOfNamespaceWRTWSDLContext(qName);
+ return this.getInterface(qName.getLocalPart());
}
- public List getServices() {
- return services;
+ /**
+ * Interface Component will be retrived by its NCName and the Namespace of the QName
+ * is assumed to be in line with that of the WSDL_NAMESPACES in the WSDLConstants
+ * interface, Thus no namespace checking will be done.
+ * @param nCName NCName of the Interface Component
+ * @return WSDLInterface Object or will throw an WSDLProcessingException in the case of object not found.
+ */
+ public WSDLInterface getInterface(String nCName){
+ WSDLInterface temp = (WSDLInterface)this.wsdlInterfaces.get(nCName);
+ if(null == temp) throw new WSDLProcessingException("Interface Component not found for NCName "+nCName);
+ return temp;
+ }
+
+ public HashMap getServices() {
+ return services;
+ }
+ public void setServices(HashMap services) {
+ this.services = services;
+ }
+
+ /**
+ * The Service will be retrived despite its namespace being either of
+ * that specified in the WSDLConstants class(WSDL_NAMESPACES) otherwise the checkValidityOfNamespaceWRTWSDLContext()
+ * method will throw an exception.
+ * @param qName THe Namespace of the QName should be either of the WSDL_NAMESPACES
+ * mentioned in the WSDLConstants interface.
+ * @return The Service with the relavent QName which have a namespace
+ * that qualifies that of the versions in the WSDLConstants interface.
+ */
+ public WSDLService getService(QName qName){
+ checkValidityOfNamespaceWRTWSDLContext(qName);
+ return this.getService(qName.getLocalPart());
}
- public void setServices(List services) {
- this.services = services;
+ /**
+ * Service will be retrived by its NCName and the Namespace of the QName
+ * is assumed to be in line with that of the WSDL_NAMESPACES in the WSDLConstants
+ * interface, Thus no namespace checking will be done.
+ * @param nCName NCName of the Service
+ * @return WSDLService Object or will throw an WSDLProcessingException in the case of object not found.
+ */
+ public WSDLService getService(String nCName){
+ WSDLService temp = (WSDLService)this.services.get(nCName);
+ if(null == temp) throw new WSDLProcessingException("Service not found for NCName "+nCName);
+ return temp;
}
+
+
public URI getTargetNameSpace() {
return targetNameSpace;
}
@@ -86,10 +211,10 @@
public void setTypes(Object types) {
this.types = types;
}
- public List getWsdlInterfaces() {
+ public HashMap getWsdlInterfaces() {
return wsdlInterfaces;
}
- public void setWsdlInterfaces(List wsdlInterfaces) {
+ public void setWsdlInterfaces(HashMap wsdlInterfaces) {
this.wsdlInterfaces = wsdlInterfaces;
}
}
Added: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLEndpointImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLEndpointImpl.java Mon Nov 8 00:55:44 2004
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.axis.wsdl.wom.impl;
+
+import org.apache.axis.wsdl.wom.WSDLBinding;
+import org.apache.axis.wsdl.wom.WSDLEndpoint;
+
+
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class WSDLEndpointImpl extends ComponentImpl implements WSDLEndpoint{
+
+ private String name;
+
+ private WSDLBinding binding;
+
+ public WSDLBinding getBinding() {
+ return binding;
+ }
+ public void setBinding(WSDLBinding binding) {
+ this.binding = binding;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFaultImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFaultImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFaultImpl.java Mon Nov 8 00:55:44 2004
@@ -22,7 +22,7 @@
* @author chathura@opensource.lk
*
*/
-public class WSDLFaultImpl implements WSDLFault {
+public class WSDLFaultImpl extends ComponentImpl implements WSDLFault {
//TODO its a NCName so parse it. and this is required
private String name;
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFeatureImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFeatureImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLFeatureImpl.java Mon Nov 8 00:55:44 2004
@@ -23,7 +23,7 @@
* @author chathura@opensource.lk
*
*/
-public class WSDLFeatureImpl implements WSDLFeature {
+public class WSDLFeatureImpl extends ComponentImpl implements WSDLFeature {
private URI name;
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLInterfaceImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLInterfaceImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLInterfaceImpl.java Mon Nov 8 00:55:44 2004
@@ -29,7 +29,7 @@
* @author Chathura Herath
*
*/
-public class WSDLInterfaceImpl implements WSDLInterface {
+public class WSDLInterfaceImpl extends ComponentImpl implements WSDLInterface {
private String name;
@@ -141,4 +141,4 @@
targetnamespace = uri;
}
-}
\ No newline at end of file
+}
Modified: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLOperationImpl.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLOperationImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLOperationImpl.java Mon Nov 8 00:55:44 2004
@@ -26,7 +26,7 @@
* @author Chathura Herath
*
*/
-public class WSDLOperationImpl implements WSDLOperation {
+public class WSDLOperationImpl extends ComponentImpl implements WSDLOperation {
private String name;
private URI targetnemespace;
Added: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLProcessingException.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLProcessingException.java Mon Nov 8 00:55:44 2004
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.axis.wsdl.wom.impl;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class WSDLProcessingException extends RuntimeException {
+
+ public WSDLProcessingException(String message){
+ super(message);
+ }
+}
Added: webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLServiceImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/wsdl_pt_chatura/src/java/org/apache/axis/wsdl/wom/impl/WSDLServiceImpl.java Mon Nov 8 00:55:44 2004
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.axis.wsdl.wom.impl;
+
+import java.net.URI;
+import java.util.HashMap;
+
+import org.apache.axis.wsdl.wom.WSDLEndpoint;
+import org.apache.axis.wsdl.wom.WSDLInterface;
+import org.apache.axis.wsdl.wom.WSDLService;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class WSDLServiceImpl implements WSDLService {
+
+ /**
+ * The NCName that identifies the Service.
+ */
+ private String name;
+
+ /**
+ * Namespace of the target namespace of the Definition Component's targetNamespace
+ * attrebute information item.
+ */
+ private URI namespaceURI;
+
+ /**
+ * The Interface that this Service is an instance of.
+ */
+ private WSDLInterface serviceInterface;
+
+ /**
+ *
+ */
+ private HashMap endpoints;
+
+
+ public HashMap getEndpoints() {
+ return endpoints;
+ }
+ public void setEndpoints(HashMap endpoints) {
+ this.endpoints = endpoints;
+ }
+
+ /**
+ * Will add a WSDLEndpoint object to the WOM keyed with NCName;
+ */
+ public void setEndpoint(WSDLEndpoint endpoint, String nCName){
+ this.endpoints.put(nCName, endpoint);
+ }
+
+ /**
+ * Endpoint will be retrived by its NCName.
+ * @param nCName NCName of the Service
+ * @return WSDLService Object or will throw an WSDLProcessingException in the case of object not found.
+ */
+ public WSDLService getService(String nCName){
+ WSDLService temp = (WSDLService)this.endpoints.get(nCName);
+ if(null == temp) throw new WSDLProcessingException("Service not found for NCName "+nCName);
+ return temp;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public URI getNamespaceURI() {
+ return namespaceURI;
+ }
+ public void setNamespaceURI(URI namespaceURI) {
+ this.namespaceURI = namespaceURI;
+ }
+ public WSDLInterface getServiceInterface() {
+ return serviceInterface;
+ }
+ public void setServiceInterface(WSDLInterface serviceInterface) {
+ this.serviceInterface = serviceInterface;
+ }
+}