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 pr...@apache.org on 2007/06/10 13:42:22 UTC
svn commit: r545866 [4/7] - in /webservices/axis2/branches/java/jaxws21:
modules/adb-codegen/src/org/apache/axis2/schema/
modules/adb/src/org/apache/axis2/databinding/types/
modules/adb/src/org/apache/axis2/databinding/utils/
modules/adb/src/org/apache...
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Sun Jun 10 04:42:12 2007
@@ -150,14 +150,6 @@
serviceGroupContext = cfgCtx.createServiceGroupContext(axisServiceGroup);
applicationSessionServiceGroupContexts
.put(serviceGroupName, serviceGroupContext);
-
- ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
- if (clusterManager != null) {
- ContextManager contextManager = clusterManager.getContextManager();
- if (contextManager != null) {
- contextManager.addContext(serviceGroupContext);
- }
- }
}
messageContext.setServiceGroupContext(serviceGroupContext);
messageContext.setServiceContext(serviceGroupContext.getServiceContext(axisService));
@@ -174,7 +166,7 @@
serviceGroupContext = new ServiceGroupContext(this,
(AxisServiceGroup) axisService.getParent());
serviceGroupContext.setId(serviceGroupContextId);
- registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
+ addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
// throw new AxisFault("Unable to find corresponding context" +
// " for the serviceGroupId: " + serviceGroupContextId);
}
@@ -185,16 +177,8 @@
// set the serviceGroupContextID
serviceGroupContextId = UUIDGenerator.getUUID();
serviceGroupContext.setId(serviceGroupContextId);
-
- ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
- if (clusterManager != null) {
- ContextManager contextManager = clusterManager.getContextManager();
- if (contextManager != null) {
- contextManager.addContext(serviceGroupContext);
- }
- }
messageContext.setServiceGroupContextId(serviceGroupContextId);
- registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
+ addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
}
messageContext.setServiceGroupContext(serviceGroupContext);
messageContext.setServiceContext(serviceGroupContext.getServiceContext(axisService));
@@ -244,8 +228,7 @@
}
}
- public void registerServiceGroupContextintoSoapSessionTable(
- ServiceGroupContext serviceGroupContext) {
+ public void addServiceGroupContextIntoSoapSessionTable(ServiceGroupContext serviceGroupContext) {
String id = serviceGroupContext.getId();
serviceGroupContextMap.put(id, serviceGroupContext);
serviceGroupContext.touch();
@@ -254,8 +237,7 @@
cleanupServiceGroupContexts();
}
- public void addServiceGroupContextintoApplicatoionScopeTable(
- ServiceGroupContext serviceGroupContext) {
+ public void addServiceGroupContextIntoApplicationScopeTable(ServiceGroupContext serviceGroupContext) {
if (applicationSessionServiceGroupContexts == null) {
applicationSessionServiceGroupContexts = new Hashtable();
}
@@ -338,45 +320,13 @@
return null;
}
- protected ArrayList contextListeners;
-
- /**
- * Register a ContextListener to be notified of all sub-context creation events.
- * Note that we currently only support a single listener.
- *
- * @param contextListener a ContextListener
- */
- public void registerContextListener(ContextListener contextListener) {
- if (contextListeners == null) {
- contextListeners = new ArrayList();
- }
- contextListeners.add(contextListener);
- }
-
- /**
- * Inform any listeners of a new context
- *
- * @param context the just-created subcontext
- */
- void contextCreated(AbstractContext context) {
- if (contextListeners == null) {
- return;
- }
- for (Iterator i = contextListeners.iterator(); i.hasNext();) {
- ContextListener listener = (ContextListener) i.next();
- listener.contextCreated(context);
- }
- }
-
/**
* Create a MessageContext, and notify any registered ContextListener.
*
* @return a new MessageContext
*/
public MessageContext createMessageContext() {
- MessageContext msgCtx = new MessageContext(this);
- contextCreated(msgCtx);
- return msgCtx;
+ return new MessageContext(this);
}
/**
@@ -387,9 +337,7 @@
* @return a new ServiceGroupContext
*/
public ServiceGroupContext createServiceGroupContext(AxisServiceGroup serviceGroup) {
- ServiceGroupContext sgCtx = new ServiceGroupContext(this, serviceGroup);
- contextCreated(sgCtx);
- return sgCtx;
+ return new ServiceGroupContext(this, serviceGroup);
}
/**
@@ -457,7 +405,27 @@
*
* @return Returns hashmap of ServiceGroupContexts.
*/
- public Hashtable getServiceGroupContexts() {
+ public String[] getServiceGroupContextIDs() {
+ String[] ids = new String[serviceGroupContextMap.size() +
+ applicationSessionServiceGroupContexts.size()];
+ int index =0;
+ for (Iterator iter = serviceGroupContextMap.keySet().iterator(); iter.hasNext();) {
+ ids[index] = (String)iter.next();
+ index ++;
+ }
+ for (Iterator iter = applicationSessionServiceGroupContexts.keySet().iterator();
+ iter.hasNext();) {
+ ids[index] = (String)iter.next();
+ index ++;
+ }
+ return ids;
+ }
+
+ /**
+ * @deprecated Use {@link #getServiceGroupContextIDs} & {@link #getServiceGroupContext(String)}
+ * @return The ServiceGroupContexts
+ */
+ public Hashtable getServiceGroupContexts(){
return serviceGroupContextMap;
}
@@ -557,8 +525,7 @@
}
}
- public void terminate()
- throws AxisFault {
+ public void terminate() throws AxisFault {
if (listenerManager != null) {
listenerManager.stop();
}
@@ -643,13 +610,10 @@
serviceGroupContextMap.remove(s);
}
}
-
}
}
public ConfigurationContext getRootContext() {
return this;
}
-
-
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java Sun Jun 10 04:42:12 2007
@@ -87,7 +87,7 @@
if (Constants.SCOPE_APPLICATION.equals(maxScope)) {
ServiceGroupContext serviceGroupContext =
configCtx.createServiceGroupContext(axisServiceGroup);
- configCtx.addServiceGroupContextintoApplicatoionScopeTable(serviceGroupContext);
+ configCtx.addServiceGroupContextIntoApplicationScopeTable(serviceGroupContext);
DependencyManager.initService(serviceGroupContext);
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceContext.java Sun Jun 10 04:42:12 2007
@@ -157,7 +157,6 @@
public OperationContext createOperationContext(AxisOperation axisOp) {
OperationContext ctx = new OperationContext(axisOp, this);
- configContext.contextCreated(ctx);
return ctx;
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java Sun Jun 10 04:42:12 2007
@@ -19,8 +19,6 @@
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axis2.AxisFault;
-import org.apache.axis2.clustering.ClusterManager;
-import org.apache.axis2.clustering.context.ContextManager;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.AxisServiceGroup;
import org.apache.axis2.engine.AxisConfiguration;
@@ -132,18 +130,6 @@
* @throws AxisFault if something goes wrong
*/
public ServiceContext getServiceContext(AxisService service) throws AxisFault {
- return getServiceContext(service, true);
- }
-
- /**
- * @param service
- * @param replicate Indicates whether the newly created ServiceContext
- * has to be replicated across the cluster
- * @return
- * @throws AxisFault
- */
- public ServiceContext getServiceContext(AxisService service,
- boolean replicate) throws AxisFault {
AxisService axisService = axisServiceGroup.getService(service.getName());
if (axisService == null) {
throw new AxisFault(Messages.getMessage("invalidserviceinagroup",
@@ -156,19 +142,7 @@
ServiceContext serviceContext = (ServiceContext) serviceContextMap.get(service.getName());
if (serviceContext == null) {
serviceContext = new ServiceContext(service, this);
- getRootContext().contextCreated(serviceContext);
serviceContextMap.put(service.getName(), serviceContext);
-
- if (replicate) {
- ClusterManager clusterManager =
- axisService.getAxisConfiguration().getClusterManager();
- if (clusterManager != null) {
- ContextManager contextManager = clusterManager.getContextManager();
- if (contextManager != null) {
- contextManager.addContext(serviceContext);
- }
- }
- }
}
return serviceContext;
}
@@ -492,7 +466,7 @@
this.setParent(cc);
// register with the parent
- cc.registerServiceGroupContextintoSoapSessionTable(this);
+ cc.addServiceGroupContextIntoSoapSessionTable(this);
//-------------------------------------------------------
// done, reset the flag
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java Sun Jun 10 04:42:12 2007
@@ -19,7 +19,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisService2OM;
+import org.apache.axis2.description.AxisService2WSDL11;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -118,17 +118,11 @@
throw new DataRetrievalException("MessageContext was not set!");
}
- AxisService2OM axisService2WOM;
+ AxisService2WSDL11 axisService2WOM;
OMElement wsdlElement;
try {
- String[] exposedEPRs = theService.getEPRs();
- if (exposedEPRs == null) {
- exposedEPRs = new String[]{theService.getEndpointName()};
- }
- axisService2WOM = new AxisService2OM(theService,
- exposedEPRs, "document", "literal",
- "");
+ axisService2WOM = new AxisService2WSDL11(theService);
wsdlElement = axisService2WOM.generateOM();
}
catch (Exception e) {
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java Sun Jun 10 04:42:12 2007
@@ -17,7 +17,6 @@
package org.apache.axis2.deployment;
import org.apache.axiom.attachments.utils.IOUtils;
-import org.apache.axis2.deployment.util.Utils;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -72,7 +71,7 @@
try {
clazz = super.findClass(name);
} catch (ClassNotFoundException e) {
- byte raw[];
+ byte raw[] = null;
try {
String completeFileName = name;
/**
@@ -80,12 +79,11 @@
*/
completeFileName = completeFileName.replace('.', '/').concat(".class");
raw = getBytes(completeFileName);
- if (raw == null) {
- throw new ClassNotFoundException("Class Not found : " + name);
- }
} catch (Exception ex) {
- // TODO: This, or throw new ClassNotFoundException?
- throw new RuntimeException(ex);
+ // Fall through
+ }
+ if (raw == null) {
+ throw new ClassNotFoundException("Class Not found : " + name);
}
clazz = defineClass(name, raw, 0, raw.length);
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Sun Jun 10 04:42:12 2007
@@ -58,6 +58,7 @@
DeploymentEngine.webLocationString = webLocationString;
}
+
/**
* Support for hot update is controlled by this flag
*/
@@ -434,9 +435,9 @@
fillServiceGroup(serviceGroup, serviceList, serviceLocation, axisConfiguration);
axisConfiguration.addServiceGroup(serviceGroup);
if (currentDeploymentFile != null) {
- addAsWebResources(currentDeploymentFile.getFile(),
- serviceGroup.getServiceGroupName(), serviceGroup);
- }
+ addAsWebResources(currentDeploymentFile.getFile(),
+ serviceGroup.getServiceGroupName(), serviceGroup);
+ }
}
protected static void fillServiceGroup(AxisServiceGroup serviceGroup,
@@ -509,51 +510,6 @@
}
}
- private static void addAsWebResources(File in,
- String serviceFileName,
- AxisServiceGroup serviceGroup) {
- try {
- if (webLocationString == null) {
- return;
- }
- if (in.isDirectory()) {
- return;
- }
- File webLocation = new File(webLocationString);
- File out = new File(webLocation, serviceFileName);
- int BUFFER = 1024;
- byte data[] = new byte[BUFFER];
- FileInputStream fin = new FileInputStream(in);
- ZipInputStream zin = new ZipInputStream(
- fin);
- ZipEntry entry;
- while ((entry = zin.getNextEntry()) != null) {
- ZipEntry zip = new ZipEntry(entry);
- if (zip.getName().toUpperCase().startsWith("WWW")) {
- String fileName = zip.getName();
- fileName = fileName.substring("WWW/".length(),
- fileName.length());
- if (zip.isDirectory()) {
- new File(out, fileName).mkdirs();
- } else {
- FileOutputStream tempOut = new FileOutputStream(new File(out, fileName));
- int count;
- while ((count = zin.read(data, 0, BUFFER)) != -1) {
- tempOut.write(data, 0, count);
- }
- tempOut.close();
- tempOut.flush();
- }
- serviceGroup.setFoundWebResources(true);
- }
- }
- zin.close();
- fin.close();
- } catch (IOException e) {
- log.info(e.getMessage());
- }
- }
-
/**
* @param file ArchiveFileData
*/
@@ -709,6 +665,55 @@
return hotUpdate;
}
+ private static void addAsWebResources(File in,
+ String serviceFileName,
+ AxisServiceGroup serviceGroup) {
+ try {
+ if (webLocationString == null) {
+ return;
+ }
+ if (in.isDirectory()) {
+ return;
+ }
+ File webLocation = new File(webLocationString);
+ File out = new File(webLocation, serviceFileName);
+ int BUFFER = 1024;
+ byte data[] = new byte[BUFFER];
+ FileInputStream fin = new FileInputStream(in);
+ ZipInputStream zin = new ZipInputStream(
+ fin);
+ ZipEntry entry;
+ while ((entry = zin.getNextEntry()) != null) {
+ ZipEntry zip = new ZipEntry(entry);
+ if (zip.getName().toUpperCase().startsWith("WWW")) {
+ String fileName = zip.getName();
+ fileName = fileName.substring("WWW/".length(),
+ fileName.length());
+ if (zip.isDirectory()) {
+ new File(out, fileName).mkdirs();
+ } else {
+ FileOutputStream tempOut = new FileOutputStream(new File(out, fileName));
+ int count;
+ while ((count = zin.read(data, 0, BUFFER)) != -1) {
+ tempOut.write(data, 0, count);
+ }
+ tempOut.close();
+ tempOut.flush();
+ }
+ serviceGroup.setFoundWebResources(true);
+ }
+ }
+ zin.close();
+ fin.close();
+ } catch (IOException e) {
+ log.info(e.getMessage());
+ }
+ }
+
+ public String getWebLocationString() {
+ return webLocationString;
+ }
+
/**
* To set the all the classLoader hierarchy this method can be used , the top most parent is
* CCL then SCL(system Class Loader)
@@ -848,10 +853,6 @@
}
}
return fileList;
- }
-
- public String getWebLocationString() {
- return webLocationString;
}
public void setConfigContext(ConfigurationContext configContext) {
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java Sun Jun 10 04:42:12 2007
@@ -281,7 +281,7 @@
// processing <wsp:PolicyReference> .. </..> elements
Iterator policyRefElements = operation.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY_REF));
- if (policyRefElements != null && policyRefElements.hasNext()) {
+ if (policyRefElements != null && policyElements.hasNext()) {
processPolicyRefElements(PolicyInclude.AXIS_MODULE_OPERATION_POLICY, policyRefElements, module.getPolicyInclude());
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java Sun Jun 10 04:42:12 2007
@@ -7,6 +7,7 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.AxisServiceGroup;
import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.description.java2wsdl.AnnotationConstants;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.util.Loader;
import org.apache.axis2.wsdl.WSDLConstants;
@@ -15,7 +16,6 @@
import org.apache.axis2.i18n.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ws.java2wsdl.AnnotationConstants;
import org.codehaus.jam.JAnnotation;
import org.codehaus.jam.JClass;
import org.codehaus.jam.JamClassIterator;
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java Sun Jun 10 04:42:12 2007
@@ -20,6 +20,8 @@
import org.apache.axis2.deployment.repository.util.DeploymentFileData;
import org.apache.axis2.deployment.repository.util.WSInfoList;
import org.apache.axis2.util.Loader;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import java.io.File;
import java.io.OutputStreamWriter;
@@ -27,19 +29,19 @@
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLDecoder;
+import java.net.URI;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Enumeration;
public class RepositoryListener implements DeploymentConstants {
+ protected static final Log log = LogFactory.getLog(RepositoryListener.class);
+
static String defaultEncoding = new OutputStreamWriter(System.out).getEncoding();
protected DeploymentEngine deploymentEngine;
private HashMap directoryToExtensionMappingMap;
- /**
- * The parent directory of the modules and services directories
- */
-
/** Reference to a WSInfoList */
protected WSInfoList wsInfoList;
@@ -100,6 +102,32 @@
}
protected void loadClassPathModules() {
+ ModuleDeployer deployer = deploymentEngine.getModuleDeployer();
+
+ /* WORKING (Glen)
+ // Find Modules on the class path (i.e. if classpath includes "addressing.mar" then
+ // addressing will be available for engaging)
+
+ // TODO: Confirm correct class loader
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ try {
+ Enumeration moduleURLs = loader.getResources("META-INF/module.xml");
+ while (moduleURLs.hasMoreElements()) {
+ URL url = (URL)moduleURLs.nextElement();
+ String fileName = url.toString();
+ fileName = fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml"));
+ System.out.println(fileName);
+ File f = new File(new URI(fileName));
+ System.out.println(f.getAbsolutePath());
+ addFileToDeploy(f, deployer);
+ }
+ } catch (Exception e) {
+ // Oh well, log the problem
+ log.error(e);
+ }
+
+ */
+
String classPath = getLocation();
if (classPath == null) return;
@@ -118,7 +146,7 @@
if (!file.isDirectory()) {
if (DeploymentFileData.isModuleArchiveFile(file.getName())) {
//adding modules in the class path
- addFileToDeploy(file, deploymentEngine.getModuleDeployer());
+ addFileToDeploy(file, deployer);
}
}
}
@@ -143,7 +171,7 @@
if (file.isFile()) {
if (DeploymentFileData.isModuleArchiveFile(file.getName())) {
//adding modules in the class path
- addFileToDeploy(file, deploymentEngine.getModuleDeployer());
+ addFileToDeploy(file, deployer);
}
}
}
@@ -280,7 +308,6 @@
}
public void updateRemote() throws Exception {
-
findServicesInDirectory();
update();
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Sun Jun 10 04:42:12 2007
@@ -33,6 +33,8 @@
import org.apache.axis2.description.ParameterInclude;
import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
+import org.apache.axis2.description.java2wsdl.TypeTable;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.engine.ObjectSupplier;
import org.apache.axis2.engine.ServiceLifeCycle;
@@ -41,8 +43,6 @@
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ws.java2wsdl.Java2WSDLConstants;
-import org.apache.ws.java2wsdl.utils.TypeTable;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
@@ -183,7 +183,7 @@
if (schemaNameSpace != null) {
String nameSpeceVale = schemaNameSpace.getAttributeValue();
if (nameSpeceVale != null && !"".equals(nameSpeceVale)) {
- service.setSchematargetNamespace(nameSpeceVale);
+ service.setSchemaTargetNamespace(nameSpeceVale);
}
}
OMAttribute elementFormDefault = schemaElement.
@@ -252,7 +252,7 @@
if (excludeops == null) {
excludeops = new ArrayList();
}
- Utils.addExclueMethods(excludeops);
+ Utils.addExcludeMethods(excludeops);
//<schema targetNamespace="http://x.y.z"/>
// setting the PolicyInclude
@@ -338,7 +338,7 @@
if (generateWsdl(service)) {
Utils.fillAxisService(service, axisConfig, excludeops, null);
} else {
- ArrayList nonRpcOperations = getNonPRCMethods(service);
+ ArrayList nonRpcOperations = getNonRPCMethods(service);
Utils.fillAxisService(service, axisConfig, excludeops,
nonRpcOperations);
}
@@ -497,7 +497,7 @@
*
* @return ArrayList
*/
- private ArrayList getNonPRCMethods(AxisService axisService) {
+ private ArrayList getNonRPCMethods(AxisService axisService) {
ArrayList excludeOperations = new ArrayList();
Iterator operatins = axisService.getOperations();
if (operatins.hasNext()) {
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml Sun Jun 10 04:42:12 2007
@@ -182,6 +182,7 @@
<order phase="Dispatch"/>
</handler>
</phase>
+ <phase name="RMPhase"/>
<!-- System pre defined phases -->
<!-- After Postdispatch phase module author or or service author can add any phase he want -->
<phase name="OperationInPhase"/>
@@ -191,6 +192,7 @@
<phase name="OperationOutPhase"/>
<!--system predefined phase-->
<!--these phase will run irrespective of the service-->
+ <phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phase name="Security"/>
@@ -227,12 +229,14 @@
<order phase="Dispatch"/>
</handler>
</phase>
+ <phase name="RMPhase"/>
<!-- user can add his own phases to this area -->
<phase name="OperationInFaultPhase"/>
</phaseOrder>
<phaseOrder type="OutFaultFlow">
<!-- user can add his own phases to this area -->
<phase name="OperationOutFaultPhase"/>
+ <phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
</phaseOrder>
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Sun Jun 10 04:42:12 2007
@@ -312,7 +312,7 @@
OMNamespace documentElementNS =
((OMElement) XMLUtils.toOM(in)).getNamespace();
if (documentElementNS != null) {
- WSDLToAxisServiceBuilder wsdlToAxisServiceBuilder = null;
+ WSDLToAxisServiceBuilder wsdlToAxisServiceBuilder;
if (WSDL2Constants.WSDL_NAMESPACE
.equals(documentElementNS.getNamespaceURI())) {
// we have a WSDL 2.0 document here.
@@ -397,7 +397,7 @@
File file1 = files[i];
if (file1.getName().toLowerCase().endsWith(SUFFIX_WSDL)) {
InputStream in = new FileInputStream(file1);
- FileInputStream in2 = null;
+ FileInputStream in2;
// now the question is which version of WSDL file this archive contains.
// lets check the namespace of the root element and decide. But since we are
@@ -405,7 +405,7 @@
// whole thing.
OMNamespace documentElementNS = ((OMElement) XMLUtils.toOM(in)).getNamespace();
if (documentElementNS != null) {
- WSDLToAxisServiceBuilder wsdlToAxisServiceBuilder = null;
+ WSDLToAxisServiceBuilder wsdlToAxisServiceBuilder;
if (WSDL2Constants.WSDL_NAMESPACE
.equals(documentElementNS.getNamespaceURI())) {
// we have a WSDL 2.0 document here.
@@ -423,9 +423,7 @@
AxisService service = processWSDLFile(wsdlToAxisServiceBuilder, file1, false,
in2, file1.toURI().toString());
try {
- if (in2 != null) {
- in2.close();
- }
+ in2.close();
in3.close();
} catch (IOException e) {
log.info(e);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Sun Jun 10 04:42:12 2007
@@ -6,7 +6,6 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.deployment.DeploymentConstants;
import org.apache.axis2.deployment.DeploymentException;
import org.apache.axis2.deployment.DeploymentClassLoader;
import org.apache.axis2.deployment.repository.util.ArchiveReader;
@@ -20,6 +19,11 @@
import org.apache.axis2.description.Flow;
import org.apache.axis2.description.HandlerDescription;
import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.java2wsdl.TypeTable;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
+import org.apache.axis2.description.java2wsdl.AnnotationConstants;
+import org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator;
+import org.apache.axis2.description.java2wsdl.SchemaGenerator;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.engine.MessageReceiver;
@@ -28,10 +32,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ws.commons.schema.utils.NamespaceMap;
-import org.apache.ws.java2wsdl.AnnotationConstants;
-import org.apache.ws.java2wsdl.Java2WSDLConstants;
-import org.apache.ws.java2wsdl.SchemaGenerator;
-import org.apache.ws.java2wsdl.utils.TypeTable;
import org.codehaus.jam.JAnnotation;
import org.codehaus.jam.JMethod;
import org.codehaus.jam.JClass;
@@ -48,7 +48,6 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
-import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -190,16 +189,39 @@
return getClassLoader(parent, new File(path));
}
+ /**
+ * Get a ClassLoader which contains a classpath of a) the passed directory and b) any jar
+ * files inside the "lib/" or "Lib/" subdirectory of the passed directory.
+ *
+ * @param parent parent ClassLoader which will be the parent of the result of this method
+ * @param file a File which must be a directory for this to be useful
+ * @return a new ClassLoader pointing to both the passed dir and jar files under lib/
+ * @throws DeploymentException if problems occur
+ */
public static ClassLoader getClassLoader(ClassLoader parent, File file)
throws DeploymentException {
URLClassLoader classLoader;
- if (file != null) {
- try {
- ArrayList urls = new ArrayList();
- urls.add(file.toURL());
- // lower case directory name
- File libfiles = new File(file, "lib");
+ if (file == null) return null; // Shouldn't this just return the parent?
+
+ try {
+ ArrayList urls = new ArrayList();
+ urls.add(file.toURL());
+
+ // lower case directory name
+ File libfiles = new File(file, "lib");
+ if (libfiles.exists()) {
+ urls.add(libfiles.toURL());
+ File jarfiles[] = libfiles.listFiles();
+ for (int i = 0; i < jarfiles.length; i++) {
+ File jarfile = jarfiles[i];
+ if (jarfile.getName().endsWith(".jar")) {
+ urls.add(jarfile.toURL());
+ }
+ }
+ } else {
+ // upper case directory name
+ libfiles = new File(file, "Lib");
if (libfiles.exists()) {
urls.add(libfiles.toURL());
File jarfiles[] = libfiles.listFiles();
@@ -209,33 +231,18 @@
urls.add(jarfile.toURL());
}
}
- } else {
- // upper case directory name
- libfiles = new File(file, "Lib");
- if (libfiles.exists()) {
- urls.add(libfiles.toURL());
- File jarfiles[] = libfiles.listFiles();
- for (int i = 0; i < jarfiles.length; i++) {
- File jarfile = jarfiles[i];
- if (jarfile.getName().endsWith(".jar")) {
- urls.add(jarfile.toURL());
- }
- }
- }
- }
-
- URL urllist[] = new URL[urls.size()];
- for (int i = 0; i < urls.size(); i++) {
- urllist[i] = (URL) urls.get(i);
}
- classLoader = new URLClassLoader(urllist, parent);
- return classLoader;
- } catch (MalformedURLException e) {
- throw new DeploymentException(e);
}
- }
- return null;
+ URL urllist[] = new URL[urls.size()];
+ for (int i = 0; i < urls.size(); i++) {
+ urllist[i] = (URL) urls.get(i);
+ }
+ classLoader = new URLClassLoader(urllist, parent);
+ return classLoader;
+ } catch (MalformedURLException e) {
+ throw new DeploymentException(e);
+ }
}
private static Class getHandlerClass(String className, ClassLoader loader1) throws AxisFault {
@@ -303,10 +310,10 @@
map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
Java2WSDLConstants.URI_2001_SCHEMA_XSD);
axisService.setNameSpacesMap(map);
- SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
+ SchemaGenerator schemaGenerator = new DefaultSchemaGenerator(serviceClassLoader,
serviceClass.trim(),
axisService.getSchematargetNamespace(),
- axisService.getSchematargetNamespacePrefix());
+ axisService.getSchemaTargetNamespacePrefix());
schemaGenerator.setExcludeMethods(excludeOperations);
schemaGenerator.setNonRpcMethods(nonRpcMethods);
if (!axisService.isElementFormDefault()) {
@@ -316,7 +323,7 @@
schemaGenerator.setPkg2nsmap(axisService.getP2nMap());
Collection schemas = schemaGenerator.generateSchema();
axisService.addSchema(schemas);
- axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
+ axisService.setSchemaTargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
axisService.setTypeTable(schemaGenerator.getTypeTable());
if (Java2WSDLConstants.DEFAULT_TARGET_NAMESPACE.equals(
axisService.getTargetNamespace())) {
@@ -330,19 +337,6 @@
for (int i = 0; i < method.length; i++) {
JMethod jmethod = method[i];
- JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
- if (methodAnnon != null) {
- if (methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean()) {
- continue;
- }
- }
- if (!jmethod.isPublic()) {
- // no need to expose , private and protected methods
- continue;
- }
- if (excludeOperations != null && excludeOperations.contains(jmethod.getSimpleName())) {
- continue;
- }
String opName = jmethod.getSimpleName();
AxisOperation operation = axisService.getOperation(new QName(opName));
// if the operation there in services.xml then try to set it schema element name
@@ -668,7 +662,7 @@
* To add the exclude method when generating scheams , here the exclude methods
* will be session releated axis2 methods
*/
- public static void addExclueMethods(ArrayList excludeList){
+ public static void addExcludeMethods(ArrayList excludeList){
excludeList.add("init");
excludeList.add("setOperationContext");
excludeList.add("startUp");
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBinding.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBinding.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBinding.java Sun Jun 10 04:42:12 2007
@@ -130,6 +130,8 @@
if (WSDL2Constants.URI_WSDL2_SOAP.equals(type) || Constants.URI_SOAP11_HTTP.equals(type) ||
Constants.URI_SOAP12_HTTP.equals(type)) {
// SOAP Binding specific properties
+ bindingElement.addAttribute(
+ omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_TYPE, null, WSDL2Constants.URI_WSDL2_SOAP));
property = (String) options.get(WSDL2Constants.ATTR_WSOAP_VERSION);
if (property != null) {
if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(property)) {
@@ -166,14 +168,11 @@
bindingElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_METHOD_DEFAULT, whttp, property));
}
+ bindingElement.addAttribute(
+ omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_TYPE, null, WSDL2Constants.URI_WSDL2_HTTP));
}
// Common Properties
- property = getType();
- if (property != null) {
- bindingElement.addAttribute(
- omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_TYPE, null, property));
- }
property = (String) options.get(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING);
if (property != null) {
bindingElement.addAttribute(omFactory.createOMAttribute(
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Sun Jun 10 04:42:12 2007
@@ -152,8 +152,6 @@
// Fault specific properties
SOAPFaultCode faultCode = (SOAPFaultCode) this.options
.get(WSDL2Constants.ATTR_WSOAP_CODE);
- property = (String) this.options
- .get(WSDL2Constants.ATTR_WSOAP_SUBCODES);
if (faultCode != null && faultCode.getQName() != null) {
bindingMessageElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_CODE, wsoap, faultCode.getQName().getLocalPart()));
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Sun Jun 10 04:42:12 2007
@@ -115,9 +115,17 @@
public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace whttp, String epr) {
String property;
+ String name;
+ if (epr.startsWith("https://")) {
+ // The reason to do this is to have camel case
+ String endpointName = this.getName();
+ name = WSDL2Constants.DEFAULT_HTTPS_PREFIX + endpointName.substring(0,1).toUpperCase() + endpointName.substring(1);
+ } else {
+ name = this.getName();
+ }
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMElement endpointElement = omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
- endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, this.getName()));
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, name));
endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.BINDING_LOCAL_NAME, null, tns.getPrefix() + ":" + getBinding().getName().getLocalPart()));
endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
HTTPAuthenticationScheme authenticationScheme = (HTTPAuthenticationScheme) this.options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Sun Jun 10 04:42:12 2007
@@ -46,6 +46,7 @@
import java.util.Iterator;
import java.util.Set;
import java.util.Map;
+import java.net.URI;
public abstract class AxisOperation extends AxisDescription
implements WSDLConstants {
@@ -417,7 +418,7 @@
* Further, in the first lookup, it will cache the looked
* up value so that the subsequent method calls are extremely efficient.
*/
- public int getAxisSpecifMEPConstant() {
+ public int getAxisSpecificMEPConstant() {
if (this.mep != WSDLConstants.MEP_CONSTANT_INVALID) {
return this.mep;
}
@@ -632,72 +633,5 @@
}
}
return false;
- }
-
- /**
- * Generates the interface Operation element. As with the binding operations we dont need to
- * ask AxisMessage to serialize its message cause AxisMessage does not have specific properties
- * as bindings.
- * @param tns - The targetnamespace
- * @param wsdlx - The WSDL extentions namespace (WSDL 2.0)
- * @return The generated binding element
- */
- public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsdlx) {
- OMFactory omFactory = OMAbstractFactory.getOMFactory();
- OMElement axisOperationElement =
- omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
- WSDLSerializationUtil.addWSDLDocumentationElement(this, axisOperationElement, omFactory, wsdl);
- axisOperationElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME,
- null,
- this.getName().getLocalPart()));
- axisOperationElement.addAttribute(omFactory.createOMAttribute(
- WSDL2Constants.ATTRIBUTE_NAME_PATTERN, null, this.getMessageExchangePattern()));
- Parameter param = this.getParameter(WSDL2Constants.ATTR_WSDLX_SAFE);
- if (param != null) {
- axisOperationElement.addAttribute(omFactory.createOMAttribute(
- WSDL2Constants.ATTRIBUTE_SAFE, wsdlx, (param.getValue()).toString()));
- }
- AxisService axisService = (AxisService) this.getParent();
- Map nameSpaceMap = axisService.getNameSpacesMap();
-
- // Add the input element
- AxisMessage inMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_IN_MESSAGE);
- if (inMessage != null) {
- OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, wsdl);
- inMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(inMessage, nameSpaceMap)));
- WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, getInputAction());
- WSDLSerializationUtil.addWSDLDocumentationElement(inMessage, inMessageElement, omFactory, wsdl);
- axisOperationElement.addChild(inMessageElement);
- }
-
- // Add the output element
- AxisMessage outMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_OUT_MESSAGE);
- if (outMessage != null) {
- OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, wsdl);
- outMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(outMessage, nameSpaceMap)));
- WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, getOutputAction());
- WSDLSerializationUtil.addWSDLDocumentationElement(outMessage, outMessageElement, omFactory, wsdl);
- axisOperationElement.addChild(outMessageElement);
- }
-
- // Add the fault element
- ArrayList faults = getFaultMessages();
- if (faults != null) {
- Iterator iterator = faults.iterator();
- while (iterator.hasNext()) {
- AxisMessage faultMessage = (AxisMessage) iterator.next();
- OMElement faultElement;
- if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(faultMessage.getDirection())) {
- faultElement = omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, wsdl);
- } else {
- faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, wsdl);
- }
- faultElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + faultMessage.getName()));
- WSDLSerializationUtil.addWSAWActionAttribute(faultElement, getFaultAction(faultMessage.getName()));
- WSDLSerializationUtil.addWSDLDocumentationElement(faultMessage, faultElement, omFactory, wsdl);
- axisOperationElement.addChild(faultElement);
- }
- }
- return axisOperationElement;
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java Sun Jun 10 04:42:12 2007
@@ -20,6 +20,10 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
+import org.apache.axis2.description.java2wsdl.TypeTable;
+import org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
+import org.apache.axis2.description.java2wsdl.SchemaGenerator;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
@@ -56,11 +60,6 @@
import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
import org.apache.ws.commons.schema.utils.NamespaceMap;
import org.apache.ws.commons.schema.utils.NamespacePrefixList;
-import org.apache.ws.java2wsdl.AnnotationConstants;
-import org.apache.ws.java2wsdl.Java2WSDLConstants;
-import org.apache.ws.java2wsdl.SchemaGenerator;
-import org.apache.ws.java2wsdl.utils.TypeTable;
-import org.codehaus.jam.JAnnotation;
import org.codehaus.jam.JMethod;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -239,6 +238,8 @@
// names list keep to preserve the parameter order
private List operationsNameList;
+ private String[] eprs = null;
+
public AxisEndpoint getEndpoint(String key) {
return (AxisEndpoint) endpointMap.get(key);
}
@@ -821,43 +822,22 @@
return null;
}
- /**
- * @param out
- * @param requestIP
- * @param servicePath
- * @throws AxisFault
- */
- public void printWSDL(OutputStream out, String requestIP, String servicePath) throws AxisFault {
- if (isUseUserWSDL()) {
- Parameter wsld4jdefinition = getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
- if (wsld4jdefinition != null) {
- try {
- Definition definition = (Definition) wsld4jdefinition.getValue();
- if (isModifyUserWSDLPortAddress()) {
- setPortAddress(definition);
- }
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
- writer.writeWSDL(definition, out);
- } catch (WSDLException e) {
- throw AxisFault.makeFault(e);
- }
- } else {
- printWSDLError(out);
- }
- } else {
- String[] eprArray = getEPRs(requestIP);
- getWSDL(out, eprArray);
- }
+ public void setEPRs(String[] eprs) {
+ this.eprs = eprs;
}
public String[] getEPRs() throws AxisFault {
+ if(eprs != null) {
+ return eprs;
+ }
String requestIP;
try {
requestIP = HttpUtils.getIpAddress();
} catch (SocketException e) {
throw new AxisFault("Cannot get local IP address", e);
}
- return getEPRs(requestIP);
+ eprs = getEPRs(requestIP);
+ return eprs;
}
private String[] getEPRs(String requestIP) {
@@ -919,14 +899,36 @@
return (String[]) eprList.toArray(new String[eprList.size()]);
}
+ private void printUserWSDL(OutputStream out) throws AxisFault {
+ Parameter wsld4jdefinition = getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
+ if (wsld4jdefinition != null) {
+ try {
+ Definition definition = (Definition) wsld4jdefinition.getValue();
+ if (isModifyUserWSDLPortAddress()) {
+ setPortAddress(definition);
+ }
+ WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+ writer.writeWSDL(definition, out);
+ } catch (WSDLException e) {
+ throw AxisFault.makeFault(e);
+ }
+ } else {
+ printWSDLError(out);
+ }
+ }
+
/**
* @param out
* @param requestIP
* @throws AxisFault
- * @deprecated try to use the method which takes three arguments
*/
public void printWSDL(OutputStream out, String requestIP) throws AxisFault {
- printWSDL(out, requestIP, "services");
+ if (isUseUserWSDL()) {
+ printUserWSDL(out);
+ } else {
+ String[] eprArray = getEPRs(requestIP);
+ getWSDL(out, eprArray);
+ }
}
/**
@@ -937,21 +939,7 @@
*/
public void printWSDL(OutputStream out) throws AxisFault {
if (isUseUserWSDL()) {
- Parameter wsld4jdefinition = getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
- if (wsld4jdefinition != null) {
- try {
- Definition definition = (Definition) wsld4jdefinition.getValue();
- if (isModifyUserWSDLPortAddress()) {
- setPortAddress(definition);
- }
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
- writer.writeWSDL(definition, out);
- } catch (WSDLException e) {
- throw AxisFault.makeFault(e);
- }
- } else {
- printWSDLError(out);
- }
+ printUserWSDL(out);
} else {
setWsdlFound(true);
//pick the endpointName and take it as the epr for the WSDL
@@ -1026,20 +1014,9 @@
//WSDL 2.0
public void printWSDL2(OutputStream out) throws AxisFault {
- // Woden has not implemented the serializer yet, so all we can do it serialize the axisService
- getWSDL2(out, new String[]{this.endpointName});
- }
-
- public void printWSDL2(OutputStream out,
- String requestIP,
- String servicePath) throws AxisFault {
- getWSDL2(out, getEPRs());
- }
-
- private void getWSDL2(OutputStream out, String[] serviceURL) throws AxisFault {
- AxisService2WSDL2 axisService2WSDL2 = new AxisService2WSDL2(this, serviceURL);
+ AxisService2WSDL20 axisService2WSDL2 = new AxisService2WSDL20(this);
try {
- OMElement wsdlElement = axisService2WSDL2.toWSDL20();
+ OMElement wsdlElement = axisService2WSDL2.generateOM();
wsdlElement.serialize(out);
out.flush();
out.close();
@@ -1057,12 +1034,6 @@
return getDocumentation();
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.axis2.description.AxisService#getClassLoader()
- */
-
/**
* Method getClassLoader.
*
@@ -1126,7 +1097,6 @@
* @return Returns AxisOperation.
*/
public AxisOperation getOperation(QName operationName) {
-// AxisOperation axisOperation = (AxisOperation) operations.get(operationName);
AxisOperation axisOperation = (AxisOperation) getChild(operationName);
if (axisOperation == null) {
@@ -1165,7 +1135,6 @@
return null;
}
-// AxisOperation operation = (AxisOperation) operations.get(new QName(soapAction));
AxisOperation operation = (AxisOperation) getChild(new QName(soapAction));
if (operation != null) {
@@ -1219,12 +1188,6 @@
setDocumentation(documentation);
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.axis2.description.AxisService#setClassLoader(java.lang.ClassLoader)
- */
-
/**
* Method setClassLoader.
*
@@ -1323,11 +1286,11 @@
return schematargetNamespace;
}
- public void setSchematargetNamespace(String schematargetNamespace) {
+ public void setSchemaTargetNamespace(String schematargetNamespace) {
this.schematargetNamespace = schematargetNamespace;
}
- public String getSchematargetNamespacePrefix() {
+ public String getSchemaTargetNamespacePrefix() {
return schematargetNamespacePrefix;
}
@@ -1563,17 +1526,6 @@
String targetNamespace,
String schemaNamespace,
ClassLoader loader) throws AxisFault {
- Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
- OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
- parameter.setParameterElement(paraElement);
- AxisService axisService = new AxisService();
- axisService.setUseDefaultChains(false);
- axisService.addParameter(parameter);
-
- if (schemaNamespace == null) {
- schemaNamespace = axisService.getSchematargetNamespace();
- }
-
int index = implClass.lastIndexOf(".");
String serviceName;
if (index > 0) {
@@ -1582,13 +1534,59 @@
serviceName = implClass;
}
- axisService.setName(serviceName);
- axisService.setClassLoader(loader);
-
- ClassLoader serviceClassLoader = axisService.getClassLoader();
SchemaGenerator schemaGenerator;
ArrayList excludeOpeartion = new ArrayList();
+ try {
+ schemaGenerator = new DefaultSchemaGenerator(loader,
+ implClass, schemaNamespace,
+ Java2WSDLConstants.SCHEMA_NAMESPACE_PRFIX);
+ schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
+ Utils.addExcludeMethods(excludeOpeartion);
+ schemaGenerator.setExcludeMethods(excludeOpeartion);
+ } catch (Exception e) {
+ throw AxisFault.makeFault(e);
+ }
+
+ return createService(implClass,
+ serviceName,
+ axisConfiguration,
+ messageReceiverClassMap,
+ targetNamespace,
+ loader,
+ schemaGenerator);
+ }
+ /**
+ * messageReceiverClassMap will hold the MessageReceivers for given meps. Key will be the
+ * mep and value will be the instance of the MessageReceiver class.
+ * Ex:
+ * Map mrMap = new HashMap();
+ * mrMap.put("http://www.w3.org/2004/08/wsdl/in-only",
+ * RPCInOnlyMessageReceiver.class.newInstance());
+ * mrMap.put("http://www.w3.org/2004/08/wsdl/in-out",
+ * RPCMessageReceiver.class.newInstance());
+ *
+ * @param implClass
+ * @param axisConfiguration
+ * @param messageReceiverClassMap
+ * @param targetNamespace
+ * @throws AxisFault
+ */
+ public static AxisService createService(String implClass,
+ String serviceName,
+ AxisConfiguration axisConfiguration,
+ Map messageReceiverClassMap,
+ String targetNamespace,
+ ClassLoader loader,
+ SchemaGenerator schemaGenerator) throws AxisFault {
+ Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
+ OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
+ parameter.setParameterElement(paraElement);
+ AxisService axisService = new AxisService();
+ axisService.setUseDefaultChains(false);
+ axisService.addParameter(parameter);
+ axisService.setName(serviceName);
+ axisService.setClassLoader(loader);
NamespaceMap map = new NamespaceMap();
map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
@@ -1596,28 +1594,20 @@
map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
Java2WSDLConstants.URI_2001_SCHEMA_XSD);
axisService.setNameSpacesMap(map);
-
-
+ axisService.setElementFormDefault(false);
try {
- schemaGenerator = new SchemaGenerator(serviceClassLoader,
- implClass, schemaNamespace,
- axisService.getSchematargetNamespacePrefix());
- schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
- axisService.setElementFormDefault(false);
- Utils.addExclueMethods(excludeOpeartion);
- schemaGenerator.setExcludeMethods(excludeOpeartion);
axisService.addSchema(schemaGenerator.generateSchema());
- axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
- axisService.setTypeTable(schemaGenerator.getTypeTable());
- if (targetNamespace == null) {
- targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
- }
- if (targetNamespace != null && !"".equals(targetNamespace)) {
- axisService.setTargetNamespace(targetNamespace);
- }
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
+ axisService.setSchemaTargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
+ axisService.setTypeTable(schemaGenerator.getTypeTable());
+ if (targetNamespace == null) {
+ targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
+ }
+ if (targetNamespace != null && !"".equals(targetNamespace)) {
+ axisService.setTargetNamespace(targetNamespace);
+ }
JMethod[] method = schemaGenerator.getMethods();
TypeTable table = schemaGenerator.getTypeTable();
@@ -1626,18 +1616,6 @@
for (int i = 0; i < method.length; i++) {
JMethod jmethod = method[i];
- JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
- if (methodAnnon != null) {
- if (methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean()) {
- continue;
- }
- }
- if (!jmethod.isPublic()) {
- // no need to expose , private and protected methods
- continue;
- } else if (excludeOpeartion.contains(jmethod.getSimpleName())) {
- continue;
- }
AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);
String mep = operation.getMessageExchangePattern();
MessageReceiver mr;
@@ -1744,15 +1722,15 @@
try {
- schemaGenerator = new SchemaGenerator(serviceClassLoader,
+ schemaGenerator = new DefaultSchemaGenerator(serviceClassLoader,
implClass, schemaNameSpace,
- axisService.getSchematargetNamespacePrefix());
+ axisService.getSchemaTargetNamespacePrefix());
schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
axisService.setElementFormDefault(false);
- Utils.addExclueMethods(excludeOpeartion);
+ Utils.addExcludeMethods(excludeOpeartion);
schemaGenerator.setExcludeMethods(excludeOpeartion);
axisService.addSchema(schemaGenerator.generateSchema());
- axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
+ axisService.setSchemaTargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
axisService.setTypeTable(schemaGenerator.getTypeTable());
if (targetNameSpace == null) {
targetNameSpace = schemaGenerator.getSchemaTargetNameSpace();
@@ -1771,18 +1749,6 @@
for (int i = 0; i < method.length; i++) {
JMethod jmethod = method[i];
- JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
- if (methodAnnon != null) {
- if (methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean()) {
- continue;
- }
- }
- if (!jmethod.isPublic()) {
- // no need to expose , private and protected methods
- continue;
- } else if (excludeOpeartion.contains(jmethod.getSimpleName())) {
- continue;
- }
AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);
// loading message receivers
@@ -2345,8 +2311,9 @@
// does exists means there are two or more operations which has the same input element (in doc/literal
// this is possible. In this case better to set it as null without giving
// a random operation.
- if (messageElementQNameToOperationMap.containsKey(messageElementQName)){
- messageElementQNameToOperationMap.put(messageElementQName,null);
+ if (messageElementQNameToOperationMap.containsKey(messageElementQName) &&
+ messageElementQNameToOperationMap.get(messageElementQName) != operation){
+ messageElementQNameToOperationMap.put(messageElementQName, null);
} else {
messageElementQNameToOperationMap.put(messageElementQName, operation);
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java Sun Jun 10 04:42:12 2007
@@ -30,6 +30,8 @@
public class AxisServiceGroup extends AxisDescription {
+ //to check whether user has put WWW dir or not
+ private boolean foundWebResources;
// to store module ref at deploy time parsing
private ArrayList modulesList = new ArrayList();
@@ -45,17 +47,7 @@
// to keep name of the service group
private String serviceGroupName;
- //to check whether user has put WWW dir or not
- private boolean foundWebResources;
-
- //To check whether server side service or client side service
-
- /**
- * Field services
- */
-// private HashMap services;
public AxisServiceGroup() {
-// services = new HashMap();
moduleConfigmap = new HashMap();
engagedModules = new ArrayList();
}
@@ -154,24 +146,10 @@
}
}
-// /**
-// * @deprecate Please use String version instead
-// * @param moduleName
-// */
-// public void addToengagedModules(String moduleName) {
-// }
-
public void addToengagedModules(String moduleName) {
engagedModules.add(moduleName);
}
-// /**
-// * @deprecate Please use String version instead
-// * @param moduleName
-// */
-// public void removeFromEngageList(QName moduleName) {
-// }
-
public void removeFromEngageList(String moduleName) {
engagedModules.remove(moduleName);
}
@@ -208,7 +186,6 @@
((AxisConfiguration) getParent()).notifyObservers(AxisEvent.SERVICE_REMOVE, service);
}
-// services.remove(name);
removeChild(name);
}
@@ -229,7 +206,6 @@
}
public AxisService getService(String name) throws AxisFault {
-// return (AxisService) services.get(name);
return (AxisService) getChild(name);
}
@@ -245,7 +221,6 @@
}
public Iterator getServices() {
-// return services.values().iterator();
return getChildren();
}
@@ -284,11 +259,11 @@
return false;
}
- public boolean isFoundWebResources() {
+ public boolean isFoundWebResources() {
return foundWebResources;
}
public void setFoundWebResources(boolean foundWebResources) {
this.foundWebResources = foundWebResources;
- }
+ }
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Sun Jun 10 04:42:12 2007
@@ -164,6 +164,9 @@
private static final String JAVAX_WSDL_VERBOSE_MODE_KEY = "javax.wsdl.verbose";
+ // As bindings are processed add it to this array so that we dont process the same binding twice
+ private Map processedBindings;
+
/**
* constructor taking in the service name and the port name
*
@@ -316,6 +319,8 @@
Port port;
AxisEndpoint axisEndpoint = null;
+ processedBindings = new HashMap();
+
// process the port type for this binding
// although we support multiports they must be belongs to same port type and should have the
// same soap style
@@ -367,14 +372,23 @@
copyExtensibleElements(wsdl4jPort.getExtensibilityElements(), wsdl4jDefinition,
axisEndpoint, BINDING);
- AxisBinding axisBinding = new AxisBinding();
+
Binding wsdl4jBinding = wsdl4jDefinition.getBinding(wsdl4jPort.getBinding().getQName());
- axisBinding.setName(wsdl4jBinding.getQName());
- axisBinding.setParent(axisEndpoint);
- axisEndpoint.setBinding(axisBinding);
addDocumentation(axisEndpoint, wsdl4jPort.getDocumentationElement());
- populateBinding(axisBinding, wsdl4jBinding, isSetMessageQNames);
+ if (processedBindings.containsKey(wsdl4jBinding.getQName())) {
+ axisEndpoint.setBinding(
+ (AxisBinding) processedBindings.get(wsdl4jBinding.getQName()));
+ } else {
+ AxisBinding axisBinding = new AxisBinding();
+ axisBinding.setName(wsdl4jBinding.getQName());
+ axisBinding.setParent(axisEndpoint);
+ axisEndpoint.setBinding(axisBinding);
+ axisEndpoint.setBinding(axisBinding);
+ populateBinding(axisBinding, wsdl4jBinding, isSetMessageQNames);
+ processedBindings.put(wsdl4jBinding.getQName(), axisBinding);
+ }
+
}
private void populatePortType(PortType wsdl4jPortType) throws AxisFault {
@@ -966,32 +980,6 @@
}
return null;
- }
-
- /**
- * Simply Copy information.
- *
- * @param wsdl4jPortType
- */
- // FIXME Evaluate a way of injecting features and priperties with a general
- // formatted input
- private void processPortType(PortType wsdl4jPortType, Definition dif)
- throws Exception {
-
- copyExtensionAttributes(wsdl4jPortType.getExtensionAttributes(),
- axisService, PORT_TYPE);
-
- // set port the type name
- axisService.setEndpointName(wsdl4jPortType.getQName().getLocalPart());
-
- Iterator wsdl4JOperationsIterator = wsdl4jPortType.getOperations()
- .iterator();
- Operation wsdl4jOperation;
- while (wsdl4JOperationsIterator.hasNext()) {
- wsdl4jOperation = (Operation) wsdl4JOperationsIterator.next();
- axisService.addOperation(populateOperations(wsdl4jOperation,
- wsdl4jPortType, dif));
- }
}
/**
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Sun Jun 10 04:42:12 2007
@@ -865,7 +865,13 @@
axisOperation.setName(opName);
}
-
+ URI[] operationStyle = operation.getStyle();
+ if (operationStyle != null && operationStyle.length > 0) {
+ Parameter opStyleParameter = new Parameter();
+ opStyleParameter.setName(WSDL2Constants.OPERATION_STYLE);
+ opStyleParameter.setValue(operationStyle);
+ axisOperation.addParameter(opStyleParameter);
+ }
addDocumentation(axisOperation, operation.toElement());
// assuming the style of the operations of WSDL 2.0 is always document, for the time being :)
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java Sun Jun 10 04:42:12 2007
@@ -36,6 +36,7 @@
String DEFAULT_SOAP11_ENDPOINT_NAME = "SOAP11Endpoint";
String DEFAULT_SOAP12_ENDPOINT_NAME = "SOAP12Endpoint";
String DEFAULT_HTTP_ENDPOINT_NAME = "HTTPEndpoint";
+ String DEFAULT_HTTPS_PREFIX = "Secure";
String DEFAULT_INTERFACE_NAME = "ServiceInterface";
String TYPES_LOCAL_NALE = "types";
String INTERFACE_LOCAL_NAME = "interface";
@@ -71,6 +72,8 @@
String ATTRIBUTE_ADDRESS = "address";
String ATTRIBUTE_AUTHENTICATION_TYPE = "authenticationType";
String ATTRIBUTE_AUTHENTICATION_REALM = "authenticationRealm";
+ String ATTRIBUTE_STYLE = "style";
+ String OPERATION_STYLE = "operationStyle";
String IN_PUT_LOCAL_NAME = "input";
String OUT_PUT_LOCAL_NAME = "output";
String OUT_FAULT_LOCAL_NAME = "outfault";
@@ -137,6 +140,10 @@
public String MEP_URI_ROBUST_OUT_ONLY = "http://www.w3.org/ns/wsdl/robust-out-only";
public String MEP_URI_OUT_IN = "http://www.w3.org/ns/wsdl/out-in";
public String MEP_URI_OUT_OPTIONAL_IN = "http://www.w3.org/ns/wsdl/out-opt-in";
+
+ public String STYLE_IRI = "http://www.w3.org/ns/wsdl/style/iri";
+ public String STYLE_RPC = "http://www.w3.org/ns/wsdl/style/rpc";
+ public String STYLE_MULTIPART = "http://www.w3.org/ns/wsdl/style/multipart";
public String NMTOKEN_ANY = "#any";
public String NMTOKEN_NONE = "#none";
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java Sun Jun 10 04:42:12 2007
@@ -26,6 +26,7 @@
import org.apache.axis2.deployment.repository.util.DeploymentFileData;
import org.apache.axis2.deployment.util.PhasesInfo;
import org.apache.axis2.description.*;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
import org.apache.axis2.i18n.Messages;
import org.apache.axis2.phaseresolver.PhaseResolver;
import org.apache.axis2.transport.MessageFormatter;
@@ -33,7 +34,6 @@
import org.apache.axis2.util.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ws.java2wsdl.Java2WSDLConstants;
import javax.xml.namespace.QName;
import java.net.URL;
@@ -279,7 +279,7 @@
axisService.getName()));
}
if (axisService.getSchematargetNamespace() == null) {
- axisService.setSchematargetNamespace(Java2WSDLConstants.AXIS2_XSD);
+ axisService.setSchemaTargetNamespace(Java2WSDLConstants.AXIS2_XSD);
}
}
services = axisServiceGroup.getServices();
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java Sun Jun 10 04:42:12 2007
@@ -43,7 +43,7 @@
private ConfigurationContext configctx;
private HashMap startedTransports = new HashMap();
- private boolean stopped = true;
+ private boolean stopped ;
public void init(ConfigurationContext configCtx) {
configCtx.setTransportManager(this);
@@ -134,7 +134,6 @@
log.info(e.getMessage());
}
}
- stopped = false;
Runtime.getRuntime().addShutdownHook(new ListenerManagerShutdownThread(this));
}
@@ -208,7 +207,6 @@
transportListener.init(configctx, trsIn);
transportListener.start();
}
- stopped = false;
startedTransports.put(trsIn.getName(), transportListener);
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java?view=diff&rev=545866&r1=545865&r2=545866
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java Sun Jun 10 04:42:12 2007
@@ -40,6 +40,7 @@
new AxisEngine(messageCtx.getOperationContext().getServiceContext()
.getConfigurationContext());
engine.send(result);
+ result.getTransportOut().getSender().cleanup(result);
}
public void handleFault(AxisFault fault) throws AxisFault {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org