ews-devel Mailing List for Enterprise Web Services
Brought to you by:
dims
You can subscribe to this list here.
2004 |
Jan
|
Feb
(101) |
Mar
(60) |
Apr
(9) |
May
(53) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Changshin L. <ias...@us...> - 2004-05-28 09:26:58
|
Update of /cvsroot/ews/wsm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8367a Modified Files: readme.txt Log Message: Update to use JSR-181 ED. Index: readme.txt =================================================================== RCS file: /cvsroot/ews/wsm/readme.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- readme.txt 20 Apr 2004 09:22:26 -0000 1.4 +++ readme.txt 28 May 2004 09:26:48 -0000 1.5 @@ -3,10 +3,13 @@ Ant 1.6.1 (http://ant.apache.org) Axis 1.2 Beta (http://ws.apache.org/axis) JWSDP 1.3 (http://java.sun.com/webservices/jwsdp) -J2SE 1.5.0 Beta 1 (http://java.sun.com/j2se/1.5.0) +J2SE 1.5.0 Beta 2 (http://java.sun.com/j2se/1.5.0) +JSR-181 ED (http://jcp.org/en/jsr/detail?id=181) First, configure your own build.properties from build.properties.sample. -Next, set JAVA_HOME to your Tiger home. -Then, simply run "ant" :-) +Second, set JAVA_HOME to your Tiger home. +Third, extract jsr181-src.jar in the JSR-181 ED to src directory. +(Note that checking the source codes in the jar in this CVS is not yet confirmed by JSR 181 authority. Thanks in advance for your inconvenience for a while.) +At last, simply run "ant" :-) Ias |
From: Changshin L. <ias...@us...> - 2004-05-28 09:18:14
|
Update of /cvsroot/ews/wsm/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6872/samples Modified Files: MyService.java Log Message: Update to use JSR-181 ED. Index: MyService.java =================================================================== RCS file: /cvsroot/ews/wsm/samples/MyService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MyService.java 9 Apr 2004 12:47:22 -0000 1.2 +++ MyService.java 28 May 2004 09:18:02 -0000 1.3 @@ -1,11 +1,15 @@ -import org.apache.axis.metadata.annotation.*; +import javax.jws.*; +import javax.jws.soap.*; -@Protocol(soapStyle=EncodingType.DOCUMENT_LITERAL) -@TargetNamespace("http://ws.apache.org/axis/") -@ServiceLocation("http://localhost:8080/axis/services/MyService") -@WsdlFile("MyService.wsdl") +@WebService( + targetNamespace="http://ws.apache.org/axis/" + ) +@SOAPBinding( + style=SOAPBinding.Style.RPC, + use = SOAPBinding.Use.ENCODED + ) public class MyService { - @Operation + @WebMethod public void doSomething() { } |
From: Changshin L. <ias...@us...> - 2004-05-28 09:18:06
|
Update of /cvsroot/ews/wsm/samples/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6810/samples/test Modified Files: YourService.java Log Message: Update to use JSR-181 ED. Index: YourService.java =================================================================== RCS file: /cvsroot/ews/wsm/samples/test/YourService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- YourService.java 9 Apr 2004 12:47:22 -0000 1.2 +++ YourService.java 28 May 2004 09:17:50 -0000 1.3 @@ -1,13 +1,14 @@ package test; -import org.apache.axis.metadata.annotation.*; +import javax.jws.*; +import javax.jws.soap.*; -@Protocol(soapStyle=EncodingType.DOCUMENT_LITERAL) -@TargetNamespace("http://ws.apache.org/axis/") -@ServiceLocation("http://localhost:8080/axis/services/MyService") -@WsdlFile("YourService.wsdl") +@WebService( + targetNamespace="http://ws.apache.org/axis/" + ) +@SOAPBinding public class YourService { - @Operation + @WebMethod public void doSomething() { } |
From: Changshin L. <ias...@us...> - 2004-05-28 09:17:25
|
Update of /cvsroot/ews/wsm/src/org/apache/axis/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6705/src/org/apache/axis/metadata Modified Files: Java2WsdlWithMetadata.java Log Message: Now use JSR-181 ED. Index: Java2WsdlWithMetadata.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/Java2WsdlWithMetadata.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Java2WsdlWithMetadata.java 20 Apr 2004 11:34:14 -0000 1.4 +++ Java2WsdlWithMetadata.java 28 May 2004 09:17:09 -0000 1.5 @@ -11,7 +11,8 @@ import org.apache.axis.utils.CLOption; import org.apache.axis.utils.Messages; import org.apache.axis.wsdl.fromJava.Emitter; -import org.apache.axis.metadata.annotation.*; +import javax.jws.*; +import javax.jws.soap.*; import java.lang.reflect.*; /** @@ -20,42 +21,6 @@ */ public class Java2WsdlWithMetadata extends org.apache.axis.wsdl.Java2WSDL { - protected boolean locationSet; - - /** - * validateOptions - * This method is invoked after the options are set to validate - * the option settings. - * - * @return - */ - protected boolean validateOptions() { - - // Can't proceed without a class name - if ((className == null)) { - System.out.println(Messages.getMessage("j2wMissingClass00")); - printUsage(); - - return false; - } - if (!locationSet - && ((mode == Emitter.MODE_ALL) - || (mode == Emitter.MODE_IMPLEMENTATION))) { - System.out.println(Messages.getMessage("j2wMissingLocation00")); - printUsage(); - - return false; - } - - // Default to SOAP 1.2 JAX-RPC mapping - if (emitter.getDefaultTypeMapping() == null) { - emitter.setDefaultTypeMapping( - DefaultTypeMappingImpl.getSingleton()); - } - - return true; // a-OK - } - public static void main(String args[]) { Java2WsdlWithMetadata java2wsdl = new Java2WsdlWithMetadata(); @@ -94,8 +59,8 @@ Class<?> serviceEndpointInterface = emitter.getCls(); - TargetNamespace targetNamespaceAnnotation = serviceEndpointInterface.getAnnotation(TargetNamespace.class); - String targetNamespace = targetNamespaceAnnotation.value(); + WebService webServiceAnnotation = serviceEndpointInterface.getAnnotation(WebService.class); + String targetNamespace = webServiceAnnotation.targetNamespace(); if (targetNamespace != null) { Package javaPackage = serviceEndpointInterface.getPackage(); java.lang.String javaPackageName = null; @@ -107,54 +72,42 @@ namespaceMap.put(javaPackageName, targetNamespace); } - String wsdlFile = serviceEndpointInterface.getAnnotation(WsdlFile.class).value(); - if (wsdlFile != null) { - wsdlFilename = wsdlFile; - } - - String serviceLocation = serviceEndpointInterface.getAnnotation(ServiceLocation.class).value(); - if (serviceLocation != null) { - emitter.setLocationUrl(serviceLocation); - locationSet = true; - } - EncodingType style = serviceEndpointInterface.getAnnotation(Protocol.class).soapStyle(); - - // Currently the following commented-out block doesn't work. - // This block works from Tiger beta 2 b38. + SOAPBinding soapBindingAnnotation = serviceEndpointInterface.getAnnotation(SOAPBinding.class); - /* + SOAPBinding.Style style = soapBindingAnnotation.style(); switch (style) { - case documentLiteral: + case DOCUMENT: emitter.setStyle("document"); - emitter.setUse("literal"); break; - case rpcLiteral: + case RPC: emitter.setStyle("rpc"); - emitter.setUse("literal"); break; - case soapEncoded: - emitter.setStyle("rpc"); - emitter.setUse("encoded"); + case DEFAULT: + emitter.setStyle("document"); break; default: - } - */ - - if (style == EncodingType.DOCUMENT_LITERAL) { - emitter.setStyle("document"); - emitter.setUse("literal"); - } else if (style == EncodingType.RPC_LITERAL) { - emitter.setStyle("rpc"); - emitter.setUse("literal"); - } else if (style == EncodingType.RPC_ENCODED) { - emitter.setStyle("rpc"); - emitter.setUse("encoded"); + emitter.setStyle("document"); } - Vector allowedMethods = new Vector(); + SOAPBinding.Use use = soapBindingAnnotation.use(); + switch (use) { + case LITERAL: + emitter.setUse("literal"); + break; + case ENCODED: + emitter.setUse("encoded"); + break; + case DEFAULT: + emitter.setUse("literal"); + break; + default: + emitter.setUse("literal"); + } + + Vector allowedMethods = new Vector(); Method[] methods = serviceEndpointInterface.getMethods(); for (Method method : methods) { - if (method.isAnnotationPresent(Operation.class)) { + if (method.isAnnotationPresent(WebMethod.class)) { allowedMethods.add(method.getName()); } } |
From: Changshin L. <ias...@us...> - 2004-05-28 09:16:49
|
Update of /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6586/src/org/apache/axis/metadata/annotation Modified Files: Wrapped.java EncodingType.java Protocol.java WsdlFile.java ServiceLocation.java TargetNamespace.java Operation.java Log Message: Mark deprecated in order to use JSR-181 ED instead. Index: EncodingType.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/EncodingType.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EncodingType.java 9 Apr 2004 12:45:57 -0000 1.2 +++ EncodingType.java 28 May 2004 09:16:38 -0000 1.3 @@ -2,7 +2,7 @@ /** * @author Ias - * + * @deprecated */ public enum EncodingType {DOCUMENT_LITERAL, RPC_LITERAL, RPC_ENCODED} \ No newline at end of file Index: ServiceLocation.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/ServiceLocation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ServiceLocation.java 5 Feb 2004 12:17:37 -0000 1.1 +++ ServiceLocation.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Retention(RetentionPolicy.RUNTIME) Index: Wrapped.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/Wrapped.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Wrapped.java 5 Feb 2004 12:17:37 -0000 1.1 +++ Wrapped.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Retention(RetentionPolicy.RUNTIME) Index: Operation.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/Operation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Operation.java 5 Feb 2004 12:17:37 -0000 1.1 +++ Operation.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Target({ElementType.METHOD}) Index: WsdlFile.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/WsdlFile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- WsdlFile.java 5 Feb 2004 12:17:37 -0000 1.1 +++ WsdlFile.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Retention(RetentionPolicy.RUNTIME) Index: TargetNamespace.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/TargetNamespace.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TargetNamespace.java 5 Feb 2004 12:17:37 -0000 1.1 +++ TargetNamespace.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Retention(RetentionPolicy.RUNTIME) Index: Protocol.java =================================================================== RCS file: /cvsroot/ews/wsm/src/org/apache/axis/metadata/annotation/Protocol.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Protocol.java 5 Feb 2004 12:17:37 -0000 1.1 +++ Protocol.java 28 May 2004 09:16:38 -0000 1.2 @@ -4,7 +4,7 @@ /** * @author Ias - * + * @deprecated */ @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) |
From: Changshin L. <ias...@us...> - 2004-05-28 09:15:56
|
Update of /cvsroot/ews/wsm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6435 Modified Files: build.xml Log Message: Update to follow up JSR-181 ED. Index: build.xml =================================================================== RCS file: /cvsroot/ews/wsm/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- build.xml 9 Apr 2004 12:49:49 -0000 1.3 +++ build.xml 28 May 2004 09:15:44 -0000 1.4 @@ -2,26 +2,26 @@ <project name="wsm" basedir="." default="run"> - <property file="build.properties"/> + <property file="build.properties" /> <path id="classpath"> <fileset dir="${jwsdp.home}" includes="jaxb/lib/*.jar" /> <fileset dir="${jwsdp.home}" includes="jwsdp-shared/lib/*.jar" /> <fileset dir="${jwsdp.home}" includes="jaxp/lib/**/*.jar" /> - <pathelement location="bin"/> - <pathelement location="classes"/> + <pathelement location="bin" /> + <pathelement location="classes" /> <fileset dir="${axis.home}" includes="lib/*.jar" /> </path> <target name="clean"> <delete> - <fileset dir="bin" includes="**/*"/> + <fileset dir="bin" includes="**/*" /> </delete> </target> <target name="compile"> - <javac srcdir="src:samples" excludes="org/apache/axis/metadata/JaxRpcMappingGenerator.java" destdir="bin" debug="on" source="1.5"> - <classpath refid="classpath"/> + <javac srcdir="src:samples" excludes="org/apache/axis/metadata/JaxRpcMappingGenerator.java, org/apache/axis/metadata/annotation/*" destdir="bin" debug="on" source="1.5"> + <classpath refid="classpath" /> <!-- <compilerarg value="-Xlint:unchecked"/> --> @@ -39,13 +39,15 @@ <arg value="MyService"/> </java> --> - <java classname="org.apache.axis.metadata.Java2WsdlWithMetadata"> - <classpath refid="classpath"/> - <arg value="test.YourService"/> + <echo message="test1" /> + <java classname="org.apache.axis.metadata.Java2WsdlWithMetadata" fork="true"> + <classpath refid="classpath" /> + <arg line="-o you.wsdl -l http://localhost:8080/axis/YourService test.YourService" /> </java> - <java classname="org.apache.axis.metadata.Java2WsdlWithMetadata"> - <classpath refid="classpath"/> - <arg value="MyService"/> + <echo message="test2" /> + <java classname="org.apache.axis.metadata.Java2WsdlWithMetadata" fork="true"> + <classpath refid="classpath" /> + <arg line="-o me.wsdl -l http://localhost:8080/axis/MyService MyService" /> </java> </target> </project> |
From: Srinath P. <hem...@us...> - 2004-05-27 15:32:28
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/jaxrpcmapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22322 Modified Files: J2eeDeployWriter.java Log Message: change the property loading Index: J2eeDeployWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/jaxrpcmapping/J2eeDeployWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- J2eeDeployWriter.java 26 May 2004 15:05:00 -0000 1.1 +++ J2eeDeployWriter.java 27 May 2004 15:32:19 -0000 1.2 @@ -57,10 +57,8 @@ package org.apache.geronimo.ews.jaxrpcmapping; import java.io.File; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.ArrayList; @@ -68,7 +66,6 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; -import java.util.Properties; import java.util.Vector; import javax.wsdl.Binding; @@ -89,7 +86,6 @@ import org.apache.axis.enum.Use; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.Messages; -import org.apache.axis.wsdl.toJava.Emitter; import org.apache.axis.wsdl.symbolTable.BindingEntry; import org.apache.axis.wsdl.symbolTable.CollectionTE; import org.apache.axis.wsdl.symbolTable.Element; @@ -99,6 +95,7 @@ import org.apache.axis.wsdl.symbolTable.SchemaUtils; import org.apache.axis.wsdl.symbolTable.SymbolTable; import org.apache.axis.wsdl.symbolTable.TypeEntry; +import org.apache.axis.wsdl.toJava.Emitter; import org.apache.axis.wsdl.toJava.JavaWriter; import org.apache.axis.wsdl.toJava.Utils; import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants; @@ -380,14 +377,9 @@ bEntry.getBinding().getExtensibilityElements().iterator(); //get the Name of the provider needed in the deploy.wsdd - Properties pro = new Properties(); String provider = null; - File file = new File("src/conf/"+GenerationConstants.WS4J2EE_PROPERTY_FILE); - if(file.exists()){ - InputStream ws4j2eein = new FileInputStream(file); - pro.load(ws4j2eein); - provider = pro.getProperty(GenerationConstants.WS4J2EE_PROVIDER); - } + provider = GenerationConstants.getProperties() + .getProperty(GenerationConstants.WS4J2EE_PROVIDER); while (iterator.hasNext()) { Object obj = iterator.next(); |
From: Srinath P. <hem...@us...> - 2004-05-27 15:31:01
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/webservices/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21769/webservices/server Modified Files: WSCFContextImpl.java WSCFDocumentImpl.java Log Message: change the java2WSDL use Emitter instead of command line Index: WSCFDocumentImpl.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/webservices/server/WSCFDocumentImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WSCFDocumentImpl.java 19 Feb 2004 10:32:05 -0000 1.3 +++ WSCFDocumentImpl.java 27 May 2004 15:30:48 -0000 1.4 @@ -54,7 +54,7 @@ */ package org.apache.geronimo.ews.ws4j2ee.context.webservices.server; -import java.io.FileInputStream; +import java.io.InputStream; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -86,7 +86,7 @@ //This is kept basically to meet the future demands of the serialising. private Webservices jaxbWebservices; - public WSCFDocumentImpl(FileInputStream in)throws WSCFException{ + public WSCFDocumentImpl(InputStream in)throws WSCFException{ try{ JAXBContext jc = JAXBContext.newInstance( "org.apache.geronimo.ews.ws4j2ee.context.webservices.server.jaxb" ); Index: WSCFContextImpl.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/webservices/server/WSCFContextImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WSCFContextImpl.java 19 Feb 2004 10:32:05 -0000 1.3 +++ WSCFContextImpl.java 27 May 2004 15:30:48 -0000 1.4 @@ -54,7 +54,7 @@ */ package org.apache.geronimo.ews.ws4j2ee.context.webservices.server; -import java.io.FileInputStream; +import java.io.InputStream; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFContext; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFDocument; @@ -81,7 +81,7 @@ * @param document The document object to the webservices.xml * @throws WSCFException */ - public WSCFContextImpl(FileInputStream in) throws WSCFException{ + public WSCFContextImpl(InputStream in) throws WSCFException{ this.document = (WSCFDocument) new WSCFDocumentImpl(in); } |
From: Srinath P. <hem...@us...> - 2004-05-27 15:31:01
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21769/wsdl/impl Modified Files: AxisWSDLContext.java Log Message: change the java2WSDL use Emitter instead of command line Index: AxisWSDLContext.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/impl/AxisWSDLContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- AxisWSDLContext.java 23 May 2004 15:53:26 -0000 1.5 +++ AxisWSDLContext.java 27 May 2004 15:30:49 -0000 1.6 @@ -66,6 +66,7 @@ import javax.wsdl.Service; import javax.xml.namespace.QName; +import org.apache.axis.components.logger.LogFactory; import org.apache.axis.wsdl.symbolTable.BindingEntry; import org.apache.axis.wsdl.symbolTable.Element; import org.apache.axis.wsdl.symbolTable.PortEntry; @@ -74,9 +75,12 @@ import org.apache.axis.wsdl.symbolTable.SymTabEntry; import org.apache.axis.wsdl.symbolTable.SymbolTable; import org.apache.axis.wsdl.symbolTable.TypeEntry; +import org.apache.commons.logging.Log; import org.apache.geronimo.ews.ws4j2ee.context.wsdl.WSDLContext; import org.apache.geronimo.ews.ws4j2ee.context.wsdl.type.SchemaType; + + /** * <p>This Class is a wrapper fo the Axis SymbolTable. Since SymbolTable is parsed * completly it is not editable so the methods will throw the @@ -85,6 +89,8 @@ * @author Srinath Perera(hem...@op...) */ public class AxisWSDLContext implements WSDLContext { + protected static Log log = + LogFactory.getLog(AxisWSDLContext.class.getName()); private SymbolTable symbolTable; private HashMap services; private HashMap bindings; @@ -115,7 +121,7 @@ this.portetypes.put(portType.getQName(), entry); } else if (entry instanceof PortEntry) { PortEntry port = ((PortEntry) entry); - this.ports.put(port.getQName(), entry); + this.ports.put(port.getQName().getLocalPart(), entry); } } @@ -211,12 +217,12 @@ * @see org.apache.geronimo.ews.ws4j2ee.context.wsdl.WSDLContext#getPort() */ public PortEntry getPort(QName name) { + log.info("getting port type "+name); Object obj = this.ports.get(name); //when Symbol table populates the URI of the port is given as "" //so we have to cheat if (obj == null) { - name = new QName(name.getLocalPart()); - obj = this.ports.get(name); + obj = this.ports.get(name.getLocalPart()); } |
From: Srinath P. <hem...@us...> - 2004-05-27 15:30:59
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21769 Modified Files: ContextFactory.java Log Message: change the java2WSDL use Emitter instead of command line Index: ContextFactory.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/ContextFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ContextFactory.java 23 May 2004 15:53:23 -0000 1.4 +++ ContextFactory.java 27 May 2004 15:30:47 -0000 1.5 @@ -55,7 +55,7 @@ package org.apache.geronimo.ews.ws4j2ee.context; -import java.io.FileInputStream; +import java.io.InputStream; import org.apache.axis.wsdl.symbolTable.SymbolTable; import org.apache.geronimo.ews.jaxrpcmapping.J2eeEmitter; @@ -88,7 +88,7 @@ throw new UnrecoverableGenarationFault("unknown mapper type"); } - public static WSCFContext createWSCFContext(FileInputStream in) throws GenerationFault { + public static WSCFContext createWSCFContext(InputStream in) throws GenerationFault { try { return new WSCFContextImpl(in); } catch (WSCFException e) { |
From: Srinath P. <hem...@us...> - 2004-05-27 15:30:58
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21769/impl Modified Files: AxisEmitterBasedJaxRpcMapperContext.java Log Message: change the java2WSDL use Emitter instead of command line Index: AxisEmitterBasedJaxRpcMapperContext.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/impl/AxisEmitterBasedJaxRpcMapperContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- AxisEmitterBasedJaxRpcMapperContext.java 23 May 2004 15:53:23 -0000 1.6 +++ AxisEmitterBasedJaxRpcMapperContext.java 27 May 2004 15:30:48 -0000 1.7 @@ -246,9 +246,8 @@ //set the package name FullyQualifiedClassType packagename = objFactory.createFullyQualifiedClassType(); String pkg = (String) packages.next(); - if(pkg.equals(j2eewscontext.getMiscInfo().getJaxrpcSEI())){ - break; + continue; } packagename.setValue(pkg); pkgmap.setPackageType(packagename); |
From: Srinath P. <hem...@us...> - 2004-05-27 15:28:56
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/geronimo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21323/wrapperWs/geronimo Modified Files: InternalBasedWrapperClassWriter.java Log Message: change the java2WSDL use Emitter instead of command line Index: InternalBasedWrapperClassWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/geronimo/InternalBasedWrapperClassWriter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- InternalBasedWrapperClassWriter.java 23 May 2004 15:53:28 -0000 1.2 +++ InternalBasedWrapperClassWriter.java 27 May 2004 15:28:46 -0000 1.3 @@ -103,6 +103,13 @@ out.write("\tprivate org.openejb.EJBContainer container;\n"); } +// String cotnainerIndex = ... // get container index from request +// ContainerIndex index = ContainerIndex.getInstance(); +// EJBContainer container = index.getContainer(containerIndex); +// container.invoke(callMethod, args, primKey); +//@see org.openejb.cotnainerIndex#getContainer() and EJBContainer +//I can go though all and select the one with right ejbname for the wrost case + protected void writeConstructors() throws GenerationFault { out.write("\tpublic " + classname + "(){\n"); out.write("\t\tString containerID = \""+j2eewscontext.getMiscInfo().getEjbName()+"\";\n"); // get container id (aka deployment id) from request |
From: Srinath P. <hem...@us...> - 2004-05-27 15:28:56
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ws In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21323/ws Modified Files: ClientSideWsGenarator.java ServerSideWsGenarator.java Log Message: change the java2WSDL use Emitter instead of command line Index: ClientSideWsGenarator.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ws/ClientSideWsGenarator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ClientSideWsGenarator.java 23 May 2004 15:53:29 -0000 1.4 +++ ClientSideWsGenarator.java 27 May 2004 15:28:46 -0000 1.5 @@ -71,6 +71,25 @@ * <p>This genarated the Client side SEI and other classes required in the * Axis.</p> * + * * <h3>Service Endpoint Interface</h3> + * <p>The JAX-RPC specification requires that a JAX-RPC service endpoint interface must + * follow the following rules:</p> + * <ol> + * <li>Service endpoint interface must extend java.rmi.Remote either directly or indirectly</li> + * <li>All methods in the interface must throw java.rmi.RemoteException. Methods may + * throw service specific exceptions in addition to the RemoteException.</li> + * <li>Method parameters and return types must be the JAX-RPC supported Java types + * (refer to the section 5.1, JAX-RPC Supported Java Types). At runtime, values of a + * supported Java type must be serializable to and from the corresponding XML + * representation. + * </li> + * <li>Holder classes may be used as method parameters. These Holder classes are either + * generated or those packaged in the standard javax.xml.rpc.holders package.</li> + * <li>Service endpoint interface must not include constant (as public final static) + * declarations. WSDL 1.1 specification does not define any standard representation for + * constants in a wsdl:portType definition.</li> + * </ol> + * * @author Srinath Perera(hem...@op...) */ public class ClientSideWsGenarator implements Generator { @@ -119,6 +138,7 @@ e.printStackTrace(); throw new GenerationFault(e); } + } } Index: ServerSideWsGenarator.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ws/ServerSideWsGenarator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ServerSideWsGenarator.java 30 Mar 2004 10:40:19 -0000 1.5 +++ ServerSideWsGenarator.java 27 May 2004 15:28:46 -0000 1.6 @@ -67,6 +67,24 @@ /** * <p>This genarated the Server side SEI and other classes required in the * Axis.</p> + * <h3>Service Endpoint Interface</h3> + * <p>The JAX-RPC specification requires that a JAX-RPC service endpoint interface must + * follow the following rules:</p> + * <ol> + * <li>Service endpoint interface must extend java.rmi.Remote either directly or indirectly</li> + * <li>All methods in the interface must throw java.rmi.RemoteException. Methods may + * throw service specific exceptions in addition to the RemoteException.</li> + * <li>Method parameters and return types must be the JAX-RPC supported Java types + * (refer to the section 5.1, JAX-RPC Supported Java Types). At runtime, values of a + * supported Java type must be serializable to and from the corresponding XML + * representation. + * </li> + * <li>Holder classes may be used as method parameters. These Holder classes are either + * generated or those packaged in the standard javax.xml.rpc.holders package.</li> + * <li>Service endpoint interface must not include constant (as public final static) + * declarations. WSDL 1.1 specification does not define any standard representation for + * constants in a wsdl:portType definition.</li> + * </ol> * * @author Srinath Perera(hem...@op...) */ @@ -96,7 +114,6 @@ j2ee.setServerSide(true); j2ee.setVerbose(j2eewscontext.getMiscInfo().isVerbose()); j2ee.setHelperWanted(true); - System.out.println(); j2ee.runServerSide(wsdlfile); SymbolTable axisSymboltable = j2ee.getSymbolTable(); j2eewscontext.setWSDLContext(ContextFactory.createWSDLContext(axisSymboltable)); |
From: Srinath P. <hem...@us...> - 2004-05-27 15:28:56
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21323/wrapperWs Modified Files: WebEndpointWrapperClassWriter.java Log Message: change the java2WSDL use Emitter instead of command line Index: WebEndpointWrapperClassWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WebEndpointWrapperClassWriter.java 23 May 2004 15:53:28 -0000 1.3 +++ WebEndpointWrapperClassWriter.java 27 May 2004 15:28:46 -0000 1.4 @@ -65,6 +65,28 @@ import org.apache.geronimo.ews.ws4j2ee.toWs.JavaClassWriter; /** + * <h4>WebEndpoint Based Serivce Implementation Bean</h4> + * <p>The Service Implementation Bean must follow the Service Developer requirements outlined in the JAX-RPC specification and are listed below except as noted.</p> + * <ol> + * <li>?The Service Implementation Bean must have a default public constructor.</li> + * <li>?The Service Implementation Bean may implement the Service Endpoint + * Interface as defined by the JAX-RPC Servlet model. The bean must implement + * all the method signatures of the SEI. In addition, a Service Implementation + * Bean may be implemented that does not implement the SEI. This additional + * requirement provides the same SEI implementation flexibility as provided by + * EJB service endpoints. The business methods of the bean must be public and + * must not be static.</li> + * <li>If the Service Implementation Bean does not implement the SEI, the + * business methods must not be final. The Service Implementation Bean + * may implement other methods in addition to those defined by the SEI, + * but only the SEI methods are exposed to the client. </li> + * <li>?A Service Implementation must be a stateless object. A Service + * Implementation Bean must not save client specific state across method + * calls either within the bean instances data members or external to + * the instance. A container may use any bean instance to service a request.</li> + * <li>?The class must be public, must not be final and must not be abstract.</li> + * <li>?The class must not define the finalize() method.</li> + * </ol> * @author Srinath Perera(hem...@op...) */ public class WebEndpointWrapperClassWriter extends JavaClassWriter { |
From: Srinath P. <hem...@us...> - 2004-05-27 15:28:56
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21323 Modified Files: GenerationConstants.java Ws4J2EEwithoutWSDL.java Ws4J2eeWtihoutWSDLCLOptionParser.java Log Message: change the java2WSDL use Emitter instead of command line Index: GenerationConstants.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/GenerationConstants.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- GenerationConstants.java 23 May 2004 15:53:26 -0000 1.7 +++ GenerationConstants.java 27 May 2004 15:28:45 -0000 1.8 @@ -55,10 +55,15 @@ package org.apache.geronimo.ews.ws4j2ee.toWs; +import java.io.FileInputStream; +import java.io.InputStream; +import java.util.Properties; + /** * <p>This interface has constants that are specific to the generators.</p> */ -public interface GenerationConstants { +public class GenerationConstants { + //generators public static final int EJB_GENERATOR = 0; public static final int AXIS_WEBSERVICE_WRAPPER_GENERATOR = 1; @@ -89,6 +94,16 @@ public static final String J2EE_CONTAINER_DD = "j2ee-container-dd"; public static final String WS4J2EE_PROPERTY_FILE = "ws4j2ee.properties"; + public static final String WS4J2EE_PROVIDER = "ws4j2ee-provider"; + public static final String J2EE_VERSION = "j2ee-version"; + public static final String J2EE_VERSION_1_3 = "1.3"; + public static final String J2EE_VERSION_1_4 = "1.4"; + + + private static Properties properties; + public static Properties getProperties(){ + return properties; + } /** j2ee Container DDs */ public static final String JBOSS_DD = "jboss.xml"; @@ -105,5 +120,27 @@ public static final String USE_LOCAL = "use-local"; public static final String USE_INTERNALS = "use-internals"; public static final String USE_LOCAL_AND_REMOTE = "use-local-remote"; + + static{ + InputStream proIn = null; + try{ + properties = new Properties(); + proIn = GenerationConstants.class.getResourceAsStream(WS4J2EE_PROPERTY_FILE); + if(proIn == null){ + proIn = GenerationConstants.class.getResourceAsStream("META-INF/"+WS4J2EE_PROPERTY_FILE); + } + if(proIn == null){ + proIn = new FileInputStream("src/conf/"+WS4J2EE_PROPERTY_FILE); + } + if(proIn == null){ + proIn = new FileInputStream(WS4J2EE_PROPERTY_FILE); + } + if(proIn != null){ + properties.load(proIn); + } + }catch(Exception e){ + e.printStackTrace(); + } + } } Index: Ws4J2eeWtihoutWSDLCLOptionParser.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2eeWtihoutWSDLCLOptionParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Ws4J2eeWtihoutWSDLCLOptionParser.java 23 May 2004 15:53:26 -0000 1.1 +++ Ws4J2eeWtihoutWSDLCLOptionParser.java 27 May 2004 15:28:45 -0000 1.2 @@ -56,7 +56,18 @@ package org.apache.geronimo.ews.ws4j2ee.toWs; import java.io.File; +import java.util.HashMap; +import java.util.List; +import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl; +import org.apache.axis.encoding.DefaultTypeMappingImpl; +import org.apache.axis.i18n.Messages; +import org.apache.axis.utils.CLArgsParser; +import org.apache.axis.utils.CLOption; +import org.apache.axis.utils.CLOptionDescriptor; +import org.apache.axis.utils.CLUtil; +import org.apache.axis.utils.ClassUtils; +import org.apache.axis.wsdl.fromJava.Emitter; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebserviceDescription; import org.apache.geronimo.ews.ws4j2ee.utils.Utils; @@ -73,46 +84,6 @@ private WSCFWebserviceDescription[] wscfwsdis; private String[] args; private int indexToChange = -1; - - public Ws4J2eeWtihoutWSDLCLOptionParser(String[] args){ - this.args = args; - wscfFileLocation = args[0]; - outPutLocation = Utils.getRootDirOfFile(wscfFileLocation); - - File file = new File(outPutLocation+"/META-INF"); - if (!file.exists()) - file.mkdirs(); - boolean found = false; - for(int i = 0;i<args.length;i++){ - if(args[i].startsWith("-o")){ - String output = args[i].substring(2); - file = new File(output+"/META-INF"); - if (!file.exists()) - file.mkdirs(); - outPutLocation = output; - //wsdlFile = Utils.getAbsolutePath(wscfwsdis.getWsdlFile(),output); - //args[i] = "-o"+wsdlFile; - indexToChange = i; - found = true; - } - } - if(!found){ - //wscontext.getMiscInfo().setOutputPath(wscontext.getMiscInfo().getWsConfFileLocation()); - //wsdlFile = Utils.getAbsolutePath(wscfwsdis.getWsdlFile(),wscontext.getMiscInfo().getWsConfFileLocation()); - String[] newArgs = new String[args.length+1]; - for(int i = 0;i<args.length;i++){ - newArgs[i] = args[i]; - } - //newArgs[args.length] = "-o"+wsdlFile; - indexToChange = args.length; - this.args = newArgs; - } - //the other two files are considered to be at the same directory as the - //wscf file - wjbConfFileLocation = Utils.getRootDirOfFile(wscfFileLocation)+"/ejb-jar.xml"; - webConfFileLocation = Utils.getRootDirOfFile(wscfFileLocation)+"/web.xml"; - - } public String getWSCFFileLocation(){ return wscfFileLocation; @@ -123,12 +94,6 @@ public String getWebConfFileLocation(){ return webConfFileLocation; } - public String[] getArgsforJava2WSDLEmitter(String seiName,String wsdlfile){ - args[0] = seiName; - if(indexToChange>0) - args[indexToChange] = "-o"+wsdlfile; - return args; - } /** * @return */ @@ -142,5 +107,618 @@ public void setOutPutLocation(String string) { outPutLocation = string; } + /////////////////////////////////////////////////////////////////// +// Define our short one-letter option identifiers. + + /** Field INHERITED_CLASS_OPT */ + protected static final int INHERITED_CLASS_OPT = 'a'; + + /** Field SOAPACTION_OPT */ + protected static final int SOAPACTION_OPT = 'A'; + + /** Field BINDING_NAME_OPT */ + protected static final int BINDING_NAME_OPT = 'b'; + + /** Field STOP_CLASSES_OPT */ + protected static final int STOP_CLASSES_OPT = 'c'; + + /** Field IMPORT_SCHEMA_OPT */ + protected static final int IMPORT_SCHEMA_OPT = 'C'; + + /** Field EXTRA_CLASSES_OPT */ + protected static final int EXTRA_CLASSES_OPT = 'e'; + + /** Field HELP_OPT */ + protected static final int HELP_OPT = 'h'; + + /** Field IMPL_CLASS_OPT */ + protected static final int IMPL_CLASS_OPT = 'i'; + + /** Field INPUT_OPT */ + protected static final int INPUT_OPT = 'I'; + + /** Field LOCATION_OPT */ + protected static final int LOCATION_OPT = 'l'; + + /** Field LOCATION_IMPORT_OPT */ + protected static final int LOCATION_IMPORT_OPT = 'L'; + + /** Field METHODS_ALLOWED_OPT */ + protected static final int METHODS_ALLOWED_OPT = 'm'; + + /** Field NAMESPACE_OPT */ + protected static final int NAMESPACE_OPT = 'n'; + + /** Field NAMESPACE_IMPL_OPT */ + protected static final int NAMESPACE_IMPL_OPT = 'N'; + + /** Field OUTPUT_OPT */ + protected static final int OUTPUT_OPT = 'o'; + + /** Field OUTPUT_IMPL_OPT */ + protected static final int OUTPUT_IMPL_OPT = 'O'; + + /** Field PACKAGE_OPT */ + protected static final int PACKAGE_OPT = 'p'; + + /** Field PORTTYPE_NAME_OPT */ + protected static final int PORTTYPE_NAME_OPT = 'P'; + + /** Field SERVICE_PORT_NAME_OPT */ + protected static final int SERVICE_PORT_NAME_OPT = 's'; + + /** Field SERVICE_ELEMENT_NAME_OPT */ + protected static final int SERVICE_ELEMENT_NAME_OPT = 'S'; + + /** Field TYPEMAPPING_OPT */ + protected static final int TYPEMAPPING_OPT = 'T'; + + /** Field USE_OPT */ + protected static final int USE_OPT = 'u'; + + /** Field OUTPUT_WSDL_MODE_OPT */ + protected static final int OUTPUT_WSDL_MODE_OPT = 'w'; + + /** Field METHODS_NOTALLOWED_OPT */ + protected static final int METHODS_NOTALLOWED_OPT = 'x'; + + protected static final int CLASSPATH_OPT = 'X'; + + /** Field STYLE_OPT */ + protected static final int STYLE_OPT = 'y'; + + /** + * Define the understood options. Each CLOptionDescriptor contains: + * - The "long" version of the option. Eg, "help" means that "--help" will + * be recognised. + * - The option flags, governing the option's argument(s). + * - The "short" version of the option. Eg, 'h' means that "-h" will be + * recognised. + * - A description of the option for the usage message + */ + protected CLOptionDescriptor[] options = new CLOptionDescriptor[]{ + new CLOptionDescriptor("help", CLOptionDescriptor.ARGUMENT_DISALLOWED, + HELP_OPT, Messages.getMessage("j2wopthelp00")), + new CLOptionDescriptor("input", CLOptionDescriptor.ARGUMENT_REQUIRED, + INPUT_OPT, Messages.getMessage("j2woptinput00")), + new CLOptionDescriptor("output", CLOptionDescriptor.ARGUMENT_REQUIRED, + OUTPUT_OPT, + Messages.getMessage("j2woptoutput00")), + new CLOptionDescriptor("location", + CLOptionDescriptor.ARGUMENT_REQUIRED, + LOCATION_OPT, + Messages.getMessage("j2woptlocation00")), + new CLOptionDescriptor("portTypeName", + CLOptionDescriptor.ARGUMENT_REQUIRED, + PORTTYPE_NAME_OPT, + Messages.getMessage("j2woptportTypeName00")), + new CLOptionDescriptor("bindingName", + CLOptionDescriptor.ARGUMENT_REQUIRED, + BINDING_NAME_OPT, + Messages.getMessage("j2woptbindingName00")), + new CLOptionDescriptor( + "serviceElementName", CLOptionDescriptor.ARGUMENT_REQUIRED, + SERVICE_ELEMENT_NAME_OPT, + Messages.getMessage("j2woptserviceElementName00")), + new CLOptionDescriptor("servicePortName", + CLOptionDescriptor.ARGUMENT_REQUIRED, + SERVICE_PORT_NAME_OPT, + Messages.getMessage("j2woptservicePortName00")), + new CLOptionDescriptor("namespace", + CLOptionDescriptor.ARGUMENT_REQUIRED, + NAMESPACE_OPT, + Messages.getMessage("j2woptnamespace00")), + new CLOptionDescriptor("PkgtoNS", + CLOptionDescriptor.DUPLICATES_ALLOWED + + CLOptionDescriptor.ARGUMENTS_REQUIRED_2, + PACKAGE_OPT, + Messages.getMessage("j2woptPkgtoNS00")), + new CLOptionDescriptor("methods", + CLOptionDescriptor.DUPLICATES_ALLOWED + + CLOptionDescriptor.ARGUMENT_REQUIRED, + METHODS_ALLOWED_OPT, + Messages.getMessage("j2woptmethods00")), + new CLOptionDescriptor("all", CLOptionDescriptor.ARGUMENT_DISALLOWED, + INHERITED_CLASS_OPT, + Messages.getMessage("j2woptall00")), + new CLOptionDescriptor("outputWsdlMode", + CLOptionDescriptor.ARGUMENT_REQUIRED, + OUTPUT_WSDL_MODE_OPT, + Messages.getMessage("j2woptoutputWsdlMode00")), + new CLOptionDescriptor("locationImport", + CLOptionDescriptor.ARGUMENT_REQUIRED, + LOCATION_IMPORT_OPT, + Messages.getMessage("j2woptlocationImport00")), + new CLOptionDescriptor("namespaceImpl", + CLOptionDescriptor.ARGUMENT_REQUIRED, + NAMESPACE_IMPL_OPT, + Messages.getMessage("j2woptnamespaceImpl00")), + new CLOptionDescriptor("outputImpl", + CLOptionDescriptor.ARGUMENT_REQUIRED, + OUTPUT_IMPL_OPT, + Messages.getMessage("j2woptoutputImpl00")), + new CLOptionDescriptor("implClass", + CLOptionDescriptor.ARGUMENT_REQUIRED, + IMPL_CLASS_OPT, + Messages.getMessage("j2woptimplClass00")), + new CLOptionDescriptor("exclude", + CLOptionDescriptor.DUPLICATES_ALLOWED + + CLOptionDescriptor.ARGUMENT_REQUIRED, + METHODS_NOTALLOWED_OPT, + Messages.getMessage("j2woptexclude00")), + new CLOptionDescriptor("stopClasses", + CLOptionDescriptor.DUPLICATES_ALLOWED + + CLOptionDescriptor.ARGUMENT_REQUIRED, + STOP_CLASSES_OPT, + Messages.getMessage("j2woptstopClass00")), + new CLOptionDescriptor("typeMappingVersion", + CLOptionDescriptor.ARGUMENT_REQUIRED, + TYPEMAPPING_OPT, + Messages.getMessage("j2wopttypeMapping00")), + new CLOptionDescriptor("soapAction", + CLOptionDescriptor.ARGUMENT_REQUIRED, + SOAPACTION_OPT, + Messages.getMessage("j2woptsoapAction00")), + new CLOptionDescriptor("style", CLOptionDescriptor.ARGUMENT_REQUIRED, + STYLE_OPT, Messages.getMessage("j2woptStyle00")), + new CLOptionDescriptor("use", CLOptionDescriptor.ARGUMENT_REQUIRED, + USE_OPT, Messages.getMessage("j2woptUse00")), + new CLOptionDescriptor("extraClasses", + CLOptionDescriptor.DUPLICATES_ALLOWED + + CLOptionDescriptor.ARGUMENT_REQUIRED, + EXTRA_CLASSES_OPT, + Messages.getMessage("j2woptExtraClasses00")), + new CLOptionDescriptor("importSchema", + CLOptionDescriptor.ARGUMENT_OPTIONAL, + IMPORT_SCHEMA_OPT, + Messages.getMessage("j2woptImportSchema00")), + new CLOptionDescriptor("classpath", + CLOptionDescriptor.ARGUMENT_OPTIONAL, + CLASSPATH_OPT, + Messages.getMessage("optionClasspath")) + }; + + /** Field emitter */ + protected Emitter emitter; + + /** Field className */ + protected String className = null; + + /** Field wsdlFilename */ + protected String wsdlFilename = null; + + /** Field wsdlImplFilename */ + protected String wsdlImplFilename = null; + + /** Field namespaceMap */ + protected HashMap namespaceMap = new HashMap(); + + /** Field mode */ + protected int mode = Emitter.MODE_ALL; + + /** Field locationSet */ + boolean locationSet = false; + + /** + * Instantiate a Java2WSDL emitter. + */ + public Ws4J2eeWtihoutWSDLCLOptionParser(String[] args,Emitter emitter) { + this.emitter = emitter; + // Parse the arguments + CLArgsParser argsParser = new CLArgsParser(args, options); + + // Print parser errors, if any + if (null != argsParser.getErrorString()) { + System.err.println( + Messages.getMessage("j2werror00", argsParser.getErrorString())); + printUsage(); + + return; + } + + // Get a list of parsed options + List clOptions = argsParser.getArguments(); + int size = clOptions.size(); + // Parse the options and configure the emitter as appropriate. + for (int i = 0; i < size; i++) { + if (parseOption((CLOption) clOptions.get(i)) == false) { + return; + } + } + + // validate argument combinations + if (validateOptions() == false) { + return ; + } + + // Set the namespace map + if (!namespaceMap.isEmpty()) { + emitter.setNamespaceMap(namespaceMap); + } + if(outPutLocation == null) + outPutLocation = Utils.getRootDirOfFile(wscfFileLocation); + + File file = new File(outPutLocation+"/META-INF"); + if (!file.exists()) + file.mkdirs(); + //the other two files are considered to be at the same directory as the + //wscf file + wjbConfFileLocation = Utils.getRootDirOfFile(wscfFileLocation)+"/ejb-jar.xml"; + webConfFileLocation = Utils.getRootDirOfFile(wscfFileLocation)+"/web.xml"; + } // ctor + + public Ws4J2eeWtihoutWSDLCLOptionParser(Emitter emitter) { + this.emitter = emitter; + emitter.setLocationUrl("http://127.0.0.1"); + } + + + /** + * addOptions + * Add option descriptions to the tool. Allows + * extended classes to add additional options. + * + * @param newOptions CLOptionDescriptor[] the options + */ + protected void addOptions(CLOptionDescriptor[] newOptions) { + + if ((newOptions != null) && (newOptions.length > 0)) { + CLOptionDescriptor[] allOptions = + new CLOptionDescriptor[options.length + newOptions.length]; + + System.arraycopy(options, 0, allOptions, 0, options.length); + System.arraycopy(newOptions, 0, allOptions, options.length, + newOptions.length); + + options = allOptions; + } + } + + /** + * Parse an option + * + * @param option CLOption is the option + * @return + */ + protected boolean parseOption(CLOption option) { + + String value; + boolean status = true; + + switch (option.getId()) { + case CLOption.TEXT_ARGUMENT: + if (wscfFileLocation != null) { + System.out.println( + Messages.getMessage( + "j2wDuplicateClass00", className, + option.getArgument())); + printUsage(); + + status = false; // error + } + + wscfFileLocation = option.getArgument(); + + break; + + case METHODS_ALLOWED_OPT: + emitter.setAllowedMethods(option.getArgument()); + break; + + case INHERITED_CLASS_OPT: + emitter.setUseInheritedMethods(true); + break; + + case IMPL_CLASS_OPT: + emitter.setImplCls(option.getArgument()); + break; + + case HELP_OPT: + printUsage(); + + status = false; + break; + + case OUTPUT_WSDL_MODE_OPT: + String modeArg = option.getArgument(); + + if ("All".equalsIgnoreCase(modeArg)) { + mode = Emitter.MODE_ALL; + } else if ("Interface".equalsIgnoreCase(modeArg)) { + mode = Emitter.MODE_INTERFACE; + } else if ("Implementation".equalsIgnoreCase(modeArg)) { + mode = Emitter.MODE_IMPLEMENTATION; + } else { + mode = Emitter.MODE_ALL; + + System.err.println(Messages.getMessage("j2wmodeerror", + modeArg)); + } + break; + + case OUTPUT_OPT: + outPutLocation = option.getArgument(); + wsdlFilename = option.getArgument(); + break; + + case INPUT_OPT: + emitter.setInputWSDL(option.getArgument()); + break; + + case OUTPUT_IMPL_OPT: + wsdlImplFilename = option.getArgument(); + break; + + case PACKAGE_OPT: + String packageName = option.getArgument(0); + String namespace = option.getArgument(1); + + namespaceMap.put(packageName, namespace); + break; + + case NAMESPACE_OPT: + emitter.setIntfNamespace(option.getArgument()); + break; + + case NAMESPACE_IMPL_OPT: + emitter.setImplNamespace(option.getArgument()); + break; + + case SERVICE_ELEMENT_NAME_OPT: + emitter.setServiceElementName(option.getArgument()); + break; + + case SERVICE_PORT_NAME_OPT: + emitter.setServicePortName(option.getArgument()); + break; + + case LOCATION_OPT: + emitter.setLocationUrl(option.getArgument()); + + locationSet = true; + break; + + case LOCATION_IMPORT_OPT: + emitter.setImportUrl(option.getArgument()); + break; + + case METHODS_NOTALLOWED_OPT: + emitter.setDisallowedMethods(option.getArgument()); + break; + + case PORTTYPE_NAME_OPT: + emitter.setPortTypeName(option.getArgument()); + break; + + case BINDING_NAME_OPT: + emitter.setBindingName(option.getArgument()); + break; + + case STOP_CLASSES_OPT: + emitter.setStopClasses(option.getArgument()); + break; + + case TYPEMAPPING_OPT: + value = option.getArgument(); + + if (value.equals("1.1")) { + emitter.setDefaultTypeMapping( + DefaultTypeMappingImpl.getSingleton()); + } else if (value.equals("1.2")) { + emitter.setDefaultTypeMapping( + DefaultSOAPEncodingTypeMappingImpl.create()); + } else { + System.out.println( + Messages.getMessage("j2wBadTypeMapping00")); + + status = false; + } + break; + + case SOAPACTION_OPT: + value = option.getArgument(); + + if (value.equalsIgnoreCase("DEFAULT")) { + emitter.setSoapAction("DEFAULT"); + } else if (value.equalsIgnoreCase("OPERATION")) { + emitter.setSoapAction("OPERATION"); + } else if (value.equalsIgnoreCase("NONE")) { + emitter.setSoapAction("NONE"); + } else { + System.out.println( + Messages.getMessage("j2wBadSoapAction00")); + + status = false; + } + break; + + case STYLE_OPT: + value = option.getArgument(); + + if (value.equalsIgnoreCase("DOCUMENT") + || value.equalsIgnoreCase("RPC") + || value.equalsIgnoreCase("WRAPPED")) { + emitter.setStyle(value); + } else { + System.out.println(Messages.getMessage("j2woptBadStyle00")); + + status = false; + } + break; + + case USE_OPT: + value = option.getArgument(); + + if (value.equalsIgnoreCase("LITERAL") + || value.equalsIgnoreCase("ENCODED")) { + emitter.setUse(value); + } else { + System.out.println(Messages.getMessage("j2woptBadUse00")); + + status = false; + } + break; + + case EXTRA_CLASSES_OPT: + try { + emitter.setExtraClasses(option.getArgument()); + } catch (ClassNotFoundException e) { + System.out.println(Messages.getMessage("j2woptBadClass00", + e.toString())); + + status = false; + } + break; + + case IMPORT_SCHEMA_OPT: + emitter.setInputSchema(option.getArgument()); + break; + + case CLASSPATH_OPT: + ClassUtils.setDefaultClassLoader(ClassUtils.createClassLoader( + option.getArgument(), + this.getClass().getClassLoader())); + break; + + default : + break; + } + + return status; + } + + /** + * validateOptions + * This method is invoked after the options are set to validate + * the option settings. + * + * @return + */ + protected boolean validateOptions() { + +// // Can't proceed without a class name +// if ((className == null)) { +// System.out.println(Messages.getMessage("j2wMissingClass00")); +// printUsage(); +// +// return false; +// } + + if (!locationSet + && ((mode == Emitter.MODE_ALL) + || (mode == Emitter.MODE_IMPLEMENTATION))) { + System.out.println(Messages.getMessage("j2wMissingLocation00")); + printUsage(); + + return false; + } + + // Default to SOAP 1.2 JAX-RPC mapping + if (emitter.getDefaultTypeMapping() == null) { + emitter.setDefaultTypeMapping( + DefaultTypeMappingImpl.getSingleton()); + } + + return true; // a-OK + } + + + /** + * printUsage + * print usage information and quit. + */ + protected void printUsage() { + + String lSep = System.getProperty("line.separator"); + StringBuffer msg = new StringBuffer(); + + msg.append("Java2WSDL " + + Messages.getMessage("j2wemitter00")).append(lSep); + msg.append( + Messages.getMessage( + "j2wusage00", + "java " + getClass().getName() + + " [options] class-of-portType")).append(lSep); + msg.append(Messages.getMessage("j2woptions00")).append(lSep); + msg.append(CLUtil.describeOptions(options).toString()); + msg.append(Messages.getMessage("j2wdetails00")).append(lSep); + System.out.println(msg.toString()); + } + + /** + * @return + */ + public String getWsdlFilename() { + return wsdlFilename; + } + + /** + * @param string + */ + public void setWsdlFilename(String string) { + wsdlFilename = string; + } + + /** + * @return + */ + public String getClassName() { + return className; + } + + /** + * @param string + */ + public void setClassName(String string) { + className = string; + } + + /** + * @return + */ + public int getMode() { + return mode; + } + + /** + * @return + */ + public String getWsdlImplFilename() { + return wsdlImplFilename; + } + + /** + * @param i + */ + public void setMode(int i) { + mode = i; + } + + /** + * @param string + */ + public void setWsdlImplFilename(String string) { + wsdlImplFilename = string; + } } Index: Ws4J2EEwithoutWSDL.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2EEwithoutWSDL.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Ws4J2EEwithoutWSDL.java 23 May 2004 15:53:26 -0000 1.6 +++ Ws4J2EEwithoutWSDL.java 27 May 2004 15:28:45 -0000 1.7 @@ -58,22 +58,27 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import java.util.Vector; import org.apache.axis.components.logger.LogFactory; +import org.apache.axis.utils.ClassUtils; +import org.apache.axis.wsdl.fromJava.Emitter; import org.apache.commons.logging.Log; import org.apache.geronimo.ews.ws4j2ee.context.ContextFactory; import org.apache.geronimo.ews.ws4j2ee.context.ContextValidator; import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext; +import org.apache.geronimo.ews.ws4j2ee.context.impl.AxisEmitterBasedJaxRpcMapperContext; import org.apache.geronimo.ews.ws4j2ee.context.impl.J2EEWebServiceContextImpl; +import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AxisEmitterBasedWSCFContext; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFContext; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFPortComponent; import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebserviceDescription; +import org.apache.geronimo.ews.ws4j2ee.context.wsdl.impl.AxisEmitterBasedWSDLContext; import org.apache.geronimo.ews.ws4j2ee.parsers.EJBDDParser; import org.apache.geronimo.ews.ws4j2ee.parsers.WebDDParser; import org.apache.geronimo.ews.ws4j2ee.toWs.wsdl.WSDLGenarator; +import org.apache.geronimo.ews.ws4j2ee.utils.JarFileLoader; import org.apache.geronimo.ews.ws4j2ee.utils.Utils; /** @@ -87,21 +92,34 @@ private Vector genarators; private String[] args; private J2EEWebServiceContext wscontext; - private boolean verbose = false; + private boolean verbose = true; private Ws4J2eeWtihoutWSDLCLOptionParser clparser; + private File jarfile; + + private InputStream ejbddin; + private InputStream webddin; + private Emitter emitter; + + public Ws4J2EEwithoutWSDL(){ + emitter = new Emitter(); + } + public Ws4J2EEwithoutWSDL(String[] args, boolean useSEI) throws GenerationFault { + this(); try{ + this.args = args; genarators = new Vector(); + //create the context this.wscontext = new J2EEWebServiceContextImpl(false); this.wscontext.setMiscInfo(ContextFactory.createMiscInfo()); wscontext.getMiscInfo().setVerbose(verbose); //parse the arguments - clparser = new Ws4J2eeWtihoutWSDLCLOptionParser(args); + clparser = new Ws4J2eeWtihoutWSDLCLOptionParser(args,emitter); this.wscffile = clparser.getWSCFFileLocation(); wscontext.getMiscInfo().setWsConfFileLocation(clparser.getOutPutLocation()); wscontext.getMiscInfo().setOutputPath(clparser.getOutPutLocation()); @@ -116,6 +134,29 @@ } } + public Ws4J2EEwithoutWSDL(String jarFile,String outputDirOption) throws GenerationFault { + this(); + jarfile = new File(jarFile); + genarators = new Vector(); + + JarFileLoader jarfileLoader = new JarFileLoader(jarFile); + ejbddin = jarfileLoader.getEjbJarfile(); + webddin = jarfileLoader.getWebddfile(); + + //create the context + this.wscontext = new J2EEWebServiceContextImpl(false); + this.wscontext.setMiscInfo(ContextFactory.createMiscInfo()); + wscontext.getMiscInfo().setVerbose(verbose); + + //parse the arguments + wscontext.getMiscInfo().setWsConfFileLocation(outputDirOption); + wscontext.getMiscInfo().setOutputPath(outputDirOption); + + //create the wscf context + WSCFContext wscfcontext = ContextFactory.createWSCFContext(jarfileLoader.getWscfFile()); + wscontext.setWSCFContext(wscfcontext); + } + /** * genarate. what is genarated is depend on genarators included. * @@ -152,14 +193,51 @@ wscontext.getMiscInfo().setWsdlFile(wsdlFile); wscontext.getMiscInfo().setJaxrpcfile(Utils.getAbsolutePath(wscfwsdis.getJaxrpcMappingFile(),wscontext.getMiscInfo().getOutPutPath())); + File file = new File(wscontext.getMiscInfo().getOutPutPath()+"/META-INF"); + if (!file.exists()) + file.mkdirs(); + //generate the wsdl file + if(jarfile != null){ + ClassUtils.setDefaultClassLoader(ClassUtils.createClassLoader( + jarfile.getAbsolutePath(),this.getClass().getClassLoader())); + } + if (verbose) log.info("calling Java2WSDL to genarated wsdl ..........."); WSDLGenarator wsdlgen = (WSDLGenarator) GeneratorFactory.createGenerator(wscontext, GenerationConstants.WSDL_GENERATOR); - wsdlgen.setArgs(clparser.getArgsforJava2WSDLEmitter(seiName,wsdlFile)); - //other than genarating the WSDL file this will initaite all the contxt's - //and validate the Context. - wsdlgen.genarate(); + + emitter.setLocationUrl("http://127.0.0.1"); + emitter.setServicePortName(port.getWsdlPort().getLocalpart()); + String wsdlImplFilename = null; + int mode = Emitter.MODE_ALL; + if(clparser != null){ + wsdlImplFilename = clparser.getWsdlImplFilename(); + mode = clparser.getMode(); + } + + // Find the class using the name + emitter.setCls(seiName); + // Generate a full wsdl, or interface & implementation wsdls + if (wsdlImplFilename == null) { + emitter.emit(wsdlFile,mode); + } else { + emitter.emit(wsdlFile, wsdlImplFilename); + } + + //initiate the wsdlContext + this.wscontext.setWSDLContext(new AxisEmitterBasedWSDLContext(emitter.getWSDL())); + //parse the ejb-jar.xml here + ContextValidator validator = new ContextValidator(wscontext); + //initiate the jaxrpcmapping context + this.wscontext.setJAXRPCMappingContext(new AxisEmitterBasedJaxRpcMapperContext(emitter, wscontext)); + //initiate the wscf context + this.wscontext.setWSCFContext(new AxisEmitterBasedWSCFContext(emitter, wscontext)); + //validate the j2ee context + validator.validateWithOutWSDL(emitter); + + + // everything is good if (verbose) log.info("genarating jaxrpc-mapper.xml .............."); Generator jaxrpcfilegen = GeneratorFactory.createGenerator(wscontext, @@ -175,7 +253,7 @@ //remove the repeting SEI. TODO is this required to remove or not String repeatingSEIName = wscontext.getMiscInfo().getOutPutPath()+"/"+seiName.replace('.','/')+".java"; - File file = new File(repeatingSEIName); + file = new File(repeatingSEIName); if(file.exists()){ file.delete(); System.out.println(repeatingSEIName + " deleted.............."); @@ -184,13 +262,16 @@ if(ejbLink != null){ wscontext.getMiscInfo().setEjbName(ejbLink); EJBDDParser ejbDDparser = new EJBDDParser(wscontext); - file = new File(clparser.getEjbConfFileLocation()); - InputStream ejbddin; - if(file.exists()){ - ejbddin = new FileInputStream(file); - }else{ - ejbddin = Ws4J2EEwithoutWSDL.class.getResourceAsStream("META-INF/ejb-jar.xml"); + + if(ejbddin == null){ + file = new File(clparser.getEjbConfFileLocation()); + if(file.exists()){ + ejbddin = new FileInputStream(file); + }else{ + ejbddin = Ws4J2EEwithoutWSDL.class.getResourceAsStream("META-INF/ejb-jar.xml"); + } } + if (ejbddin != null) { ejbDDparser.parse(ejbddin); ejbddin.close(); @@ -206,11 +287,12 @@ //parse the web.xml file and gereratre wrapper WebDDParser webddp = new WebDDParser(wscontext); file = new File(clparser.getWebConfFileLocation()); - InputStream webddin = null; - if(file.exists()){ - webddin = new FileInputStream(file); - }else{ - webddin = Ws4J2EEwithoutWSDL.class.getResourceAsStream("META-INF/web.xml"); + if(webddin == null){ + if(file.exists()){ + webddin = new FileInputStream(file); + }else{ + webddin = Ws4J2EEwithoutWSDL.class.getResourceAsStream("META-INF/web.xml"); + } } if(webddin != null){ webddp.parse(webddin); @@ -223,7 +305,8 @@ GenerationConstants.AXIS_WEBSERVICE_WRAPPER_GENERATOR); wrapgen.genarate(); - } catch (IOException e) { + } catch (Exception e) { + e.printStackTrace(); throw GenerationFault.createGenerationFault(e); } } @@ -241,7 +324,16 @@ * @throws Exception */ public static void main(String[] args) throws Exception { - Ws4J2EEwithoutWSDL gen = new Ws4J2EEwithoutWSDL(args, false); + Ws4J2EEwithoutWSDL gen = null; + if(args.length == 1){ + //means a jar file option given + gen = new Ws4J2EEwithoutWSDL(args[0],"-o."); + }else if(args.length == 2){ + //means jar file option and output dir given + gen = new Ws4J2EEwithoutWSDL(args[0],args[1]); + }else{ + gen = new Ws4J2EEwithoutWSDL(args,false); + } gen.genarate(); } } |
From: Srinath P. <hem...@us...> - 2004-05-27 15:26:50
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ejb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20839 Modified Files: SessionBeanWriter.java EJBDDWriter.java Log Message: add code to support the j2ee 1,3 and 1,4 ejb-jar.xml file generation (limited) Index: SessionBeanWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/SessionBeanWriter.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SessionBeanWriter.java 30 Mar 2004 10:40:18 -0000 1.6 +++ SessionBeanWriter.java 27 May 2004 15:26:34 -0000 1.7 @@ -63,10 +63,48 @@ import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault; import org.apache.geronimo.ews.ws4j2ee.toWs.JavaClassWriter; + /** - * This class can be used to write the appropriate SessionBean - * class for the given port type. - * + * <p>This class can be used to write the appropriate SessionBean + * class for the given port type. + * A Stateless Session Bean, as defined by the Enterprise JavaBeans specification, + * can be used to implement a Web service to be deployed in the EJB container. + * A Stateless Session Bean does not have to worry about multi-threaded access. + * The EJB container is required to serialize request flow through any particular + * instance of a Service Implementation Bean. The requirements for creating a Service + * Implementation Bean as a Stateless Session EJB are repeated in part here.</p> + * <ol> + * <li>The Service Implementation Bean must have a default public constructor.</li> + * <li>The Service Implementation Bean may implement the Service Endpoint Interface, + * but it is not required to do so. The bean must implement all the method + * signatures of the SEI.<li> + * <li>The Service Implementation Bean methods are not required to throw + * javax.rmi.RemoteException. The business methods of the bean must be public + * and must not be final or static. It may implement other methods in addition + * to those defined by the SEI.</li> + * <li>A Service Implementation Bean must be a stateless object. + * A Service Implementation Bean must not save client specific state + * across method calls either within the bean instances data members or + * external to the instance.</li> + * <li>The class must be public, must not be final and must not be abstract.</li> + * <li>The class must not define the finalize() method.</li> + * <li>Currently, it must implement the ejbCreate() and ejbRemove() methods which + * take no arguments. This is a requirement of the EJB container, but generally + * can be stubbed out with an empty implementation.</li> + * <li>Currently, a Stateless Session Bean must implement the javax.ejb.SessionBean + * interface either directly or indirectly. This interface allows the container to notify the Service Implementation Bean of impending changes in its state. The full requirements of this interface are defined in the Enterprise JavaBeans specification section 7.5.1.</li> + * <li>The Enterprise JavaBeans specification section 7.8.2 defines the allowed + * container service access requirements.</li> + * </ol> + * <h5>Exposing an existing EJB</h5> + * <p>An existing Enterprise JavaBean may be used as a Service Implementation Bean if it meets the following requirements:</p> + * <ol> + * <li>The business methods of the EJB bean class that are exposed on the SEI must meet the Service</li> + * <li>Implementation Bean requirements defined in section 5.3.1.</li> + * <li>The SEI must meet the requirements described in the JAX-RPC specification for Service Endpoint Interfaces.</li> + * <li>The transaction attributes of the SEI methods must not include Mandatory.</li> + * <li>The developer must package the Web service as described in section 5.4 and must specify an ejb-link from the port in the Web services deployment descriptor to the existing EJB.</li> + * <ol> * @author Rajith Priyanga * @author Srinath Perera * @date Nov 26, 2003 Index: EJBDDWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- EJBDDWriter.java 30 Mar 2004 10:40:18 -0000 1.5 +++ EJBDDWriter.java 27 May 2004 15:26:34 -0000 1.6 @@ -100,10 +100,20 @@ if(index>0){ ejbname = ejbname.substring(index+1); } + String version = GenerationConstants.J2EE_VERSION_1_4; + version = GenerationConstants.getProperties() + .getProperty(GenerationConstants.WS4J2EE_PROVIDER); + out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); - out.write("<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>\n"); - out.write("<ejb-jar>\n"); + if(version == GenerationConstants.J2EE_VERSION_1_4){ + out.write("<ejb-jar xmlns=\"http://java.sun.com/xml/ns/j2ee\">\n"); + }else{ + out.write("<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>\n"); + out.write("<ejb-jar>\n"); + } + + out.write("<display-name>" + j2eewscontext.getMiscInfo().getWscfdWsDesxription().getDisplayName() + "</display-name>\n"); out.write("\t<enterprise-beans>\n"); out.write("\t\t<session>\n"); |
From: Srinath P. <hem...@us...> - 2004-05-27 15:23:10
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20319 Modified Files: Utils.java Added Files: AntExecuter.java JarFileLoader.java Log Message: add Ant file exexutor and jar file loader to generate code from jar file input Index: Utils.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Utils.java 23 May 2004 15:53:29 -0000 1.6 +++ Utils.java 27 May 2004 15:23:00 -0000 1.7 @@ -901,7 +901,12 @@ int index = file.lastIndexOf('/'); if(index < 0) index = file.lastIndexOf('\\'); - return file.substring(0, index); + if(index>-1){ + return file.substring(0, index); + }else{ + return file; + } + } } --- NEW FILE: JarFileLoader.java --- /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.geronimo.ews.ws4j2ee.utils; import java.io.IOException; import java.io.InputStream; import java.util.jar.JarFile; import java.util.zip.ZipEntry; import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault; /** * @author hemapani */ public class JarFileLoader { private InputStream wscfFile; private InputStream webddfile; private InputStream ejbJarfile; private JarFile jar; public JarFileLoader(String jarFile) throws GenerationFault{ try{ System.out.println("found jar file "+jarFile); jar = new JarFile(jarFile); wscfFile = getInputStreamForJarEntry(jarFile,"META-INF/webservice.xml"); webddfile = getInputStreamForJarEntry(jarFile,"META-INF/web.xml"); ejbJarfile = getInputStreamForJarEntry(jarFile,"META-INF/ejb-jar.xml"); if(wscfFile == null) throw new GenerationFault("wscf file must not be null"); } catch (IOException e) { e.printStackTrace(); throw new GenerationFault(e); } } public InputStream getInputStreamForJarEntry(String jarFile,String path) throws GenerationFault{ try { ZipEntry zentry = jar.getEntry(path); if(zentry!= null){ return jar.getInputStream(zentry); }else{ return null; } } catch (IOException e) { e.printStackTrace(); throw new GenerationFault(e); } } public void loadtheClassesInJarFile()throws GenerationFault{ } /** * @return */ public InputStream getEjbJarfile() { return ejbJarfile; } /** * @return */ public InputStream getWebddfile() { return webddfile; } /** * @return */ public InputStream getWscfFile() { return wscfFile; } /** * @param stream */ public void setEjbJarfile(InputStream stream) { ejbJarfile = stream; } /** * @param stream */ public void setWebddfile(InputStream stream) { webddfile = stream; } /** * @param stream */ public void setWscfFile(InputStream stream) { wscfFile = stream; } } --- NEW FILE: AntExecuter.java --- /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.geronimo.ews.ws4j2ee.utils; import java.io.IOException; import java.util.Enumeration; import java.util.Properties; import org.apache.axis.utils.ClassUtils; /** * @author hemapani */ public class AntExecuter { private String buildFile = "build.xml"; public void execute(String buildFile){ org.apache.tools.ant.Main.main(new String[]{"-f",buildFile}); } public static void main(String[] args) throws IOException{ AntExecuter ex = new AntExecuter(); // System.setProperty("ant.home","C:/ANT/jakarta-ant-1.5"); // String path = System.getProperty("java.class.path"); // path = path +";"+ "H:\\j2sdk1.4.1_01\\lib\\tools.jar"; // System.setProperty("java.class.path",path); Properties p = System.getProperties(); // ClassUtils.setDefaultClassLoader(ClassUtils.createClassLoader( // "H:\\j2sdk1.4.1_01\\lib\\tools.jar", // ex.getClass().getClassLoader())); ClassLoader cl = ClassUtils.createClassLoader("H:/j2sdk1.4.1_01/lib/tools.jar",ClassLoader.getSystemClassLoader()); org.apache.tools.ant.Main.start(new String[]{"-f","target/generated/samples/withWSDL/server/google/build.xml"}, null,cl); //org.apache.tools.ant.Main.main(new String[]{"-f","target/generated/samples/withWSDL/server/google/build.xml"}); Enumeration e = p.keys(); while(e.hasMoreElements()){ String key = (String)e.nextElement(); System.out.println(key + "= " + System.getProperty(key)); } //Runtime.getRuntime().exec("ant -f target/generated/samples/withWSDL/server/google/build.xml"); } } |
From: Srinath P. <hem...@us...> - 2004-05-26 15:05:15
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/jaxrpcmapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13564 Modified Files: J2eeGeneratorFactory.java Added Files: J2eeDeployWriter.java Log Message: Change the provider to print the java:j2ee rather than java:RPC when the enviorment varibale presents Index: J2eeGeneratorFactory.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/jaxrpcmapping/J2eeGeneratorFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- J2eeGeneratorFactory.java 26 Feb 2004 13:04:45 -0000 1.5 +++ J2eeGeneratorFactory.java 26 May 2004 15:04:59 -0000 1.6 @@ -59,6 +59,27 @@ * */ +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Vector; + +import javax.wsdl.Binding; +import javax.wsdl.Definition; +import javax.wsdl.Fault; +import javax.wsdl.Message; +import javax.wsdl.Operation; +import javax.wsdl.OperationType; +import javax.wsdl.Port; +import javax.wsdl.PortType; +import javax.wsdl.Service; +import javax.xml.namespace.QName; +import javax.xml.rpc.holders.BooleanHolder; + import org.apache.axis.encoding.DefaultTypeMappingImpl; import org.apache.axis.encoding.TypeMapping; import org.apache.axis.utils.JavaUtils; @@ -83,33 +104,12 @@ import org.apache.axis.wsdl.toJava.Emitter; import org.apache.axis.wsdl.toJava.JavaBindingWriter; import org.apache.axis.wsdl.toJava.JavaDefinitionWriter; -import org.apache.axis.wsdl.toJava.JavaDeployWriter; import org.apache.axis.wsdl.toJava.JavaGeneratorFactory; import org.apache.axis.wsdl.toJava.JavaServiceWriter; import org.apache.axis.wsdl.toJava.JavaTypeWriter; import org.apache.axis.wsdl.toJava.JavaUndeployWriter; import org.apache.axis.wsdl.toJava.Utils; -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.Fault; -import javax.wsdl.Message; -import javax.wsdl.Operation; -import javax.wsdl.OperationType; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.xml.namespace.QName; -import javax.xml.rpc.holders.BooleanHolder; -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Vector; - /** * This is WsdlToJ2ee's implementation of the GeneratorFactory * @@ -177,7 +177,8 @@ protected void addDefinitionGenerators() { addGenerator(Definition.class, JavaDefinitionWriter.class); // for faults - addGenerator(Definition.class, JavaDeployWriter.class); // for deploy.wsdd + //addGenerator(Definition.class, JavaDeployWriter.class); // for deploy.wsdd + addGenerator(Definition.class, J2eeDeployWriter.class); // for deploy.wsdd addGenerator(Definition.class, JavaUndeployWriter.class); // for undeploy.wsdd } // addDefinitionGenerators --- NEW FILE: J2eeDeployWriter.java --- /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.geronimo.ews.jaxrpcmapping; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Vector; import javax.wsdl.Binding; import javax.wsdl.BindingOperation; import javax.wsdl.Definition; import javax.wsdl.Operation; import javax.wsdl.OperationType; import javax.wsdl.Port; import javax.wsdl.Service; import javax.wsdl.extensions.UnknownExtensibilityElement; import javax.wsdl.extensions.soap.SOAPBinding; import javax.xml.namespace.QName; import org.apache.axis.Constants; import org.apache.axis.deployment.wsdd.WSDDConstants; import org.apache.axis.enum.Scope; import org.apache.axis.enum.Style; import org.apache.axis.enum.Use; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.Messages; import org.apache.axis.wsdl.toJava.Emitter; import org.apache.axis.wsdl.symbolTable.BindingEntry; import org.apache.axis.wsdl.symbolTable.CollectionTE; import org.apache.axis.wsdl.symbolTable.Element; import org.apache.axis.wsdl.symbolTable.FaultInfo; import org.apache.axis.wsdl.symbolTable.Parameter; import org.apache.axis.wsdl.symbolTable.Parameters; import org.apache.axis.wsdl.symbolTable.SchemaUtils; import org.apache.axis.wsdl.symbolTable.SymbolTable; import org.apache.axis.wsdl.symbolTable.TypeEntry; import org.apache.axis.wsdl.toJava.JavaWriter; import org.apache.axis.wsdl.toJava.Utils; import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants; /** * This is Wsdl2java's deploy Writer. It writes the deploy.wsdd file. */ public class J2eeDeployWriter extends JavaWriter { /** Field definition */ protected Definition definition; /** Field symbolTable */ protected SymbolTable symbolTable; /** * Constructor. * * @param emitter * @param definition * @param symbolTable */ public J2eeDeployWriter(Emitter emitter, Definition definition, SymbolTable symbolTable) { super(emitter, "deploy"); this.definition = definition; this.symbolTable = symbolTable; } // ctor /** * Generate deploy.wsdd. Only generate it if the emitter * is generating server-side mappings. * * @throws IOException */ public void generate() throws IOException { if (emitter.isServerSide()) { super.generate(); } } // generate /** * Return the fully-qualified name of the deploy.wsdd file * to be generated. * * @return */ protected String getFileName() { String dir = emitter.getNamespaces().getAsDir(definition.getTargetNamespace()); return dir + "deploy.wsdd"; } // getFileName /** * Replace the default file header with the deployment doc file header. * * @param pw * @throws IOException */ protected void writeFileHeader(PrintWriter pw) throws IOException { pw.println(Messages.getMessage("deploy00")); pw.println(Messages.getMessage("deploy02")); pw.println(Messages.getMessage("deploy03")); pw.println(Messages.getMessage("deploy05")); pw.println(Messages.getMessage("deploy06")); pw.println(Messages.getMessage("deploy07")); pw.println(Messages.getMessage("deploy09")); pw.println(); pw.println("<deployment"); pw.println(" xmlns=\"" + WSDDConstants.URI_WSDD + "\""); pw.println(" xmlns:" + WSDDConstants.NS_PREFIX_WSDD_JAVA + "=\"" + WSDDConstants.URI_WSDD_JAVA + "\">"); } // writeFileHeader /** * Write the body of the deploy.wsdd file. * * @param pw * @throws IOException */ protected void writeFileBody(PrintWriter pw) throws IOException { writeDeployServices(pw); pw.println("</deployment>"); } // writeFileBody /** * Write out deployment and undeployment instructions for each WSDL service * * @param pw * @throws IOException */ protected void writeDeployServices(PrintWriter pw) throws IOException { // deploy the ports on each service Map serviceMap = definition.getServices(); for (Iterator mapIterator = serviceMap.values().iterator(); mapIterator.hasNext();) { Service myService = (Service) mapIterator.next(); pw.println(); pw.println( " <!-- " + Messages.getMessage( "wsdlService00", myService.getQName().getLocalPart()) + " -->"); pw.println(); for (Iterator portIterator = myService.getPorts().values().iterator(); portIterator.hasNext();) { Port myPort = (Port) portIterator.next(); BindingEntry bEntry = symbolTable.getBindingEntry(myPort.getBinding().getQName()); // If this isn't an SOAP binding, skip it if (bEntry.getBindingType() != BindingEntry.TYPE_SOAP) { continue; } writeDeployPort(pw, myPort, myService, bEntry); } } } // writeDeployServices /** * Write out bean mappings for each type * * @param pw * @param binding * @param hasLiteral * @param hasMIME * @param use * @throws IOException */ protected void writeDeployTypes( PrintWriter pw, Binding binding, boolean hasLiteral, boolean hasMIME, Use use) throws IOException { pw.println(); if (hasMIME) { QName bQName = binding.getQName(); writeTypeMapping( pw, bQName.getNamespaceURI(), "DataHandler", "javax.activation.DataHandler", "org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory", "org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory", use.getEncoding()); } Map types = symbolTable.getTypeIndex(); Collection typeCollection = types.values(); for (Iterator i = typeCollection.iterator(); i.hasNext(); ) { TypeEntry type = (TypeEntry) i.next(); // Note this same check is repeated in JavaStubWriter. boolean process = true; // 1) Don't register types that are base (primitive) types. // If the baseType != null && getRefType() != null this // is a simpleType that must be registered. // 2) Don't register the special types for collections // (indexed properties) or element types // 3) Don't register types that are not referenced // or only referenced in a literal context. if (((type.getBaseType() != null) && (type.getRefType() == null)) || (type instanceof CollectionTE) || (type instanceof Element) || !type.isReferenced() || type.isOnlyLiteralReferenced()) { process = false; } if (process) { String namespaceURI = type.getQName().getNamespaceURI(); String localPart = type.getQName().getLocalPart(); String javaType = type.getName(); String serializerFactory; String deserializerFactory; String encodingStyle = ""; if (!hasLiteral) { encodingStyle = use.getEncoding(); } if (javaType.endsWith("[]")) { if (SchemaUtils.isListWithItemType(type.getNode())) { serializerFactory = "org.apache.axis.encoding.ser.SimpleListSerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.SimpleListDeserializerFactory"; } else { serializerFactory = "org.apache.axis.encoding.ser.ArraySerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.ArrayDeserializerFactory"; } } else if ((type.getNode() != null) && (Utils.getEnumerationBaseAndValues( type.getNode(), symbolTable) != null)) { serializerFactory = "org.apache.axis.encoding.ser.EnumSerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.EnumDeserializerFactory"; } else if (type.isSimpleType()) { serializerFactory = "org.apache.axis.encoding.ser.SimpleSerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.SimpleDeserializerFactory"; } else if (type.getBaseType() != null) { serializerFactory = "org.apache.axis.encoding.ser.SimpleSerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.SimpleDeserializerFactory"; } else { serializerFactory = "org.apache.axis.encoding.ser.BeanSerializerFactory"; deserializerFactory = "org.apache.axis.encoding.ser.BeanDeserializerFactory"; } writeTypeMapping(pw, namespaceURI, localPart, javaType, serializerFactory, deserializerFactory, encodingStyle); } } } // writeDeployTypes /** * Raw routine that writes out the typeMapping. * * @param pw * @param namespaceURI * @param localPart * @param javaType * @param serializerFactory * @param deserializerFactory * @param encodingStyle * @throws IOException */ protected void writeTypeMapping( PrintWriter pw, String namespaceURI, String localPart, String javaType, String serializerFactory, String deserializerFactory, String encodingStyle) throws IOException { pw.println(" <typeMapping"); pw.println(" xmlns:ns=\"" + namespaceURI + "\""); pw.println(" qname=\"ns:" + localPart + '"'); pw.println(" type=\"java:" + javaType + '"'); pw.println(" serializer=\"" + serializerFactory + "\""); pw.println(" deserializer=\"" + deserializerFactory + "\""); pw.println(" encodingStyle=\"" + encodingStyle + "\""); pw.println(" />"); } /** * Write out deployment and undeployment instructions for given WSDL port * * @param pw * @param port * @param service * @param bEntry * @throws IOException */ protected void writeDeployPort( PrintWriter pw, Port port, Service service, BindingEntry bEntry) throws IOException { String serviceName = port.getName(); boolean hasLiteral = bEntry.hasLiteral(); boolean hasMIME = Utils.hasMIME(bEntry); String prefix = WSDDConstants.NS_PREFIX_WSDD_JAVA; String styleStr = ""; Use use = Use.DEFAULT; Iterator iterator = bEntry.getBinding().getExtensibilityElements().iterator(); //get the Name of the provider needed in the deploy.wsdd Properties pro = new Properties(); String provider = null; File file = new File("src/conf/"+GenerationConstants.WS4J2EE_PROPERTY_FILE); if(file.exists()){ InputStream ws4j2eein = new FileInputStream(file); pro.load(ws4j2eein); provider = pro.getProperty(GenerationConstants.WS4J2EE_PROVIDER); } while (iterator.hasNext()) { Object obj = iterator.next(); if (obj instanceof SOAPBinding) { use = Use.ENCODED; } else if (obj instanceof UnknownExtensibilityElement) { // TODO: After WSDL4J supports soap12, change this code UnknownExtensibilityElement unkElement = (UnknownExtensibilityElement) obj; QName name = unkElement.getElementType(); if (name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP) && name.getLocalPart().equals("binding")) { use = Use.ENCODED; } } } if (symbolTable.isWrapped()) { styleStr = " style=\"" + Style.WRAPPED + "\""; use = Use.LITERAL; } else { styleStr = " style=\"" + bEntry.getBindingStyle().getName() + "\""; if (hasLiteral) { use = Use.LITERAL; } } String useStr = " use=\"" + use + "\""; if(provider!= null){ pw.println(" <service name=\"" + serviceName + "\" provider=\"" + provider + "\"" + styleStr + useStr + ">"); }else{ pw.println(" <service name=\"" + serviceName + "\" provider=\"" + prefix + ":RPC" + "\"" + styleStr + useStr + ">"); } pw.println(" <parameter name=\"wsdlTargetNamespace\" value=\"" + service.getQName().getNamespaceURI() + "\"/>"); pw.println(" <parameter name=\"wsdlServiceElement\" value=\"" + service.getQName().getLocalPart() + "\"/>"); pw.println(" <parameter name=\"wsdlServicePort\" value=\"" + serviceName + "\"/>"); // MIME attachments don't work with multiref, so turn it off. if (hasMIME) { pw.println( " <parameter name=\"sendMultiRefs\" value=\"false\"/>"); } writeDeployBinding(pw, bEntry); writeDeployTypes(pw, bEntry.getBinding(), hasLiteral, hasMIME, use); pw.println(" </service>"); } // writeDeployPort /** * Write out deployment instructions for given WSDL binding * * @param pw * @param bEntry * @throws IOException */ protected void writeDeployBinding(PrintWriter pw, BindingEntry bEntry) throws IOException { Binding binding = bEntry.getBinding(); String className = bEntry.getName(); if (emitter.isSkeletonWanted()) { className += "Skeleton"; } else { className += "Impl"; } pw.println(" <parameter name=\"className\" value=\"" + className + "\"/>"); pw.println(" <parameter name=\"wsdlPortType\" value=\"" + binding.getPortType().getQName().getLocalPart() + "\"/>"); HashSet allowedMethods = new HashSet(); if (!emitter.isSkeletonWanted()) { Iterator operationsIterator = binding.getBindingOperations().iterator(); for (; operationsIterator.hasNext();) { BindingOperation bindingOper = (BindingOperation) operationsIterator.next(); Operation operation = bindingOper.getOperation(); OperationType type = operation.getStyle(); String javaOperName = JavaUtils.xmlNameToJava(operation.getName()); // These operation types are not supported. The signature // will be a string stating that fact. if ((type == OperationType.NOTIFICATION) || (type == OperationType.SOLICIT_RESPONSE)) { continue; } allowedMethods.add(javaOperName); // We pass "" as the namespace argument because we're just // interested in the return type for now. Parameters params = symbolTable.getOperationParameters(operation, "", bEntry); if (params != null) { // Get the operation QName QName elementQName = Utils.getOperationQName(bindingOper, bEntry, symbolTable); // Get the operation's return QName and type QName returnQName = null; QName returnType = null; if (params.returnParam != null) { returnQName = params.returnParam.getQName(); returnType = Utils.getXSIType(params.returnParam); } // Get the operations faults Map faultMap = bEntry.getFaults(); ArrayList faults = null; if (faultMap != null) { faults = (ArrayList) faultMap.get(bindingOper); } // Write the operation metadata writeOperation(pw, javaOperName, elementQName, returnQName, returnType, params, binding.getQName(), faults); } } } pw.print(" <parameter name=\"allowedMethods\" value=\""); if (allowedMethods.isEmpty()) { pw.println("*\"/>"); } else { boolean first = true; for (Iterator i = allowedMethods.iterator(); i.hasNext();) { String method = (String) i.next(); if (first) { pw.print(method); first = false; } else { pw.print(" " + method); } } pw.println("\"/>"); } Scope scope = emitter.getScope(); if (scope != null) { pw.println(" <parameter name=\"scope\" value=\"" + scope.getName() + "\"/>"); } } // writeDeployBinding /** * Raw routine that writes out the operation and parameters. * * @param pw * @param javaOperName * @param elementQName * @param returnQName * @param returnType * @param params * @param bindingQName * @param faults */ protected void writeOperation(PrintWriter pw, String javaOperName, QName elementQName, QName returnQName, QName returnType, Parameters params, QName bindingQName, ArrayList faults) { pw.print(" <operation name=\"" + javaOperName + "\""); if (elementQName != null) { pw.print(" qname=\"" + Utils.genQNameAttributeString(elementQName, "operNS") + "\""); } if (returnQName != null) { pw.print(" returnQName=\"" + Utils.genQNameAttributeStringWithLastLocalPart(returnQName, "retNS") + "\""); } if (returnType != null) { pw.print(" returnType=\"" + Utils.genQNameAttributeString(returnType, "rtns") + "\""); } if ((params.returnParam != null) && params.returnParam.isOutHeader()) { pw.print(" returnHeader=\"true\""); } pw.println(" >"); Vector paramList = params.list; for (int i = 0; i < paramList.size(); i++) { Parameter param = (Parameter) paramList.elementAt(i); // Get the parameter name QName and type QName QName paramQName = param.getQName(); QName paramType = Utils.getXSIType(param); pw.print(" <parameter"); if ((paramQName == null) || "".equals(paramQName.getNamespaceURI())) { pw.print(" name=\"" + param.getName() + "\""); } else { pw.print(" qname=\"" + Utils.genQNameAttributeStringWithLastLocalPart(paramQName, "pns") + "\""); } pw.print(" type=\"" + Utils.genQNameAttributeString(paramType, "tns") + "\""); // Get the parameter mode if (param.getMode() != Parameter.IN) { pw.print(" mode=\"" + getModeString(param.getMode()) + "\""); } // Is this a header? if (param.isInHeader()) { pw.print(" inHeader=\"true\""); } if (param.isOutHeader()) { pw.print(" outHeader=\"true\""); } pw.println("/>"); } if (faults != null) { for (Iterator iterator = faults.iterator(); iterator.hasNext();) { FaultInfo faultInfo = (FaultInfo) iterator.next(); QName faultQName = faultInfo.getQName(); if (faultQName != null) { String className = Utils.getFullExceptionName(faultInfo.getMessage(), symbolTable); pw.print(" <fault"); pw.print(" name=\"" + faultInfo.getName() + "\""); pw.print(" qname=\"" + Utils.genQNameAttributeString(faultQName, "fns") + "\""); pw.print(" class=\"" + className + "\""); pw.print( " type=\"" + Utils.genQNameAttributeString( faultInfo.getXMLType(), "tns") + "\""); pw.println("/>"); } } } pw.println(" </operation>"); } /** * Method getModeString * * @param mode * @return */ public String getModeString(byte mode) { if (mode == Parameter.IN) { return "IN"; } else if (mode == Parameter.INOUT) { return "INOUT"; } else { return "OUT"; } } /** * Method getPrintWriter * * @param filename * @return * @throws IOException */ protected PrintWriter getPrintWriter(String filename) throws IOException { File file = new File(filename); File parent = new File(file.getParent()); parent.mkdirs(); FileOutputStream out = new FileOutputStream(file); OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8"); return new PrintWriter(writer); } } // class JavaDeployWriter |
From: <ben...@id...> - 2004-05-25 07:47:59
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
From: Srinath P. <hem...@us...> - 2004-05-24 16:16:16
|
Update of /cvsroot/ews/ews/src/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18637 Modified Files: userGuide.html Log Message: update and specify the requirements for the SEI and service impl bean Index: userGuide.html =================================================================== RCS file: /cvsroot/ews/ews/src/docs/userGuide.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- userGuide.html 23 May 2004 15:36:16 -0000 1.2 +++ userGuide.html 24 May 2004 16:16:06 -0000 1.3 @@ -24,5 +24,80 @@ <p>look at the org.apache.geronimo.ews.ws4j2ee.GenerateWithoutWSDLTest</p> +<h2>Appendix</h2> +<h3>Service Endpoint Interface</h3> +<p>The JAX-RPC specification requires that a JAX-RPC service endpoint interface must +follow the following rules:</p> + <ol> + <li>Service endpoint interface must extend java.rmi.Remote either directly or indirectly</li> + <li>All methods in the interface must throw java.rmi.RemoteException. Methods may + throw service specific exceptions in addition to the RemoteException.</li> + <li>Method parameters and return types must be the JAX-RPC supported Java types + (refer to the section 5.1, JAX-RPC Supported Java Types). At runtime, values of a + supported Java type must be serializable to and from the corresponding XML + representation. + </li> + <li>Holder classes may be used as method parameters. These Holder classes are either + generated or those packaged in the standard javax.xml.rpc.holders package.</li> + <li>Service endpoint interface must not include constant (as public final static) + declarations. WSDL 1.1 specification does not define any standard representation for + constants in a wsdl:portType definition.</li> + </ol> + + <h3>Service Implementation Bean</h3> +<h4>The Stateless Service Implementation Session Bean.</h4> +<p>A Stateless Session Bean, as defined by the Enterprise JavaBeans specification, +can be used to implement a Web service to be deployed in the EJB container. +A Stateless Session Bean does not have to worry about multi-threaded access. +The EJB container is required to serialize request flow through any particular +instance of a Service Implementation Bean. The requirements for creating a Service +Implementation Bean as a Stateless Session EJB are repeated in part here.</p> + <ol> + <li>The Service Implementation Bean must have a default public constructor.</li> + <li>The Service Implementation Bean may implement the Service Endpoint Interface, + but it is not required to do so. The bean must implement all the method + signatures of the SEI.<li> + <li>The Service Implementation Bean methods are not required to throw + javax.rmi.RemoteException. The business methods of the bean must be public + and must not be final or static. It may implement other methods in addition + to those defined by the SEI.</li> + <li>A Service Implementation Bean must be a stateless object. + A Service Implementation Bean must not save client specific state + across method calls either within the bean instances data members or + external to the instance.</li> + <li>The class must be public, must not be final and must not be abstract.</li> + <li>The class must not define the finalize() method.</li> + <li>Currently, it must implement the ejbCreate() and ejbRemove() methods which + take no arguments. This is a requirement of the EJB container, but generally + can be stubbed out with an empty implementation.</li> + <li>Currently, a Stateless Session Bean must implement the javax.ejb.SessionBean + interface either directly or indirectly. This interface allows the container to notify the Service Implementation Bean of impending changes in its state. The full requirements of this interface are defined in the Enterprise JavaBeans specification section 7.5.1.</li> + <li>The Enterprise JavaBeans specification section 7.8.2 defines the allowed + container service access requirements.</li> + </ol> + + <h5>Exposing an existing EJB</h5> + <p>An existing Enterprise JavaBean may be used as a Service Implementation Bean if it meets the following requirements:</p> + <ol> + <li>The business methods of the EJB bean class that are exposed on the SEI must meet the Service</li> + <li>Implementation Bean requirements defined in section 5.3.1.</li> + <li>The SEI must meet the requirements described in the JAX-RPC specification for Service Endpoint Interfaces.</li> + <li>The transaction attributes of the SEI methods must not include Mandatory.</li> + <li>The developer must package the Web service as described in section 5.4 and must specify an ejb-link from the port in the Web services deployment descriptor to the existing EJB.</li> + </ol> + + <h4>WebEndpoint Based Serivce Implementation Bean</h4> + <p>The Service Implementation Bean must follow the Service Developer requirements outlined in the JAX-RPC specification and are listed below except as noted.</p> + <ol> + <li>?The Service Implementation Bean must have a default public constructor.</li> + <li>?The Service Implementation Bean may implement the Service Endpoint Interface as defined by the JAX-RPC Servlet model. The bean must implement all the method signatures of the SEI. In addition, a Service Implementation Bean may be implemented that does not implement the SEI. This additional requirement provides the same SEI implementation flexibility as provided by EJB service endpoints. The business methods of the bean must be public and must not be static.</li> + <li>If the Service Implementation Bean does not implement the SEI, the business methods must not be final. The Service Implementation Bean may implement other methods in addition to those defined by the SEI, but only the SEI methods are exposed to the client. </li> + <li>?A Service Implementation must be a stateless object. A Service Implementation Bean must not save client specific state across method calls either within the bean instances data members or external to the instance. A container may use any bean instance to service a request.</li> + <li>?The class must be public, must not be final and must not be abstract.</li> + <li>?The class must not define the finalize() method.</li> + </ol> + + +</ol> </body> </html> \ No newline at end of file |
From: Srinath P. <hem...@us...> - 2004-05-23 15:54:17
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11616/context/wsdl Modified Files: WSDLContext.java Log Message: fix the code handle the service referance in the DD and refactor the code and comment it Index: WSDLContext.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/WSDLContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- WSDLContext.java 4 Feb 2004 04:29:52 -0000 1.2 +++ WSDLContext.java 23 May 2004 15:53:25 -0000 1.3 @@ -82,6 +82,7 @@ * <li>do not have WSDL</li> * </ul> * <p>if some method is not requried please throw java.lang.UnsupportedOperationException</p> + * @author Srinath Perera(hem...@op...) */ public interface WSDLContext { /** |
From: Srinath P. <hem...@us...> - 2004-05-23 15:54:17
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/geronimo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11616/toWs/dd/geronimo Modified Files: GeronimoDDWriter.java Log Message: fix the code handle the service referance in the DD and refactor the code and comment it Index: GeronimoDDWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/geronimo/GeronimoDDWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GeronimoDDWriter.java 2 Feb 2004 15:27:50 -0000 1.1 +++ GeronimoDDWriter.java 23 May 2004 15:53:27 -0000 1.2 @@ -1,4 +1,59 @@ -package org.apache.geronimo.ews.ws4j2ee.toWs.dd.geronimo; +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Axis" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */ + + package org.apache.geronimo.ews.ws4j2ee.toWs.dd.geronimo; /** * @author hemapani |
From: Srinath P. <hem...@us...> - 2004-05-23 15:54:17
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11616/context/wsdl/impl Modified Files: AxisEmitterBasedWSDLContext.java AxisWSDLContext.java Log Message: fix the code handle the service referance in the DD and refactor the code and comment it Index: AxisWSDLContext.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/impl/AxisWSDLContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- AxisWSDLContext.java 22 Mar 2004 12:05:32 -0000 1.4 +++ AxisWSDLContext.java 23 May 2004 15:53:26 -0000 1.5 @@ -81,7 +81,7 @@ * <p>This Class is a wrapper fo the Axis SymbolTable. Since SymbolTable is parsed * completly it is not editable so the methods will throw the * UnsupportedOperationException.</p> - * + * @see org.apache.geronimo.ews.ws4j2ee.context.wsdl.WSDLContext * @author Srinath Perera(hem...@op...) */ public class AxisWSDLContext implements WSDLContext { Index: AxisEmitterBasedWSDLContext.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/context/wsdl/impl/AxisEmitterBasedWSDLContext.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- AxisEmitterBasedWSDLContext.java 22 Mar 2004 12:05:32 -0000 1.3 +++ AxisEmitterBasedWSDLContext.java 23 May 2004 15:53:26 -0000 1.4 @@ -76,7 +76,7 @@ * <p>This Class is a wrapper fo the Axis SymbolTable. Since SymbolTable is parsed * completly it is not editable so the methods will throw the * UnsupportedOperationException.</p> - * + * @see org.apache.geronimo.ews.ws4j2ee.context.wsdl.WSDLContext * @author Srinath Perera(hem...@op...) */ public class AxisEmitterBasedWSDLContext implements WSDLContext { |
From: Srinath P. <hem...@us...> - 2004-05-23 15:54:13
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/jonas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11616/toWs/dd/jonas Modified Files: JOnASDDWriter.java Log Message: fix the code handle the service referance in the DD and refactor the code and comment it Index: JOnASDDWriter.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/jonas/JOnASDDWriter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- JOnASDDWriter.java 30 Mar 2004 10:40:18 -0000 1.3 +++ JOnASDDWriter.java 23 May 2004 15:53:27 -0000 1.4 @@ -1,3 +1,57 @@ +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Axis" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */ package org.apache.geronimo.ews.ws4j2ee.toWs.dd.jonas; import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext; |
From: Srinath P. <hem...@us...> - 2004-05-23 15:54:12
|
Update of /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11616/toWs/dd Modified Files: J2EEContainerSpecificDDGenerator.java WebContainerDDGenerator.java WebServiceDDGenarator.java Log Message: fix the code handle the service referance in the DD and refactor the code and comment it Index: WebContainerDDGenerator.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/WebContainerDDGenerator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- WebContainerDDGenerator.java 30 Mar 2004 10:40:18 -0000 1.1 +++ WebContainerDDGenerator.java 23 May 2004 15:53:27 -0000 1.2 @@ -1,4 +1,57 @@ -package org.apache.geronimo.ews.ws4j2ee.toWs.dd; +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Axis" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */package org.apache.geronimo.ews.ws4j2ee.toWs.dd; import org.apache.axis.components.logger.LogFactory; import org.apache.commons.logging.Log; Index: J2EEContainerSpecificDDGenerator.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/J2EEContainerSpecificDDGenerator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- J2EEContainerSpecificDDGenerator.java 22 Mar 2004 12:05:33 -0000 1.5 +++ J2EEContainerSpecificDDGenerator.java 23 May 2004 15:53:27 -0000 1.6 @@ -1,3 +1,57 @@ +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Axis" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */ package org.apache.geronimo.ews.ws4j2ee.toWs.dd; import org.apache.axis.components.logger.LogFactory; Index: WebServiceDDGenarator.java =================================================================== RCS file: /cvsroot/ews/ews/src/java/org/apache/geronimo/ews/ws4j2ee/toWs/dd/WebServiceDDGenarator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WebServiceDDGenarator.java 19 Feb 2004 10:32:07 -0000 1.3 +++ WebServiceDDGenarator.java 23 May 2004 15:53:27 -0000 1.4 @@ -68,7 +68,7 @@ /** * This class genarate the webservice.xml file. * - * @author hemapani + * @author Srinath Perera(hem...@op...) */ public class WebServiceDDGenarator implements Generator { private J2EEWebServiceContext j2eewscontext; @@ -91,5 +91,4 @@ throw GenerationFault.createGenerationFault(e); } } - } |