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 sa...@apache.org on 2006/02/15 11:41:23 UTC
svn commit: r377984 - in
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl: ./
codegen/ codegen/emitter/ codegen/extension/ i18n/ template/java/ util/
Author: sanka
Date: Wed Feb 15 02:41:21 2006
New Revision: 377984
URL: http://svn.apache.org/viewcvs?rev=377984&view=rev
Log:
Fixed: Few defects in CodeGenPolicyExtension, PolicyExtension codes.
Added:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl
Modified:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/codegen-config.properties
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyExtension.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java Wed Feb 15 02:41:21 2006
@@ -49,6 +49,7 @@
System.out.println(CodegenMessages.getMessage("wsdl2code.arg12"));
System.out.println(CodegenMessages.getMessage("wsdl2code.arg13"));
System.out.println(CodegenMessages.getMessage("wsdl2code.arg14"));
+ System.out.println(CodegenMessages.getMessage("wsdl2code.arg15"));
System.exit(0);
}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java Wed Feb 15 02:41:21 2006
@@ -89,8 +89,10 @@
CommandLineOption serviceNameOption = loadOption(WSDL2JavaConstants.SERVICE_NAME_OPTION, WSDL2JavaConstants.SERVICE_NAME_OPTION_LONG,optionMap);
config.setServiceName(serviceNameOption!=null?serviceNameOption.getOptionValue():null);
-
-
+
+ CommandLineOption repositoryPathOption = loadOption(WSDL2JavaConstants.REPOSITORY_PATH_OPTION, WSDL2JavaConstants.REPOSITORY_PATH_OPTION_LONG, optionMap);
+ config.setRepositoryPath(repositoryPathOption != null ? repositoryPathOption.getOptionValue(): null);
+
CommandLineOption generateAllOption = loadOption(WSDL2JavaConstants.GENERATE_ALL_OPTION, WSDL2JavaConstants.GENERATE_ALL_OPTION_LONG,optionMap);
if (generateAllOption != null) {
config.setGenerateAll(true);
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/codegen-config.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/codegen-config.properties?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/codegen-config.properties (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/codegen-config.properties Wed Feb 15 02:41:21 2006
@@ -5,7 +5,7 @@
# these are loaded in their lexical order
# Note the last extension - It includes a check to figure out whether proper databinding has taken place
# This extension should appear AFTER all the databinding extensions inorder to function properly
-codegen.extension=org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension,org.apache.axis2.wsdl.codegen.extension.PackageFinder,org.apache.axis2.wsdl.codegen.extension.JaxMeExtension,org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension,org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension,org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension
+codegen.extension=org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension,org.apache.axis2.wsdl.codegen.extension.PackageFinder,org.apache.axis2.wsdl.codegen.extension.JaxMeExtension,org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension,org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension,org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension,org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator
#codegen.extension=org.apache.axis2.wsdl.codegen.extension.AxisBindingBuilder,org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension,org.apache.axis2.wsdl.codegen.extension.PackageFinder,org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension
# The third party schemas to be loaded. e.g. The Xmime extension
# Note - these will be loaded from the org.apache.axis2.wsdl.codegen.schema package.
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Wed Feb 15 02:41:21 2006
@@ -18,6 +18,21 @@
//~--- non-JDK imports --------------------------------------------------------
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.URIResolver;
+
import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.util.PolicyAttachmentUtil;
import org.apache.axis2.util.PolicyUtil;
@@ -59,29 +74,6 @@
import org.w3c.dom.Element;
import org.w3c.dom.Text;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
//~--- classes ----------------------------------------------------------------
public abstract class MultiLanguageClientEmitter implements Emitter {
@@ -458,8 +450,14 @@
// add the databind supporters. Now the databind supporters are completly contained inside
// the stubs implementation and not visible outside
rootElement.appendChild(createDOMElementforDatabinders(doc, binding));
- doc.appendChild(rootElement);
+ Object stubMethods;
+
+ if ((stubMethods = configuration.getProperty("stubMethods")) != null) {
+ rootElement.appendChild(doc.importNode((Element) stubMethods, true));
+ }
+
+ doc.appendChild(rootElement);
return doc;
}
@@ -645,9 +643,9 @@
// ///////////////////////
doc.appendChild(rootElement);
-
+
return doc;
- }
+ }
/**
* @see org.apache.axis2.wsdl.codegen.emitter.Emitter#emitSkeleton()
@@ -1255,23 +1253,6 @@
InterfaceImplementationWriter writer =
new InterfaceImplementationWriter(getOutputDirectory(this.configuration.getOutputLocation(), "src"),
this.configuration.getOutputLanguage());
- // TODO
- try {
- // Prepare the DOM document for writing
- Source source = new DOMSource(interfaceImplModel);
-
- // Prepare the output file
- File file = new File("/home/sanka/Desktop/test1.xml");
- Result result = new StreamResult(file);
-
- // Write the DOM document to the file
- Transformer xformer = TransformerFactory.newInstance().newTransformer();
- xformer.transform(source, result);
- } catch (TransformerConfigurationException e) {
- } catch (TransformerException e) {
- }
-
-
writeClass(interfaceImplModel, writer);
}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java Wed Feb 15 02:41:21 2006
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-
package org.apache.axis2.wsdl.codegen.extension;
import java.util.HashMap;
@@ -29,6 +28,7 @@
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.modules.Module;
import org.apache.axis2.util.PolicyAttachmentUtil;
import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
import org.apache.ws.policy.AndCompositeAssertion;
@@ -47,7 +47,7 @@
/**
*
* @author Sanka Samaranayake (sanka@apache.org)
- *
+ *
*/
public class PolicyEvaluator implements CodeGenExtension {
@@ -56,18 +56,24 @@
HashMap ns2modules = new HashMap();
PolicyAttachmentUtil util;
-
+
Element rootElement;
-
+
public PolicyEvaluator() {
}
public void init(CodeGenConfiguration configuration) {
this.configuration = configuration;
util = new PolicyAttachmentUtil(configuration.getWom());
-
+
String repository = configuration.getRepositoryPath();
- repository = "/home/sanka/jakarta-tomcat-4.1.30/webapps/axis2/WEB-INF"; // configuration.getRepository;
+
+ if (repository == null) {
+ System.err.println("Warning: repository is not specified");
+ System.err.println("policy will not be supported");
+ return;
+ }
+
try {
ConfigurationContext configurationCtx = ConfigurationContextFactory
@@ -80,44 +86,111 @@
AxisModule axisModule = (AxisModule) iterator.next();
String[] namespaces = axisModule.getSupportedPolicyNamespaces();
+ if (namespaces == null) {
+ continue;
+ }
+
for (int i = 0; i < namespaces.length; i++) {
ns2modules.put(namespaces[i], axisModule);
}
}
} catch (Exception e) {
+ e.printStackTrace();
System.err
- .println("cannot locate repository : policy will not be supported");
+ .println("cannot create repository : policy will not be supported");
}
+
+ //
+ configuration.putProperty("policyExtensionTemplate", "/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl");
}
public void engage() {
+ if (ns2modules.isEmpty()) {
+ System.err.println("Any policy supported module not found");
+ return;
+ }
WSDLDescription womDescription = configuration.getWom();
-
String serviceName = configuration.getServiceName();
- WSDLService wsdlService = womDescription.getService(new QName(
- serviceName));
- String port = configuration.getPortName();
- WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(new QName(port));
+ Document document = getEmptyDocument();
+ Element rootElement = document.createElement("stubMethods");
- WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
- WSDLInterface wsdlInterface = wsdlBinding.getBoundInterface();
-
- Element rootElement = getRootElement();
+ WSDLService wsdlService = null;
+ WSDLInterface wsdlInterface = null;
+
+ if (serviceName != null) {
+ wsdlService = womDescription.getService(new QName(serviceName));
+ } else {
+ for (Iterator iterator = womDescription.getServices().values()
+ .iterator(); iterator.hasNext();) {
+ wsdlService = (WSDLService) iterator.next();
+ serviceName = wsdlService.getName().getLocalPart();
+ configuration.setServiceName(serviceName);
+ break;
+ }
+ }
+
+ if (wsdlService != null) {
+
+ String port = configuration.getPortName();
+ WSDLEndpoint wsdlEndpoint = null;
- for (Iterator iterator = wsdlInterface.getOperations().values()
+ if (port == null) {
+ for (Iterator iterator = wsdlService.getEndpoints().values()
+ .iterator(); iterator.hasNext();) {
+ wsdlEndpoint = (WSDLEndpoint) iterator.next();
+ port = wsdlEndpoint.getName().getLocalPart();
+ configuration.setPortName(port);
+ break;
+
+ }
+ } else {
+ wsdlEndpoint = wsdlService.getEndpoint(new QName(port));
+ }
+ if (wsdlEndpoint == null) {
+ System.err.println("no wsdl:port found for the service");
+ return;
+ }
+
+ WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
+ wsdlInterface = wsdlBinding.getBoundInterface();
+
+ for (Iterator iterator = wsdlInterface.getOperations().values()
+ .iterator(); iterator.hasNext();) {
+ WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
+ Policy policy = util.getOperationPolicy(wsdlEndpoint.getName(),
+ wsdlOperation.getName());
+
+ if (policy != null) {
+ processPolicies(document, rootElement, policy,
+ wsdlEndpoint, wsdlOperation);
+ }
+ }
+
+ }
+
+ for (Iterator iterator = womDescription.getWsdlInterfaces().values()
.iterator(); iterator.hasNext();) {
- WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
- Policy policy = util.getOperationPolicy(wsdlEndpoint.getName(),
- wsdlOperation.getName());
-
- processPolicies(policy, wsdlEndpoint, wsdlOperation, rootElement);
+ wsdlInterface = (WSDLInterface) iterator.next();
+ break;
+ }
+
+ if (wsdlInterface == null) {
+ System.err.println("cannot find a wsdl:Service or a wsdl:portType");
+ // TODO exception ?
+ return;
}
+
+ // TODO wsdl:portType processing..
+
}
- private void processPolicies(Policy policy, WSDLEndpoint wsdlEndpoint,
- WSDLOperation operation, Element element) {
+ private void processPolicies(Document document, Element rootElement,
+ Policy policy, WSDLEndpoint wsdlEndpoint, WSDLOperation operation) {
+ if (!policy.isNormalized()) {
+ policy = (Policy) policy.normalize();
+ }
HashMap map = new HashMap();
@@ -132,6 +205,7 @@
PrimitiveAssertion pa = (PrimitiveAssertion) iterator.next();
String namespace = pa.getName().getNamespaceURI();
+ nAND.addTerm(pa);
while (iterator.hasNext()) {
pa = (PrimitiveAssertion) iterator.next();
@@ -143,6 +217,8 @@
map.put(namespace, nAND);
AND.getTerms().removeAll(nAND.getTerms());
+
+ iterator = AND.getTerms().iterator();
}
for (Iterator iterator = map.keySet().iterator(); iterator.hasNext();) {
@@ -154,15 +230,17 @@
+ namespace + "type assertions");
continue;
}
+
+ Module module = axisModule.getModule();
- if (!(axisModule instanceof CodeGenPolicyExtension)) {
+ if (!(module instanceof CodeGenPolicyExtension)) {
System.err
.println(axisModule.getName()
+ " module doesnt provde a PolicyExtension to process policies");
continue;
}
- PolicyExtension policyExtension = ((CodeGenPolicyExtension) axisModule)
+ PolicyExtension policyExtension = ((CodeGenPolicyExtension) module)
.getPolicyExtension();
Policy nPolicy = new Policy();
@@ -173,17 +251,12 @@
.get(namespace);
nXOR.addTerm(nAND);
- policyExtension.addMethodsToStub(nPolicy, element);
+ policyExtension.addMethodsToStub(document, rootElement, nPolicy);
}
- configuration.putProperty("stubMethods", element);
+ configuration.putProperty("stubMethods", rootElement);
}
- private Element getRootElement() {
- Document document = getEmptyDocument();
- return document.createElement("stubMethods");
- }
-
private Document getEmptyDocument() {
try {
DocumentBuilder documentBuilder = DocumentBuilderFactory
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyExtension.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyExtension.java Wed Feb 15 02:41:21 2006
@@ -17,6 +17,7 @@
package org.apache.axis2.wsdl.codegen.extension;
import org.apache.ws.policy.Policy;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
@@ -24,6 +25,6 @@
* @author Sanka Samaranayake (sanka@apache.org)
*/
public interface PolicyExtension {
- public void addMethodsToStub(Policy policy, Element element);
+ public void addMethodsToStub(Document document, Element element, Policy policy);
}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Wed Feb 15 02:41:21 2006
@@ -28,6 +28,7 @@
wsdl2code.arg12=-pn <port_name> : name of port in the presence of multiple ports
wsdl2code.arg13=-sn <service_name> : name of service in the presence of multiple services
wsdl2code.arg14=-u : unpacks the databinding classes
+wsdl2code.arg15=-r <repository_path> : path of the repository against which code is generated
################## prop file loader #################################
propfileload.frameworkMismatch=Number of frameworks and extension names do not match!
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Wed Feb 15 02:41:21 2006
@@ -8,6 +8,8 @@
URI resolver during the xslt transformations
-->
<xsl:include href="externalTemplate"/>
+
+ <xsl:include href="policyExtensionTemplate"/>
<xsl:template match="/class">
<xsl:variable name="interfaceName"><xsl:value-of select="@interfaceName"/></xsl:variable>
Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl?rev=377984&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/PolicyExtensionTemplate.xsl Wed Feb 15 02:41:21 2006
@@ -0,0 +1,34 @@
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="stubMethods">
+
+ <xsl:if test="//createSequence">
+ /**
+ * Starts a reliabel message sequence
+ */
+ public void startSequence() {
+ _getServiceClient().getOptions().setProperty("START_RM_SEQUENCE", "true");
+ }
+ </xsl:if>
+
+ <xsl:if test="//setLastMessage">
+ /**
+ * Marks the last message for the sequence
+ */
+ public void setLastMessage() {
+ _getServiceClient().getOptions().setProperty("Sandesha2ClientAPIPropertyWSRMLastMessage", "true");
+ }
+ </xsl:if>
+
+ <xsl:if test="//endSequence">
+ /**
+ * Terminates the reliabel message sequence
+ */
+ public void endSequence() {
+ _getServiceClient().getOptions().setProperty("END_RM_SEQUENCE", "true");
+ }
+ </xsl:if>
+
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java Wed Feb 15 02:41:21 2006
@@ -35,6 +35,8 @@
String GENERATE_ALL_OPTION = "g";
String PORT_NAME_OPTION = "pn";
String SERVICE_NAME_OPTION = "sn";
+ String REPOSITORY_PATH_OPTION = "r";
+
//long option constants
String OUTPUT_LOCATION_OPTION_LONG = "output";
String SERVER_SIDE_CODE_OPTION_LONG = "server-side";
@@ -51,6 +53,7 @@
String SERVICE_NAME_OPTION_LONG = "service-name";
String INVALID_OPTION = "INVALID_OPTION";
String EXTRA_OPTIONTYPE_PREFIX = "E";
+ String REPOSITORY_PATH_OPTION_LONG = "repository-path";
}
interface Java2WSDLConstants{
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java?rev=377984&r1=377983&r2=377984&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java Wed Feb 15 02:41:21 2006
@@ -40,6 +40,7 @@
(WSDL2JavaConstants.GENERATE_ALL_OPTION).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.PORT_NAME_OPTION).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.SERVICE_NAME_OPTION).equalsIgnoreCase(optionType) ||
+ (WSDL2JavaConstants.REPOSITORY_PATH_OPTION).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION_LONG).equalsIgnoreCase(optionType) ||
@@ -53,7 +54,8 @@
(WSDL2JavaConstants.UNPACK_CLASSES_OPTION_LONG).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.PORT_NAME_OPTION_LONG).equalsIgnoreCase(optionType) ||
(WSDL2JavaConstants.SERVICE_NAME_OPTION_LONG).equalsIgnoreCase(optionType) ||
- (WSDL2JavaConstants.GENERATE_ALL_OPTION_LONG).equalsIgnoreCase(optionType)
+ (WSDL2JavaConstants.GENERATE_ALL_OPTION_LONG).equalsIgnoreCase(optionType) ||
+ (WSDL2JavaConstants.REPOSITORY_PATH_OPTION_LONG).equalsIgnoreCase(optionType)
);
}