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 de...@apache.org on 2005/08/09 13:38:17 UTC
svn commit: r231020 - in
/webservices/axis/trunk/java/modules/core/src/org/apache/axis2:
deployment/repository/util/ArchiveReader.java
description/ServiceDescription.java
Author: deepal
Date: Tue Aug 9 04:37:53 2005
New Revision: 231020
URL: http://svn.apache.org/viewcvs?rev=231020&view=rev
Log:
There was an error when an archive file conatins service.xml (ClassCast Exception), to solve that I had to delegate WSDLServiceImpl method by ServiceDescrption
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=231020&r1=231019&r2=231020&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Tue Aug 9 04:37:53 2005
@@ -27,6 +27,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wsdl.WSDLDescription;
+import org.apache.wsdl.WSDLService;
+import org.apache.wsdl.impl.WSDLServiceImpl;
import java.io.*;
import java.util.Iterator;
@@ -87,9 +89,11 @@
.iterator();
if (iterator.hasNext()) {
foundservice = true;
- service =
- (ServiceDescription) womDescription.getServices()
- .get(iterator.next());
+ WSDLServiceImpl serviceimpl = (WSDLServiceImpl)womDescription.getServices().get(iterator.next());
+ service = new ServiceDescription(serviceimpl);
+// service =
+// (ServiceDescription) womDescription.getServices()
+// .get(iterator.next());
}
if (!foundservice) {
service = new ServiceDescription();
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java?rev=231020&r1=231019&r2=231020&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java Tue Aug 9 04:37:53 2005
@@ -22,10 +22,7 @@
import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.phaseresolver.PhaseResolver;
-import org.apache.wsdl.WSDLBindingOperation;
-import org.apache.wsdl.WSDLEndpoint;
-import org.apache.wsdl.WSDLExtensibilityElement;
-import org.apache.wsdl.WSDLService;
+import org.apache.wsdl.*;
import org.apache.wsdl.extensions.ExtensionConstants;
import org.apache.wsdl.extensions.SOAPOperation;
import org.apache.wsdl.impl.WSDLInterfaceImpl;
@@ -43,13 +40,14 @@
* Class ServiceDescription
*/
public class ServiceDescription
- extends WSDLServiceImpl
- implements WSDLService,
+ // extends WSDLServiceImpl
+ implements WSDLService ,
ParameterInclude,
FlowInclude,
DescriptionConstants {
- private Definition difDefinition = null; //to store the wsdl definition , which is build at the deployment time
+ private Definition difDefinition = null;
+ //to store the wsdl definition , which is build at the deployment time
//to keep the time that last update time of the service
private long lastupdate ;
@@ -64,10 +62,21 @@
private String fileName = "";
+ private WSDLServiceImpl serviceimpl = null;
+
/**
* Constructor ServiceDescription
*/
+
+ public ServiceDescription(WSDLServiceImpl serviceimpl){
+ this.serviceimpl = serviceimpl;
+ this.setComponentProperty(MODULEREF_KEY, new ArrayList());
+ this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
+ this.setServiceInterface(new WSDLInterfaceImpl());
+ }
+
public ServiceDescription() {
+ this.serviceimpl = new WSDLServiceImpl();
this.setComponentProperty(MODULEREF_KEY, new ArrayList());
this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
this.setServiceInterface(new WSDLInterfaceImpl());
@@ -650,4 +659,75 @@
this.fileName = fileName;
}
+ public HashMap getEndpoints() {
+ return serviceimpl.getEndpoints();
+ }
+
+ public void setEndpoints(HashMap endpoints) {
+ serviceimpl.setEndpoints(endpoints);
+ }
+
+ public void setEndpoint(WSDLEndpoint endpoint){
+ serviceimpl.setEndpoint(endpoint);
+ }
+
+ public WSDLEndpoint getEndpoint(QName qName) {
+ return serviceimpl.getEndpoint(qName);
+ }
+
+ public QName getName() {
+ return serviceimpl.getName();
+ }
+
+ public void setName(QName name) {
+ serviceimpl.setName(name);
+ }
+
+ public String getNamespace() {
+ return serviceimpl.getNamespace();
+ }
+
+ public WSDLInterface getServiceInterface() {
+ return serviceimpl.getServiceInterface();
+ }
+
+ public void setServiceInterface(WSDLInterface serviceInterface) {
+ serviceimpl.setServiceInterface(serviceInterface);
+ }
+
+ public HashMap getComponentProperties() {
+ return serviceimpl.getComponentProperties();
+ }
+
+ public void setComponentProperties(HashMap properties) {
+ serviceimpl.setComponentProperties(properties);
+ }
+
+ public void setComponentProperty(Object key, Object obj) {
+ serviceimpl.setComponentProperty(key,obj);
+ }
+
+ public Object getComponentProperty(Object key) {
+ return serviceimpl.getComponentProperty(key);
+ }
+
+ public void addExtensibilityElement(WSDLExtensibilityElement element) {
+ serviceimpl.addExtensibilityElement(element);
+ }
+
+ public List getExtensibilityElements() {
+ return serviceimpl.getExtensibilityElements();
+ }
+
+ public List getExtensibilityAttributes() {
+ return serviceimpl.getExtensibilityAttributes();
+ }
+
+ public void addExtensibleAttributes(WSDLExtensibilityAttribute attribute) {
+ serviceimpl.addExtensibleAttributes(attribute);
+ }
+
+ public Map getMetadataBag() {
+ return serviceimpl.getMetadataBag();
+ }
}