You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ews-dev@ws.apache.org by gu...@apache.org on 2005/08/08 14:42:47 UTC

svn commit: r230793 [2/12] - in /webservices/ews/trunk/ws4j2ee: ./ docs/ docs/images/ docs/src/ samples/ samples/clients/ samples/ejb/ samples/ejb/bookquote/ samples/ejb/bookquote/META-INF/ samples/ejb/bookquote/com/ samples/ejb/bookquote/com/jwsbook/ ...

Added: webservices/ews/trunk/ws4j2ee/docs/security.html
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/security.html?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/security.html (added)
+++ webservices/ews/trunk/ws4j2ee/docs/security.html Mon Aug  8 05:40:25 2005
@@ -0,0 +1,348 @@
+<html>
+<head>
+<title>EWS Security</title>
+ <link rel="stylesheet" type="text/css" href="ews.css"> 
+</head>
+<body>
+<H1> EWS Security </H1>
+<h2> Introduction</h2>
+The EWS security is a security framework that spread across the web services domain and J2EE domain, and facilitate a secure environment for the EWS user
+
+
+<h2> Design Considerations</h2>
+There were some design guide lines that shaped up the design and implementation of EWS security.
+
+<br/>
+<br/>
+<li><b>Loosely Coupled with the Service Implementation</b>
+<br/>
+<ol>
+The security providing classes should not be tightly coupled with the clients applications or with the service implementation classes at Axis or J2EE application server.
+<br/>Therefore service deployers will be able to change their security policies without modifying any of their service implementation classes. They will only have to modify the configuration file at
+the Axis server.In other words the set of security providing classes should be a pluggable module. Their functionality should be well defined so that users can write their own security providers use them
+to provide security.
+</ol>
+<br/>
+<li><b>Adaptability to New Requirements and Technologies</b>
+<br/>
+<ol>
+Web Service security is still a growing area of technology. After the Web Service Security specification was published some other specifications related to WS-Security has been introduced.
+(e.g. SAML) And also the Web Service for J2EE is a very new area. Therefore when it becomes more popular, there is a high probability for new requirements to emerge. Security requirement specification
+may also be added with new requirements. Therefore the design and the implementation of Security providers should be able to adapt to the emerging technologies and new requirements.
+</ol>
+<br/>
+<li><b>Use Existing Technologies and the Programming Model</b>
+<br/>
+<ol>
+WSS4J is an implementation of WS-Security specification. In future, it is going to be used by almost all the Web Service deployers on java platform to secure their web services. Open source
+community has put a significant effort on developing this utility project. Therefore reusing its components will make the implementation of Security for J2EE Web Services, easier and
+compliant with latest versions of the specifications. WSS4J has introduced a programming model for implementing the WS-Security specification to provide security to the SOAP based web services. i.e., the security related information is added to
+the SOAP messages by handlers and that security information available in the SOAP messages will be processed also by handlers at the other side. These handlers are configured by the
+properties set at the deployment descriptors. Handlers at receiving sides, stores the results obtained by processing the Security headers, in a well defined data structure and register it with the SOAP MessageContext. Then any other
+handler or ContextAccessible web service can access the results through the MessageContext.Therefore in the implementation of security mapping for Web Services for J2EE, a programming
+model similar to that of WSS4J should be used in implementing the Web Service side of it. Then there wont be difficulties in reusing the WSS4J classes. Also the users and developers of the
+J2EE Web Services, who are already familiar with the WSS4J model, will be able to easily work with this implementation.
+
+</ol>
+<br/>
+<li><b>Uses the Existing Configuration Files</b>
+<br/>
+<ol>
+The JSR 109 specification says that it should define the minimal set of new concepts, interfaces,
+file formats, etc. necessary to support Web services within J2EE.
+Therefore the configuration of security services should also be done in existing configuration files.
+<br/>E.g.
+<ol>
+Client Side : client-config.wsdd
+<br/>Server Side : At deployment  Webservices.xml
+<br/>At run time  server-config.wsdd
+</ol>
+</ol>
+<br/>
+<li><b>J2EE like Programming Model</b>
+<br/>
+<ol>
+Providing a J2EE like programming model for service developers is an underlying requirement of the implementation of JSR 109. When a user deploys an EJB or a Servlet in a J2EE container, user doesnt have to bother about writing the security implementations for the service. All the issues regarding providing the
+security, are taken care by the J2EE container itself. User has just to specify the level and type of security he/she needs. But the user should be able to customize the security services. Similar to that model, when a user deploys a Web Service for J2EE, user should be released form
+the issues regarding the implementation for providing security. User should be able to have the level and type of the security he/she needs, just by specifying those in the deployment descriptor.And these entries that should put in to the deployment descriptor should follow the existing formats if possible in order to avoid the complexity of the deployment.
+
+</ol>
+<br/>
+<li><b>Implementation Transparency to the Web Service Client</b>
+<br/>
+<ol>
+One of the important service deployment goals of JSR109 is, how the Web service has been
+implemented should be transparent to the Web service client. A client should not have to know if
+the Web service has been deployed in a J2EE or non-J2EE environment. In other word the
+backend J2EE components behind the web services should be transparent to the web services
+client.
+When invoking an enterprise Web Service, an information exchange occurs. The path of this
+information exchange is circular. Half of this path is in Web Service domain and the other half is
+in the J2EE domain.<br/>
+ <img src="images/overall.jpg"/>
+<br/>
+For the security implementation to be transparent, web service client
+should see the enterprise web service as a web service implementation that require WS Security
+authentication and credentials for authentication at some server, and the EJB container should see the enterprise web service call as if it is coming
+from a EJB client who is willing to authenticate itself in the normal J2EE authentication manner.
+
+</ol>
+
+
+<h2>Approach</h2>
+
+EWS talks about two possible types of java artifacts implementing the webservic; POJO and the ejb. Since POJO has been already handled by the AXIS, major attention is given to the ejb. Obviously the ejb is deployed in a J2EE server and is secured under the security requirements defined in the the EJB and J2EE specification.
+<br/>
+The WSS4J provides a set of security services for the SOAP based web services, which, are
+defined in the WS-Security specification. This implementation can be used to meet the security
+requirements at Web Service Domain when pursuing the enterprise web services security
+requirements.
+<br/>
+The J2EE component, in this case an enterprise java bean, will reside in the application server and it is exposed as a web service to the potential client. So the intuitive solution will be to get the credentials from the web service client and some how transport it securely on top of SOAP/HTTP and produce those credentials to the EJB container and authenticate the web service client to the EJB container. So when the web service client eventually invoke the web service, the enterprise web service runtime will invoke the relevant enterprise java bean method and by the time the web service client has already authenticated itself to the EJB container. So there will be no issue in authorization unless of
+course the authentication fails or the authenticated principle doesnt posses sufficient clearance to
+call the method.
+<br/>
+<img src="images/auth.png"/>
+<br/>
+
+Above diagram try to give an abstract picture of the solution and it has a nice architecture too. It
+shows at the client end when the web service request is sent with credentials it will be converted
+to a method call and a credential inside the SOAP engine and will try to do the EJB call. If
+credentials are not accurate the authentication will fail and if credentials are accurate the method
+call will happen and the response will be sent back to the client.
+
+
+<h2> The Challenge</h2>
+
+In the above diagram it shows that there is a necessity for secure communication between web
+services client and the SOAP engine for the purpose of credential propagation. The
+communication between web service client and SOAP engine is done using SOAP/HTTP. So it is appropriate to use a web services security implementation for this purpose.
+
+The web services part
+has the WS security model and the J2EE part has the J2EE security model. So the biggest
+challenge would be to map the two security models in such a way that, in the context of security,
+the EJB container should be transparent to the web services client and web services client should
+be transparent to the EJB container. In other words, when it comes to security, web service client
+should see the enterprise web service as a web service implementation that require WS Security
+authentication, and the EJB container should see the enterprise web service call as if it is coming
+from a EJB client who is willing to authenticate itself in the normal manner.
+<br/>
+<img src="images/bridge.png"/>
+<br/>
+Keeping in mind that the enterprise web services comprise of two major subsections, the web
+services subsection and the J2EE subsection; both these subsections have its own security
+contexts independently. The web service part will have its WS-Security context that is being
+maintained with the use of WSS4J, the Apache WS-Security implementation. On the other hand
+the EJB container is responsible for enforcing access control on the enterprise bean method. It
+consults the security policy (derived from the deployment descriptor) associated with the
+enterprise bean to determine the security roles that are permitted access to the method. For each role, the EJB container uses the security context associated with the call to determine if it can
+map the caller to the role.
+<br>
+So as the above diagram shows the requirement is a security bridge that can use the Security
+context of one Security model and to do a lossless translation of it to the other Security model.
+The JAAS (Java Authentication and Authorization Service) is capable of playing the role of the
+security bridge, as required for this case.
+
+
+<h2>Implementation</h2>
+As described in the above sections information flows through two domains, when accessing J2EE Web Services.
+Those two domains have there own security infrastructures. Therefore the implementation has to
+do 3 man tasks.
+<ol>
+<li>Provide Security at Web Service domain
+<li>Provide Security at J2EE platform.
+<li>Map the Security Services of one domain to the other.
+</ol>
+In order to perform these tasks, the implementation has two separate modules namely,
+<ol>
+<li>Axis side Security module
+<li> J2EE side Security module
+</ol>
+Axis side module provides the web service security and brings the clients security information to
+a format that can be handed over to the J2EE side Security module.
+Then the J2EE side Security module, uses the above mentioned security information to ensure the
+security at J2EE container.
+<br>
+<br>
+<br>
+<h2>Axis side Security Module</h2>
+This sub module performs the following tasks.
+
+<br>
+<br>
+<li>Provides Client side Security handlers for Java clients to add security to the SOAP
+requests.
+
+
+<li>Provide Server side Security handlers to process the security information available in the
+SOAP requests.
+
+
+<li>Provides Server side Security handlers to add security to the SOAP responses.
+
+
+<li>Provides Client side Security handlers for java clients to process the security information
+in the SOAP responses.
+
+
+<li>Retrieves the security information required at J2EE domain, from the SOAP Security
+headers and HTTP headers.
+
+
+<li>Publishes the retrieved information in an object called SecurityContext4J2EE, in a
+way that JAAS modules can easily retrieve that information and ensure the security at
+J2EE.
+
+
+<li>Defines the entry formats of the configuration files and customizes the general handlers
+at both client side and server side, according to the configurations.
+
+<br/>
+<img src="images/wss.png"/>
+<br/>
+
+
+<br/><br/><b><li>Security Senders</b><br/><br/>
+Same set of Security handlers to add security information to the SOAP messages, can be used at
+both Client side and the Server side. At client side they are configured by the client-config.wsdd
+configuration file. At Axis server side they are configured by the server-config.wsdd
+configuration file. When these security senders are used at client side the clients may not know
+that the implementation of the web service they are invoking, is at a J2EE container. Clients can
+use their own handlers to add the required security information to the SOAP requests instead of
+using the following. As long as they are compliant with the BASIC-HTTP authentication and
+WS-Security standards, these SOAP requests can be processed accurately by the server side
+security handlers.
+Axis side Security module provides following handlers to add security to the SOAP messages.
+BasicAuth4J2EESender
+As the name implies BasicAuth4J2EE provides only the authentication services.
+This handler adds the credentials of the sender (Username Password pair) to the HTTP(S) header.
+The credentials to be added are fetched from the sender using an instance of the
+javax.security.auth.Callback object set by the configuration file.
+Since the credentials are in the HTTP header as a Base 64 encoded string, this type of
+authentication service should be used only when the transport level security is available (i.e.
+HTTPS/SSL).
+<br/><br/><b><li>SimpleWSS4J2EESender</b><br/><br/>
+
+SimpleWSS4J2EESender also provides only the authentication service. But it follows the WSSecurity
+specification. This handler adds a Security header with a UsernameToken element to the
+SOAP header. It can have either the username and password text or username and password
+digest along with the nonce and created values.To fetch the senders credentials to be added to the SOAP header, this also uses an instance of the
+javax.security.auth.Callback object set by the configuration file.
+If the sender uses PasswordText format to send the password, transport level security should be
+available. The SOAP security header added by this handler can be processed by any handler
+compliant to the WS-Security specification.
+<br/><br/><b><li>WSDoAllSender</b><br/><br/>
+
+This is a WSS4J handler without any kind of modification. This can be used to add all the
+security services supported by the WS-Security specification. This handler is customized by the
+entries of the configuration file.
+<br/><br/><b><li>Security Receivers</b><br/><br/>
+
+There are two sets of Security Receivers. One set is to be used at Axis server side and the other
+set is to be used at the client side.
+Axis server side handlers are configured by the server-config.wsdd configuration file.
+Client side handlers are configured by the client-config.wsdd configuration file.
+If the security processing at any of these handlers fails, it breaks the execution flow and throws
+and exception.
+Axis side Security module provides the following handlers to process and retrieve the security
+information at the Axis server.
+<br/><br/><b><li>BasicAuth4J2EEReceiver</b><br/><br/>
+
+This is the server side counter part of BasicAuth4J2EESender handler. Service deployer can set a
+flag at the configuration file to specify whether the authentication is done at both the Axis and
+J2EE application server or only at J2EE application server.
+According to the above flag this processes the HTTP header and retrieves the credentials sent by
+the client. Then a javax.security.auth.Callback object which encapsulates the above
+credentials, is created. Then it is stored in the SecurityContext4J2EE object at the Axis
+MessageContext.
+If this security service is used the transport level security should be available (HTTPS/SSL).
+<br/><br/><b><li>SimpleWSS4J2EEReceiver</b><br/><br/>
+
+This is the server side counter part of SimpleWSS4J2EESender handler. Service deployer can
+set a flag at the configuration file to specify whether the authentication is done at both the Axis
+and J2EE application server or only at J2EE application server.
+According to the above flag this processes the SOAP security header and retrieves the credentials
+sent by the client. Then a javax.security.auth.Callback object which encapsulates the
+above credentials, is created. Then it is stored in the SecurityContext4J2EE object at the
+Axis MessageContext.
+If this security service is used with the PasswordText mode instead of the PasswordDigest mode,
+the transport level security should be available (HTTPS/SSL).
+<br/><br/><b><li>AllSecurity4J2EEReciever</b><br/><br/>
+
+This is the server side counter part of the WSDoAllSender handler. Same as before the service
+deployer can set a flag at the configuration file to specify whether the authentication is done at
+both the Axis and J2EE application server or only at J2EE application server.
+This processes the all types of security tokens defined by the WS-Security specification. The
+security tokens are processed by the following order.
+<ol>
+<li>Signature Verification
+<li>Decryption
+<li>UsernameToken Processing
+</ol><br>
+Signature Verification and the Decryption are done similar to WSS4J. Since the Encryption and
+Signing the Message content is a part of the Web Service domain, those operations are done at
+Axis. The information required to do those operations should be available to Axis via property
+files. These property files are set at the deployment descriptors. But the authentication can be
+done at any of the two domains or at both domains.
+When processing the UsernameToken element, according to the above mentioned
+AuhenticationAtAxis flag, this processes the SOAP security header and retrieves the credentials
+sent by the client. Then a javax.security.auth.Callback object which encapsulates the
+above credentials, is created. Then it is stored in the SecurityContext4J2EE object at the
+Axis MessageContext.
+As the client side security receivers, clients can use WSS4J handlers. Since Basic Authentication
+and WSSUsernameToken type security is not going to be used at the response flow, there is no
+need for a client side counter part for the appropriate senders. At the response flow, in order to
+handle decryption and the signature verification at client side, WSDoAllReciever can be used as
+it is. Configuration of this handler can be done via client-config.wsdd itself. Relevant information
+needed to the processing the headers should be provided via property files.
+
+<h2>J2EE side Security module</h2>
+
+The J2EE side security module is basically concerned in implementing the Security Bridge implementation that will bridge the WSS Security Context to the J2EE Security Context.
+<br>
+The Axis side security module will deliver the web service client credentials to the Axis SOAP
+Engine. Once the Credentials reach the Axis SOAP Engine the WS-Security context will be
+available to the application encapsulated in the
+org.apache.ews.context.security.SecurityContext4J2EE object. Then it is
+necessary to use the security domain bridge (JAAS) to do the eventual bridging of the WSSecurity
+context to J2EE Security context.
+<br>
+<br/>
+ <img src="images/sequ.png"/>
+<br/>
+<br/>
+
+As the sequence diagram illustrate the J2EE side of the enterprise web services security
+implementation start at the Axis Soap Engine, due to the simple reason that the Axis SOAP
+engine is the J2EE client for the application server. The Axis side security module is responsible
+for populating the SecurityContext4J2EE (WS Security Context explained above) with the
+credentials, etc and registering it with the MessageContext of the web service. This occurs in
+the Axis Security Handler.
+<br>
+The actual bridging of the security context occurs in the wrapper web service inside the Axis
+Soap Engine. The wrapper web service will get the CallbackHandler from the SecurityContext and will instantiate the
+javax.security.auth.login.LoginContext as a preparation for JAAS
+authentication.
+<br/>
+<br/>
+<ol>LoginContext lc = new LoginContext("SomeLoginModule", handler);</ol>
+<br/>
+Then the wrapper web service will simply call the login() method of the LoginContext. At
+this point the JAAS module will call the callback handlers<br/>
+<ol>handle(Callback[] callbacks)</ol><br/>
+method and get the credentials. Now the application can call any EJB method that would require
+authentication. At the time of the method call the JAAS will propagate the Subject (the public
+credential and the private credential) of the user to the EJB container for authentication at the EJB
+container itself.<br/>
+
+<br/>
+The solution described above is a standard code library independent of the application server. The
+reason behind such declaration is that the code base does not posses any server specific modules.
+The discussed implementation so far is concerned with the enterprise web services runtime and
+client side and server side WS-Security related modules. But there are other requirements that
+should be met at the application server side at the deployment time. These requirements include
+setting up security domains and defining JAAS login modules for the selected security domains.
+Such a JAAS Security Manager implementation is container specific. This Code library has been tested on the JBoss Application server and this document will be updated as and when it is tested on Geronimo.
+
+
+</body>

Added: webservices/ews/trunk/ws4j2ee/docs/src/ejb-jar.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/ejb-jar.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/ejb-jar.xml (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/ejb-jar.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar>
+<display-name>math</display-name>
+	<enterprise-beans>
+		<session>
+			<display-name>BookQuoteService</display-name>
+			<ejb-name>MathFace</ejb-name>
+			<home>testData.math.MathFaceHome</home>
+			<remote>testData.math.MathFace</remote>
+			<ejb-class>testData.math.MathFaceImpl</ejb-class>
+			<session-type>Stateless</session-type>
+			<transaction-type>Bean</transaction-type>
+		</session
+>	</enterprise-beans>
+</ejb-jar>

Added: webservices/ews/trunk/ws4j2ee/docs/src/list1.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/list1.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/list1.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/list1.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,43 @@
+package com.jwsbook.jaxrpc;
+public class BookQuoteBindingImpl  implements com.jwsbook.jaxrpc.BookQuote,org.apache.geronimo.ews.ws4j2ee.wsutils.ContextAccssible{
+private com.jwsbook.jaxrpc.BookQuoteEJB ejb = null;
+private org.apache.axis.MessageContext msgcontext;
+	public BookQuoteBindingImpl(){}
+	public void setMessageContext(org.apache.axis.MessageContext msgcontext){;
+		this.msgcontext = msgcontext;
+	}
+	public com.jwsbook.jaxrpc.BookQuoteEJB getRemoteRef()throws org.apache.axis.AxisFault{
+		try {
+		if(msgcontext == null){
+				msgcontext = org.apache.axis.MessageContext.getCurrentContext();
+		}
+		    javax.security.auth.callback.CallbackHandler handler
+		        = org.apache.geronimo.ews.ws4j2ee.wsutils.security.jaasmodules.
+		            AutenticationCallbackHandlerFactory.createCallbackHandler(msgcontext);
+		    if(handler != null){
+		        javax.security.auth.login.LoginContext lc
+		            = new javax.security.auth.login.LoginContext("TestClient", handler);
+		        lc.login();
+		    }
+		}catch (javax.security.auth.login.LoginException e) {
+		     e.printStackTrace();
+		     throw org.apache.axis.AxisFault.makeFault(e);
+		}
+		try{
+			java.util.Properties env = org.apache.geronimo.ews.ws4j2ee.wsutils.PropertyLoader.loadProperties("jndi.properties");
+			javax.naming.Context initial = new javax.naming.InitialContext(env);
+			Object objref = initial.lookup("ejb/bookquote");
+			com.jwsbook.jaxrpc.BookQuoteHome home = 
+				(com.jwsbook.jaxrpc.BookQuoteHome)javax.rmi.PortableRemoteObject.narrow(objref,com.jwsbook.jaxrpc.BookQuoteHome.class);
+			return home.create();
+		}catch (Exception e) {
+		    throw org.apache.axis.AxisFault.makeFault(e);
+		}
+	}
+	public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException,com.jwsbook.jaxrpc.InvalidIsbnException{
+		if(ejb ==  null)
+			ejb = getRemoteRef();
+		return ejb.getBookPrice(isbn);
+	}
+}
+

Added: webservices/ews/trunk/ws4j2ee/docs/src/list2.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/list2.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/list2.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/list2.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,37 @@
+package com.jwsbook.jaxrpc;
+public class BookQuoteBindingImpl  implements com.jwsbook.jaxrpc.BookQuote,org.apache.geronimo.ews.ws4j2ee.wsutils.ContextAccssible{
+private com.jwsbook.jaxrpc.BookQuoteEJB ejb = null;
+private org.apache.axis.MessageContext msgcontext;
+	public BookQuoteBindingImpl(){}
+	public void setMessageContext(org.apache.axis.MessageContext msgcontext){;
+		this.msgcontext = msgcontext;
+	}
+	public com.jwsbook.jaxrpc.BookQuoteEJB getRemoteRef()throws org.apache.axis.AxisFault{
+		try {
+		    javax.security.auth.callback.CallbackHandler handler
+		        = org.apache.geronimo.ews.ws4j2ee.wsutils.security.jaasmodules.
+		            AutenticationCallbackHandlerFactory.createCallbackHandler(msgcontext);
+		    if(handler != null){
+		        javax.security.auth.login.LoginContext lc
+		            = new javax.security.auth.login.LoginContext("TestClient", handler);
+		        lc.login();
+		    }
+		}catch (javax.security.auth.login.LoginException e) {
+		     e.printStackTrace();
+		     throw org.apache.axis.AxisFault.makeFault(e);
+		}
+		try{
+			javax.naming.Context initial = new javax.naming.InitialContext();
+			Object objref = jndiContext.lookup("java:comp/env/ejb/"bookquote);
+			com.jwsbook.jaxrpc.BookQuoteHome home = (com.jwsbook.jaxrpc.BookQuoteHome)objref;
+			return home.create();
+		}catch (Exception e) {
+		    throw org.apache.axis.AxisFault.makeFault(e);
+		}
+	}
+	public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException,com.jwsbook.jaxrpc.InvalidIsbnException{
+		if(ejb ==  null)
+			ejb = getRemoteRef();
+		return ejb.getBookPrice(isbn);
+	}
+}

Added: webservices/ews/trunk/ws4j2ee/docs/src/list3.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/list3.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/list3.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/list3.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,31 @@
+package com.jwsbook.jaxrpc;
+public class BookQuoteBindingImpl  implements com.jwsbook.jaxrpc.BookQuote{
+	private com.jwsbook.jaxrpc.BookQuote bean = null;
+	private org.openejb.EJBContainer container;
+	public BookQuoteBindingImpl(){
+		String containerID = "com.jwsbook.jaxrpc.BookQuoteBean";
+		org.openejb.ContainerIndex index = org.openejb.ContainerIndex.getInstance();
+		this.container = index.getContainer(containerID);
+	}
+	public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException,com.jwsbook.jaxrpc.InvalidIsbnException{
+		java.lang.reflect.Method callMethod = org.apache.geronimo.ews.ws4j2ee.utils.Utils.getJavaMethod("com.jwsbook.jaxrpc.BookQuote","getBookPrice");
+		ContainerIndex index = ContainerIndex.getInstance();
+
+            int length = index.length();
+
+            for(int i = 0;i<length;i++){
+                EJBContainer contianer = index.getContainer(i);
+                if(contianer!= null){
+                String name = contianer.getEJBName();
+                if("BasicStatelessBean".equals(name)){
+                  Class bean = Class.forName("org.openejb.test.stateless.BasicStatelessBean");		            Object[] arguments = new Object[]{isbn};
+                  try{
+                      Object result = container.invoke(callMethod, arguments, null);
+  		          return ((java.lang.Float)result).floatValue();
+                  }catch(Throwable e){
+                      throw new org.apache.geronimo.ews.ws4j2ee.wsutils.J2EEFault(e);
+	            }
+              }	
+            }
+	}
+}

Added: webservices/ews/trunk/ws4j2ee/docs/src/list4.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/list4.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/list4.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/list4.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,4 @@
+package com.jwsbook.jaxrpc;
+public interface BookQuote extends java.rmi.Remote {
+public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException, 			com.jwsbook.jaxrpc.InvalidIsbnFault;
+}

Added: webservices/ews/trunk/ws4j2ee/docs/src/list5.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/list5.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/list5.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/list5.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,17 @@
+package com.jwsbook.jaxrpc;
+import java.rmi.RemoteException;
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+public class BookQuoteBean implements SessionBean{
+	
+public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException{
+	return 100;
+}
+public BookQuoteBean() {}
+public void ejbCreate() {}
+public void ejbActivate() throws EJBException, RemoteException {}
+public void ejbPassivate() throws EJBException, RemoteException {}
+public void ejbRemove() throws EJBException, RemoteException {}
+public void setSessionContext(SessionContext arg0)
+	throws EJBException, RemoteException {}
+}

Added: webservices/ews/trunk/ws4j2ee/docs/src/run.txt
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/run.txt?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/run.txt (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/run.txt Mon Aug  8 05:40:25 2005
@@ -0,0 +1,17 @@
+JAX-RPC-MAPPER
+==============
+written by Ias (iasandcb@tmax.co.kr)
+
+command-line:
+java -classpath target/ews-1.0.jar;target/lib/*.jar 
+org.apache.ws.ews.mapper.WsdlToJ2ee
+target_wsdl
+-m jax-rpc-mapping_file
+-o output_dir
+
+example:
+java -classpath target/ews-1.0.jar;target/lib/*.jar 
+org.apache.ws.ews.mapper.WsdlToJ2ee
+BookQuote.wsdl
+-m BookQuote.xml
+-o generated

Added: webservices/ews/trunk/ws4j2ee/docs/src/service-ref1.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/service-ref1.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/service-ref1.xml (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/service-ref1.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,15 @@
+<service-ref xmlns="http://java.sun.com/xml/ns/j2ee">
+     <service-ref-name>service/Joe</service-ref-name>
+     <service-interface>javax.xml.rpc.Service</service-interface>
+     <wsdl-file>WEB-INF/joe.wsdl</wsdl-file>
+     <jaxrpc-mapping-file>WEB-INF/joe.xml</jaxrpc-mapping-file>
+     <service-qname></service-qname>
+     <port-component-ref>
+         <service-endpoint-interface>sample.Joe</service-endpoint-interface>
+         <port-component-link>JoePort</port-component-link>
+     </port-component-ref>
+     <handler>
+         <handler-name></handler-name>
+         <handler-class></handler-class>
+     </handler>
+</service-ref>
\ No newline at end of file

Added: webservices/ews/trunk/ws4j2ee/docs/src/web.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/web.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/web.xml (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/web.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,8 @@
+  <web-app>
+	  <display-name>Apache-Axis</display-name> 
+	  <servlet>
+		  <servlet-name>MathFace</servlet-name> 
+		  <display-name>MathFace Servlet</display-name> 
+		  <servlet-class>testData.math.MathFaceImpl</servlet-class> 
+	  </servlet>
+  </web-app>
\ No newline at end of file

Added: webservices/ews/trunk/ws4j2ee/docs/src/webservice.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/src/webservice.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/src/webservice.xml (added)
+++ webservices/ews/trunk/ws4j2ee/docs/src/webservice.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xmlns:ns1="http://www.Monson-Haefel.com/jwsbook/BookQuote"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/standards/xml/webservices/j2ee/j2ee_web_services_1_1.xsd" version="1.1">
+<webservice-description>
+	<webservice-description-name>MathFaceService</webservice-description-name>
+	<wsdl-file>math.wsdl</wsdl-file>
+	<jaxrpc-mapping-file>jaxrpc-mapping.xml</jaxrpc-mapping-file>
+	<port-component>
+		<port-component-name>MathFace</port-component-name>
+		<wsdl-port xmlns:ns1="http://math.testData">ns1:math</wsdl-port>
+		<service-endpoint-interface>testData.math.MathFace</service-endpoint-interface>
+		<service-impl-bean>
+			<ejb-link >MathFace</ejb-link>
+		</service-impl-bean>
+	</port-component>
+	</webservice-description>
+</webservices>

Added: webservices/ews/trunk/ws4j2ee/docs/transaction.html
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/transaction.html?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/transaction.html (added)
+++ webservices/ews/trunk/ws4j2ee/docs/transaction.html Mon Aug  8 05:40:25 2005
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>Transaction</title>
+ <link rel="stylesheet" type="text/css" href="ews.css"> 
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file

Added: webservices/ews/trunk/ws4j2ee/docs/userGuide.html
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/userGuide.html?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/userGuide.html (added)
+++ webservices/ews/trunk/ws4j2ee/docs/userGuide.html Mon Aug  8 05:40:25 2005
@@ -0,0 +1,123 @@
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="ews.css">
+</head>
+<body>
+<h1>Using the Ws4J2ee tool</h1>
+
+<code>org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2ee module [-o out-dir]</code>
+
+<p>EWS tool accept a module (jar,war,ear file) as explained by the WebService for J2EE specification
+and generate Axis specific artifacts for deploy a J2EE Web service inside a J2EE contianer. 
+Axis Geronimo module support the deployment of the generated artifacts inside the Geronimo container.
+For Other J2EE continers users have to deploy the artifacts manually.
+</p>
+
+<h2>Content of the Module</h2>
+<p>
+	<ol>
+		<li>webservices.xml file</li>
+		<li>SEI(class file)</li>
+		<li>Implementation bean(class file)</li>
+		<li>ejb-jar.xml/web.xml file</li>
+		<li>(optional wsdl file and jaxrpcmapping file/both or none) 
+	</ol>
+</p>
+
+<h2>Packaging</h2>
+<h3>ejb based Jar file</h3>
+<pre> 
+	/-META-INF/webservice.xml
+	 -META-INF/ejb-jar.xml
+         -SEI class
+         -service implementation bean class
+         -any other referance classes
+</pre>
+<h3>Web based jar file</h3>
+<pre> 
+	/-META-INF/webservice.xml
+	 -META-INF/web.xml
+         -SEI class
+         -service implementation bean class
+         -any other referance classes
+</pre>
+
+
+
+<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 instance’s 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 instance’s 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

Added: webservices/ews/trunk/ws4j2ee/docs/ws4j2ee.html
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/docs/ws4j2ee.html?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/docs/ws4j2ee.html (added)
+++ webservices/ews/trunk/ws4j2ee/docs/ws4j2ee.html Mon Aug  8 05:40:25 2005
@@ -0,0 +1,58 @@
+<html>
+<head>
+<title>WS4J2ee Tool</title>
+ <link rel="stylesheet" type="text/css" href="ews.css"> 
+</head>
+<body>
+	<h1>WS4J2ee Tool</h1>
+	<h2>Tools Functions</h2>
+	<ol>
+		<li>Parse the webservice.xml file</li> 
+		<li>If wsdl file and jaxrpc mapping file does not exists create them using the SEI.</li>  
+		<li>Generate axis Skelton for axis using the "wsdl file".</li>  
+		<li>Generate ejb remote/local and home interface files if Web Service is based on EJB.</li>  
+		<li>generate the wrapper web service file.</li>  
+		<li>Generate the container DD if required.</li>  
+		<li>Generate the one jar file which has all information to deploy the service.</li>  
+	</ol>	
+	<h2>The Architecture of Code generation tool</h2>
+	<p>Interestingly enough the architecture of the tool can be explained in the following Diagram.</p>
+	<img src="images/ews-PCWframework.png"/>	
+	<br><code>Figure: Ws4J2ee class composition</code> 
+	<p>The tool consists of three types of classes. They are Contexts, Parsers, and Generators. They are as a groups named as the XXContext, YYGenerator, XXparser in the Diagram.   The Context is run time representation of the Deployment Descriptor or a module. The parser will parse what ever the actual representation of the module and generate the Context associated with the Module. Then the Generator use information in the Contexts and Generate the Deployment Descriptor, Java classes act.</p> 
+	<p>Each object is representing by the interfaces and there actual representations are hidden behind the Factory classes “XXFactory”. There is a Factory that Generate those factories and it is accepts in to the Ws4J2ee class (tools main class) as a parameter. Using that the Behavior of the tool can be altered programmatically without changing the code of the original tool.</p> 
+ 	<img src="images/ews-tool.gif"/>	
+	<br/><code>Figure: the components of the Project</code> 
+	<p>The Diagram shows the much more details structure of the Ws4J2ee tool. It shows the name of the each XXContext,  XXParser and YYGenerator. Furthermore its shows the how the JAXB, Java2WSDL and the Jaxrpc mapper is used.</p>
+	<h2>The Context</h2>
+	<p>The communication of between the different parts of the code, especially between the above two part is done via a single object called J2EEWebserviceContext. This object followed the “Mediator Patten” without the Observing. It is passive and has the all the information collected through out the execution of the Programme and it is passed around the Programme. End of the parsing of the Input artifacts the J2EEContext has all the information populated inside itself, and then the code generation modules will make use of the J2EEWebserviceContext to get the required information.</p> 
+  	<img src="images/ews-context.gif"/>	
+	<br/><code>Figure: Composition of the J2EEWebserviceContext</code> 
+
+	<p>The J2EEWebserviceContext or “the Context” is made up of seven parts.</p>
+	<ol>
+		<li>The Webserivce Context – This is a runtime representation of the webserive.xml file.</li>   
+		<li>)	The WSDL context – information about the WSDL file. 
+		<li>The JAXRPC Context - information about the   jaxrpc mapping file.</li>   
+		<li>EJB context – runtime representation of the ejb module.</li>  
+		<li>Web context – runtime representation of the web module.</li>  
+		<li>Service reference Context – runtime representation of the service reference module.</li>  
+		<li>MiscInfo  - this hold the Miscellaneous information.</li>   
+	</ol>
+	<p>Each “XXContext” has set of interfaces and the actual implementations of the each context is Hidden behind the ContextFactory which uses the “Factory Patten”.</p> 
+
+	<h2>The Parsing Module</h2>
+	<p>The EWS encounter a six deployment descriptors and one java class to parse. The java class is parsed by the Java2WSDL module and the WSDL context is passed in to the Context.</p> 
+	<p>Among the six deployment descriptors there are two deployment descriptors added to the JSR109, they are webservice.xml file and the jaxrpc-mapping file. For those two we are using (Java API for XML binding) JAXB to parse them.</p>
+	<p>One XML file is a WSDL file and it is parsed by the Jaxrpcmapper which is an extension of WSDL2Java and Java2WSDL of axis.</p>
+	<p>To parse the web.xml file and ejb-jar.xml and the service references the tool use DOM for the time been. We are considering possibility of using Geronimo DD parsing technique. (Use the method standalone, maybe we can get the information from Geronimo when our tool is used inside Geronimo).</p>
+
+	<p>All the parsers are such that they are independent and they can be easily replaced by another parser that implements the required interfaces. All the information are populated in to the context and in the case of WSDLContext and JaxrpcMappingContext.</p>  
+	<p>The populated information is wrapper by Adapters to adept for the “XXContext” interfaces using the “Adepter Patten”.</p> 
+
+	<h2>The Code Generation Framework</h2>
+  	<img src="images/ews-codegen.gif"/>	
+ 	<p>The Code generation framework is composed of the two types of Objects called the Generator and Writers.  The Generator represent a code module that take care of the generating a module. The Generator may have one or more Writers. Each writer will generate a single file.  The code generator module is composed of number of Generators.</p> 
+	<p>Each concrete Writer and the Generator is hidden behind the Generator factory and the Writer factory. The framework is independent of the implementation of each writer and Generator.</p>  
+</body>
+</html>
\ No newline at end of file

Added: webservices/ews/trunk/ws4j2ee/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/maven.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/maven.xml (added)
+++ webservices/ews/trunk/ws4j2ee/maven.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Revision: 1.21 $ $Date$ -->
+
+<project default="jar"
+    xmlns:j="jelly:core"
+    xmlns:maven="jelly:maven"
+    xmlns:deploy="deploy"
+    xmlns:ant="jelly:ant">
+
+    <goal name="setclasspath">
+        <path id="test.classpath">
+            <path refid="maven.dependency.classpath"/>
+        </path>
+    </goal>
+
+	<goal name="fixcrlf">
+		<chmod dir="${basedir}/src" perm="u+w" includes="**/*.java"/>
+		<fixcrlf srcdir="${basedir}/src" includes="**/*.java"/>
+    </goal>
+    
+    <preGoal name="test:test">
+        <j:jelly xmlns="jelly:ant">
+		<!--
+		<ant:java classname="org.apache.geronimo.ews.ws4j2ee.utils.PropertyStore" fork="no" >
+			   	<ant:arg value="${maven.repo.local}"/>
+	  	     	<ant:classpath>
+			     	<pathelement location="${basedir}/target/classes"/>
+	  	     	</ant:classpath>
+             </ant:java>
+		-->
+                <!--
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/ejb/bookquote"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/ejb/google"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/ejb/time"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/ejb/zip"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/servlet/bookquote"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/ejb/echo"/>
+			<ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/servlet/echo"/>-->		
+        </j:jelly>
+    </preGoal> 
+    
+
+</project>

Added: webservices/ews/trunk/ws4j2ee/project.properties
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/project.properties?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/project.properties (added)
+++ webservices/ews/trunk/ws4j2ee/project.properties Mon Aug  8 05:40:25 2005
@@ -0,0 +1,10 @@
+##
+## $Revision: 1.3 $ $Date$
+##
+
+# axis.version 1.2.1
+# xbeans.version 1.0.4
+# ews.version 1.1
+# discovery.version 0.3
+
+# maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory

Added: webservices/ews/trunk/ws4j2ee/project.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/project.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/project.xml (added)
+++ webservices/ews/trunk/ws4j2ee/project.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <!-- the version of maven's project object model -->
+  <pomVersion>3</pomVersion>
+  <!-- a unique name for this project -->
+  <artifactId>ews-ws4j2ee</artifactId>
+    <groupId>ews</groupId>
+    <currentVersion>${ews.version}</currentVersion>
+
+  <extend>../project.xml</extend>
+  <!-- a short but descriptive name for the project -->
+  <name>EWS : WebServices For J2EE</name>
+  <package>org.apache.geronimo.ews.ws4j2ee</package>
+  <logo>http://people.apache.org/~guillaume/ews-logo.jpg</logo>
+  <description><![CDATA[Web Services and the J2EE are two technologies that support the
+    Distributed Services.<br/> With the J2EE 1.4 and J2EE Web Service
+    specifications the Web Services has been defined as the part of the Java 2
+    Enterprise Edition.<br/> The EWS (Enterprise Web Service) is an
+    effort to merge these two technologies.]]></description>
+  <!-- a short description of what the project does -->
+  <shortDescription>EWS provides a tool that enables the Web Services modules
+    to be deployed in a J2EE Container.</shortDescription>
+  <!-- the project home page -->
+  <!-- ================ -->
+  <!--    Repository    -->
+  <!-- ================= -->
+  <repository>
+    <connection>scm:subversion:http://svn.apache.org/repos/asf/webservices/ews/trunk/ws4j2ee</connection>
+    <developerConnection>scm:subversion:https://svn.apache.org/repos/asf/webservices/ews/trunk/ws4j2ee</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/webservices/ews/trunk/ws4j2ee/?root=Apache-SVN</url>
+  </repository>
+  <!-- build information for the project -->
+  <build>
+    <nagEmailAddress>dev@geronimo.apache.org</nagEmailAddress>
+    <sourceDirectory>src/java</sourceDirectory>
+    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+    <unitTest>
+      <includes>
+        <include>**/*Test.java</include>
+      </includes>
+      <excludes>
+        <exclude>**/WebApplicationTest.java</exclude>
+      </excludes>
+    </unitTest>
+    <resources>
+      <resource>
+        <directory>target/src</directory>
+        <includes>
+          <include>**/*.properties</include>
+          <include>**/*.ser</include>
+          <include>**</include>
+        </includes>
+        <excludes>
+          <exclude>**/org/apache/geronimo/ews/ws4j2ee/**</exclude>
+        </excludes>
+        <filtering>false</filtering>
+      </resource>
+      <resource>
+        <directory>src/resources</directory>
+        <includes>
+            <include>**/*Provider</include>
+            <include>**/*.properties</include>
+            <include>common.xml</include>
+        </includes>
+        <filtering>false</filtering>
+      </resource>
+    </resources>
+  </build>
+  <!-- ============ -->
+  <!-- Dependencies -->
+  <!-- ============ -->
+  <dependencies>
+    <!-- Module Dependencies -->
+      <dependency>
+        <groupId>ews</groupId>
+        <artifactId>ews-mapper</artifactId>
+        <version>SNAPSHOT</version>
+        <properties>
+          <module>true</module>
+        </properties>
+        <type>jar</type>
+      </dependency>
+      <dependency>
+        <groupId>commons-logging</groupId>
+        <artifactId>commons-logging</artifactId>
+        <version>1.0.4</version>
+        <type>jar</type>
+        <properties>
+          <module>true</module>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>ant</groupId>
+        <artifactId>ant</artifactId>
+        <version>1.5.3-1</version>
+        <type>jar</type>
+        <properties>
+          <module>true</module>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>geronimo-spec</groupId>
+        <artifactId>geronimo-spec-ejb</artifactId>
+        <version>2.1-rc3</version>
+        <type>jar</type>
+        <properties>
+          <module>true</module>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>geronimo-spec</groupId>
+        <artifactId>geronimo-spec-j2ee</artifactId>
+        <version>1.4-rc3</version>
+        <type>jar</type>
+        <properties>
+          <module>true</module>
+        </properties>
+      </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Added: webservices/ews/trunk/ws4j2ee/samples/clients/ClientTest.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/clients/ClientTest.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/clients/ClientTest.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/clients/ClientTest.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,56 @@
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+
+import javax.xml.rpc.ServiceException;
+
+import junit.framework.TestCase;
+
+import org.apache.ws.echosample.Echo;
+import org.apache.ws.echosample.EchoServiceLocator;
+import org.apache.ws.echosample.EchoStruct;
+
+import com.jwsbook.jaxrpc.BookQuote;
+import com.jwsbook.jaxrpc.BookQuoteServiceLocator;
+
+
+public class ClientTest extends TestCase{
+	public void testClients() throws Exception{
+		try{
+//			File file = new File("./conf/wsdd/client/secuirty-client-config.wsdd");
+//			if(!file.exists())
+//				throw new RuntimeException();
+			System.setProperty("axis.ClientConfigFile",file.getAbsolutePath());
+			BookQuoteServiceLocator locater = new BookQuoteServiceLocator();
+			BookQuote port = locater.getBookQuotePort(new URL("http://127.0.0.1:5555/axis/services/BookQuotePort"));
+			System.out.println("return value is "+port.getBookPrice("hello"));
+			
+			EchoServiceLocator elocator = new EchoServiceLocator();
+			Echo eport = elocator.getechoPort(new URL("http://127.0.0.1:5555/axis/services/echoPort"));
+			
+			boolean booleanValue = true;
+			double doubleValue = 124565;
+			byte[] bytes = "hello".getBytes();
+			float floatValue = 245235f;
+			int intValue = 234;
+			long longValue = 23453536;
+			short shortvalue = new Short("23").shortValue();
+			EchoStruct struct = new EchoStruct();
+			struct.setStrVal("Hi");  
+			
+			assertEquals(eport.echoBoolean(true),true);
+			assertEquals(eport.echoDouble(doubleValue),doubleValue,2);
+			System.out.println(eport.echoBytes(bytes));
+			assertTrue(eport.echoFloat(floatValue) == floatValue);
+			assertEquals(eport.echoInt(intValue),intValue);
+			assertEquals(eport.echoLong(longValue),longValue);
+			assertEquals(eport.echoStruct(struct),struct);
+			assertEquals(eport.echoShort(shortvalue),shortvalue);
+		}catch(Exception e){
+			e.printStackTrace();
+			throw e;
+		}	
+	}
+}

Added: webservices/ews/trunk/ws4j2ee/samples/clients/build.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/clients/build.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/clients/build.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/clients/build.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<project basedir="." default="test">
+	<property name="build" location="build"/>
+	<property name="src" location="${build}/src"/>
+	<property file="../../conf/ws4j2ee.properties"></property>
+	<property name="build.classes" location="${build}/classes"/>
+	<property name="build.lib" location="../../target/generated/samples/lib"/>
+	<path id="cp">
+     	<pathelement location="../../target/classes/"/>
+	    <pathelement location="${build.classes}"/>
+       	 <fileset dir="${maven.repo.local}">
+				<include name="axis/**/*.jar"/>
+				<include name="geronimo-spec/**/*.jar"/>
+				<include name="geronimo/**/*.jar"/>
+				<include name="sec/**/*.jar"/>
+				<include name="dom4j/**/*.jar"/>
+				<include name="jaxb-ri/**/*.jar"/>
+				<include name="xerces/**/*.jar"/>
+				<include name="junit/**/*.jar"/>
+			</fileset>
+	</path>
+
+	<property name="jar.dir" location="../../target/generated/samples/"/>
+	
+	<target name="compile-wsdls" >
+	    <mkdir dir="${src}"/>	    
+		<mkdir dir="${build.classes}"/>
+		<java classname="org.apache.geronimo.ews.ws4j2ee.toWs.ws.WSDLOnlyClientSideWsGenerator" >
+		   <classpath refid="cp"/>
+		   <arg value="../../target/generated/samples/withoutWSDL/echo-jar/echo.wsdl"/>
+   		   <arg value="${src}"/>
+		</java>
+		<java classname="org.apache.geronimo.ews.ws4j2ee.toWs.ws.WSDLOnlyClientSideWsGenerator" >
+		   <classpath refid="cp"/>
+		   <arg value="../../target/generated/samples/withoutWSDL/bookquote-jar/BookQuote.wsdl"/>
+   		   <arg value="${src}"/>
+		</java>
+	</target>
+	
+	<target name="compile" depends="compile-wsdls">
+	    <copy todir="${src}">
+	    	<fileset dir=".">
+	    		<include name="*/*.java"/>
+	    	</fileset>
+	    </copy>
+		<javac destdir="${build.classes}" debug="on">
+			<classpath refid="cp"/>
+			<src path="${src}"/>
+		</javac>
+		<jar jarfile="${jar.dir}/clients.jar" basedir="${build.classes}" >
+		    <include name="**" />
+		</jar>
+	</target>
+
+	<target name="test" depends="compile">
+		<junit haltonerror="true" showoutput="true" printsummary="true">
+			<classpath refid="cp"/>
+			<formatter type="plain" />
+			<batchtest fork="yes" todir="${build}">
+            	<fileset dir="${src}">
+      				<include name="*/*Test*.java" />
+      				<exclude name="**/AllTests.java" />
+   				 </fileset>
+  			</batchtest>
+		</junit>
+		<delete dir="${build}"/>
+	</target>
+</project>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/ejb-jar.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/ejb-jar.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/ejb-jar.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar>
+	<display-name>BookQuoteService</display-name>
+	<enterprise-beans>
+		<session>
+			<display-name>BookQuoteService</display-name>
+			<ejb-name>bookquote</ejb-name>
+			<home>com.jwsbook.jaxrpc.BookQuoteHome</home>
+			<remote>com.jwsbook.jaxrpc.BookQuoteEJB</remote>
+			<ejb-class>com.jwsbook.jaxrpc.BookQuoteBean</ejb-class>
+			<session-type>Stateless</session-type>
+			<transaction-type>Bean</transaction-type>
+		</session>
+	</enterprise-beans>
+</ejb-jar>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/webservices.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/webservices.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/webservices.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/META-INF/webservices.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xmlns:ns1="http://www.Monson-Haefel.com/jwsbook/BookQuote"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/standards/xml/webservices/j2ee/j2ee_web_services_1_1.xsd" version="1.1">
+<description>BookQuoteService</description>
+	<display-name>BookQuoteService</display-name>
+	<webservice-description >
+		<description>BookQuoteService</description>
+		<display-name>BookQuoteService</display-name>
+		<webservice-description-name >BookQuoteService</webservice-description-name>
+		<wsdl-file >BookQuote.wsdl</wsdl-file>
+		<jaxrpc-mapping-file >BookQuote.xml</jaxrpc-mapping-file>
+		<port-component >
+			<description >BookQuote</description>
+			<display-name >BookQuote</display-name>
+			
+			<icon xml:lang="en-us" id="ID000298">
+				<small-icon>token</small-icon>
+				<large-icon>token</large-icon>
+			</icon>
+
+			<port-component-name >BookQuote</port-component-name>
+			<wsdl-port id="ID000311">ns1:BookQuotePort</wsdl-port>
+			<service-endpoint-interface >com.jwsbook.jaxrpc.BookQuote</service-endpoint-interface>
+			<service-impl-bean >
+				<ejb-link >com.jwsbook.jaxrpc.BookQuoteBean</ejb-link>
+			</service-impl-bean>
+		</port-component>
+	</webservice-description>
+</webservices>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/build.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/build.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/build.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/build.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<project basedir="." default="jar">
+	<property name="src" location="."/>
+	<property name="build" location="build"/>
+	<property name="build.classes" location="${build}/classes"/>
+	<property name="build.lib" location="${build}/lib"/>
+	<property name="lib" location="lib"/>
+	<property name="jar.dir" location="../../../target/generated/samples/"/>
+	<target name="compile" depends="init" unless="jars.uptodate">
+	   <mkdir dir="${build.classes}"/>
+	   <mkdir dir="${build.lib}"/>
+		<javac destdir="${build.classes}" debug="on">
+			<classpath refid="maven.dependency.classpath" />
+			<src path="${src}"/>
+		</javac>
+	</target>
+	<target name="jar" depends="compile" unless="jars.uptodate" >
+		<mkdir dir="${build.classes}/META-INF/"/>
+		<copy file ="${basedir}/META-INF/webservices.xml" todir="${build.classes}/META-INF"/>
+		<copy file ="${basedir}/META-INF/ejb-jar.xml" todir="${build.classes}/META-INF"/>
+		<mkdir dir="${jar.dir}"/>
+ 		<jar jarfile="${jar.dir}/bookquote.jar" basedir="${build.classes}" >
+		<include name="**" />
+		</jar>
+
+        <copy todir="${build.classes}/META-INF">
+			<fileset dir="${basedir}/META-INF/">
+			<include name="**/*.xml"/>
+			<exclude name="build.xml"/>
+			</fileset>
+		</copy>
+
+		<copy file ="${jar.dir}/bookquote.jar" todir="${build.classes}"/>
+		<jar jarfile="${jar.dir}/bookquote.ear" basedir="${build.classes}">
+			<include name="**/webservices.xml" />
+			<include name="**/application.xml" />
+			<include name="**/*.jar" />
+			<include name="**/*.war" />
+		</jar>
+		 
+		<delete dir="${build}"/>
+	</target>
+	<target name="init">
+		<uptodate property="jars.uptodate" targetfile="${jar.dir}/bookquote.jar">
+			<srcfiles dir="${src}">
+				<include name="**/*.java"/>
+				<include name="**/*.xml"/>
+				<include name="**/*.wsdl"/>
+				<exclude name="${build}/**"/>
+			</srcfiles>
+		</uptodate>
+		<echo message="the files are up to date = ${jars.uptodate}"></echo>
+	</target>
+	
+</project>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuote.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuote.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuote.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuote.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,12 @@
+/**
+ * BookQuote.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2alpha Feb 10, 2004 (12:04:50 GMT+06:00) WSDL2Java emitter.
+ */
+
+package com.jwsbook.jaxrpc;
+
+public interface BookQuote extends java.rmi.Remote {
+    public float getBookPrice(java.lang.String isbn) throws java.rmi.RemoteException;
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuoteBean.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuoteBean.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuoteBean.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/bookquote/com/jwsbook/jaxrpc/BookQuoteBean.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,17 @@
+package com.jwsbook.jaxrpc;
+public class BookQuoteBean  implements javax.ejb.SessionBean{
+	public float getBookPrice(java.lang.String isbn){
+			return 0.234567f;
+	}
+	public javax.naming.Context getInitialContext()throws javax.naming.NamingException{
+			java.util.Properties env = new java.util.Properties();
+			env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
+			env.put(javax.naming.Context.PROVIDER_URL, "127.0.0.1:1099");
+			return new javax.naming.InitialContext(env);
+	}
+	public void ejbCreate() {}
+	public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void setSessionContext(javax.ejb.SessionContext arg0)throws javax.ejb.EJBException, java.rmi.RemoteException {}
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/ejb-jar.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/ejb-jar.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/ejb-jar.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
+	     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+		 http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
+	     version="2.1">
+	<display-name>BookQuoteService</display-name>
+	<enterprise-beans>
+		<session>
+			<display-name>echo</display-name>
+			<ejb-name>echo</ejb-name>
+			<home>org.apache.ws.echosample.EchoHome</home>
+			<remote>org.apache.ws.echosample.EchoEJB</remote>
+			<ejb-class>org.apache.ws.echosample.EchoBean</ejb-class>
+			<session-type>Stateless</session-type>
+			<transaction-type>Bean</transaction-type>
+		</session>
+	</enterprise-beans>
+	<assembly-descriptor>
+        <method-permission>
+            <unchecked/>
+            <method>
+                <ejb-name>echo</ejb-name>
+                <method-name>*</method-name>
+            </method>
+        </method-permission>
+     </assembly-descriptor>
+</ejb-jar>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/webservices.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/webservices.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/webservices.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/META-INF/webservices.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xmlns:ns1="http://echosample.ws.apache.org"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/standards/xml/webservices/j2ee/j2ee_web_services_1_1.xsd" version="1.1">
+    <description>echo Service</description>
+	<display-name>echo</display-name>
+	<webservice-description >
+		<description>echo</description>
+		<display-name>echo</display-name>
+		<webservice-description-name >echoService</webservice-description-name>
+		<wsdl-file >echo.wsdl</wsdl-file>
+		<jaxrpc-mapping-file >echomapping.xml</jaxrpc-mapping-file>
+		<port-component >
+			<description >echo</description>
+			<display-name >echo</display-name>
+			
+			<icon xml:lang="en-us" id="ID000298">
+				<small-icon>token</small-icon>
+				<large-icon>token</large-icon>
+			</icon>
+
+			<port-component-name >echo</port-component-name>
+			<wsdl-port id="ID000311">ns1:echoPort</wsdl-port>
+			<service-endpoint-interface >org.apache.ws.echosample.Echo</service-endpoint-interface>
+			<service-impl-bean >
+				<ejb-link >echo</ejb-link>
+			</service-impl-bean>
+		</port-component>
+	</webservice-description>
+</webservices>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/build.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/build.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/build.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/build.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<project basedir="." default="jar">
+	<property name="src" location="."/>
+	<property name="build" location="build"/>
+	<property name="build.classes" location="${build}/classes"/>
+	<property name="build.lib" location="${build}/lib"/>
+	<property name="lib" location="lib"/>
+	<property name="jar.dir" location="../../../target/generated/samples/"/>
+	<target name="compile" depends="init" unless="jars.uptodate">
+	   <mkdir dir="${build.classes}"/>
+	   <mkdir dir="${build.lib}"/>
+		<javac destdir="${build.classes}" debug="on">
+			<classpath refid="maven.dependency.classpath" />
+			<src path="${src}"/>
+		</javac>
+	</target>
+	<target name="jar" depends="compile" unless="jars.uptodate">
+		<mkdir dir="${build.classes}/META-INF/"/>
+		<copy file ="${basedir}/META-INF/webservices.xml" todir="${build.classes}/META-INF"/>
+		<copy file ="${basedir}/META-INF/ejb-jar.xml" todir="${build.classes}/META-INF"/>
+		<mkdir dir="${jar.dir}"/>
+ 		<jar jarfile="${jar.dir}/echo.jar" basedir="${build.classes}" >
+		<include name="**" />
+		</jar>
+
+            <copy todir="${build.classes}/META-INF">
+			<fileset dir="${basedir}/META-INF/">
+			<include name="**/*.xml"/>
+			<exclude name="build.xml"/>
+			</fileset>
+		</copy>
+		<delete dir="${build}"/>
+	</target>
+	
+	<target name="init">
+		<uptodate property="jars.uptodate" targetfile="${jar.dir}/echo.jar">
+			<srcfiles dir="${src}">
+				<include name="**/*.java"/>
+				<include name="**/*.xml"/>
+				<include name="**/*.wsdl"/>
+				<exclude name="${build}/**"/>
+			</srcfiles>
+		</uptodate>
+		<echo message="the files are up to date = ${jars.uptodate}"></echo>
+	</target>
+	
+</project>

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/Echo.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/Echo.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/Echo.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/Echo.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,17 @@
+package org.apache.ws.echosample;
+public interface Echo  extends java.rmi.Remote {
+	public void echoVoid()throws java.rmi.RemoteException;
+	public int echoInt(int in)throws java.rmi.RemoteException;
+	public double echoDouble(double in)throws java.rmi.RemoteException;
+	public float echoFloat(float in)throws java.rmi.RemoteException;
+	public boolean echoBoolean(boolean in)throws java.rmi.RemoteException;
+	public String echoString(String in)throws java.rmi.RemoteException;
+	public short echoShort(short in)throws java.rmi.RemoteException;
+	public long echoLong(long in)throws java.rmi.RemoteException;
+	//public char echoChar(char in);
+	public byte[] echoBytes(byte[] in)throws java.rmi.RemoteException;
+	public void echoEvoid()throws java.rmi.RemoteException;
+	public EchoStruct echoStruct(EchoStruct in)throws java.rmi.RemoteException;
+	//public EchoStruct[] echoAStruct(EchoStruct[] in)throws java.rmi.RemoteException;
+	
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoBean.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoBean.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoBean.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoBean.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,48 @@
+
+package org.apache.ws.echosample;
+public class EchoBean implements javax.ejb.SessionBean{
+	public void ejbCreate() {}
+	
+	public void echoVoid(){}
+	public int echoInt(int in){
+		return in;
+	}
+	public double echoDouble(double in){
+		return in;
+	}
+	public float echoFloat(float in){
+		return in;
+	}
+	public boolean echoBoolean(boolean in){
+		return in;
+	}
+	public String echoString(String in){
+		return in;
+	}
+	public short echoShort(short in){
+		return in;
+	}
+	public long echoLong(long in){
+		return in;
+	}
+	public char echoChar(char in){
+		return in;
+	}
+	public byte[] echoBytes(byte[] in){
+		return in;
+	}
+	public void echoEvoid(){
+		
+	}
+	public EchoStruct echoStruct(EchoStruct in){
+		return in;
+	}
+//	public EchoStruct[] echoAStruct(EchoStruct[] in){
+//		return in;
+//	}
+		
+	public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {}
+	public void setSessionContext(javax.ejb.SessionContext arg0)throws javax.ejb.EJBException, java.rmi.RemoteException {}
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoStruct.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoStruct.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoStruct.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/EchoStruct.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,285 @@
+package org.apache.ws.echosample;
+
+import java.io.Serializable;
+
+public class EchoStruct implements Serializable{
+	private int intVal;
+	private double doubleVal;
+	private byte[] bytesVal;
+	private float floatVal;
+	private long longVal;
+	private short shortVal;
+	private boolean boolaenVal;
+	
+	private String strVal;
+	
+	private int[] intaVal;
+	private double[] doubleaVal;
+	private byte[][] bytesaVal;
+	private float[] floataVal;
+	private long[] longaVal;
+	private short[] shortaVal;
+	private boolean[] boolaenaVal;
+	
+	private String[] straVal;
+	
+	private SmallEchoStruct sturctVal;
+	private SmallEchoStruct sturctaVal;
+	
+    /**
+     * @return
+     */
+    public boolean[] getBoolaenaVal() {
+        return boolaenaVal;
+    }
+
+    /**
+     * @return
+     */
+    public boolean isBoolaenVal() {
+        return boolaenVal;
+    }
+
+    /**
+     * @return
+     */
+    public byte[][] getBytesaVal() {
+        return bytesaVal;
+    }
+
+    /**
+     * @return
+     */
+    public byte[] getBytesVal() {
+        return bytesVal;
+    }
+
+   
+   
+
+    /**
+     * @return
+     */
+    public double[] getDoubleaVal() {
+        return doubleaVal;
+    }
+
+    /**
+     * @return
+     */
+    public double getDoubleVal() {
+        return doubleVal;
+    }
+
+    /**
+     * @return
+     */
+    public float[] getFloataVal() {
+        return floataVal;
+    }
+
+    /**
+     * @return
+     */
+    public float getFloatVal() {
+        return floatVal;
+    }
+
+    /**
+     * @return
+     */
+    public int[] getIntaVal() {
+        return intaVal;
+    }
+
+    /**
+     * @return
+     */
+    public int getIntVal() {
+        return intVal;
+    }
+
+    /**
+     * @return
+     */
+    public long[] getLongaVal() {
+        return longaVal;
+    }
+
+    /**
+     * @return
+     */
+    public long getLongVal() {
+        return longVal;
+    }
+
+    /**
+     * @return
+     */
+    public short[] getShortaVal() {
+        return shortaVal;
+    }
+
+    /**
+     * @return
+     */
+    public short getShortVal() {
+        return shortVal;
+    }
+
+    /**
+     * @return
+     */
+    public String[] getStraVal() {
+        return straVal;
+    }
+
+    /**
+     * @return
+     */
+    public String getStrVal() {
+        return strVal;
+    }
+
+    /**
+     * @param bs
+     */
+    public void setBoolaenaVal(boolean[] bs) {
+        boolaenaVal = bs;
+    }
+
+    /**
+     * @param b
+     */
+    public void setBoolaenVal(boolean b) {
+        boolaenVal = b;
+    }
+
+    /**
+     * @param bs
+     */
+    public void setBytesaVal(byte[][] bs) {
+        bytesaVal = bs;
+    }
+
+    /**
+     * @param bs
+     */
+    public void setBytesVal(byte[] bs) {
+        bytesVal = bs;
+    }
+
+    
+    /**
+     * @param ds
+     */
+    public void setDoubleaVal(double[] ds) {
+        doubleaVal = ds;
+    }
+
+    /**
+     * @param d
+     */
+    public void setDoubleVal(double d) {
+        doubleVal = d;
+    }
+
+    /**
+     * @param fs
+     */
+    public void setFloataVal(float[] fs) {
+        floataVal = fs;
+    }
+
+    /**
+     * @param f
+     */
+    public void setFloatVal(float f) {
+        floatVal = f;
+    }
+
+    /**
+     * @param is
+     */
+    public void setIntaVal(int[] is) {
+        intaVal = is;
+    }
+
+    /**
+     * @param i
+     */
+    public void setIntVal(int i) {
+        intVal = i;
+    }
+
+    /**
+     * @param ls
+     */
+    public void setLongaVal(long[] ls) {
+        longaVal = ls;
+    }
+
+    /**
+     * @param l
+     */
+    public void setLongVal(long l) {
+        longVal = l;
+    }
+
+    /**
+     * @param ses
+     */
+    public void setShortaVal(short[] ses) {
+        shortaVal = ses;
+    }
+
+    /**
+     * @param s
+     */
+    public void setShortVal(short s) {
+        shortVal = s;
+    }
+
+    /**
+     * @param strings
+     */
+    public void setStraVal(String[] strings) {
+        straVal = strings;
+    }
+
+    /**
+     * @param string
+     */
+    public void setStrVal(String string) {
+        strVal = string;
+    }
+
+    /**
+     * @return
+     */
+    public SmallEchoStruct getSturctaVal() {
+        return sturctaVal;
+    }
+
+    /**
+     * @return
+     */
+    public SmallEchoStruct getSturctVal() {
+        return sturctVal;
+    }
+
+    /**
+     * @param struct
+     */
+    public void setSturctaVal(SmallEchoStruct struct) {
+        sturctaVal = struct;
+    }
+
+    /**
+     * @param struct
+     */
+    public void setSturctVal(SmallEchoStruct struct) {
+        sturctVal = struct;
+    }
+
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/SmallEchoStruct.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/SmallEchoStruct.java?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/SmallEchoStruct.java (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/echo/org/apache/ws/echosample/SmallEchoStruct.java Mon Aug  8 05:40:25 2005
@@ -0,0 +1,37 @@
+
+package org.apache.ws.echosample;
+
+import java.io.Serializable;
+
+public class SmallEchoStruct implements Serializable{
+	private String val1;
+	private String val2;
+    /**
+     * @return
+     */
+    public String getVal1() {
+        return val1;
+    }
+
+    /**
+     * @return
+     */
+    public String getVal2() {
+        return val2;
+    }
+
+    /**
+     * @param string
+     */
+    public void setVal1(String string) {
+        val1 = string;
+    }
+
+    /**
+     * @param string
+     */
+    public void setVal2(String string) {
+        val2 = string;
+    }
+
+}

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/ejb-jar.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/ejb-jar.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/ejb-jar.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar>
+<display-name>Google Search EJB</display-name>
+	<enterprise-beans>
+		<session>
+			<display-name>Google Search EJB</display-name>
+			<ejb-name>GoogleBean</ejb-name>
+			<home>org.objectweb.wssample.gen.google.GoogleSearchHome</home>
+			<remote>org.objectweb.wssample.gen.google.GoogleSearchPortEJB</remote>
+     		<ejb-class>org.objectweb.wssample.gen.google.GoogleSearchPortBean</ejb-class>
+			<session-type>Stateless</session-type>
+			<transaction-type>Bean</transaction-type>
+		</session>
+	</enterprise-beans>
+</ejb-jar>
+

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/webservices.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/webservices.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/webservices.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/google/META-INF/webservices.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+             http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+             version="1.1">
+  <display-name>Google Search</display-name>
+  <webservice-description>
+    <webservice-description-name>GoogleSearchPortService</webservice-description-name>
+    <wsdl-file>GoogleSearch.wsdl</wsdl-file>
+    <jaxrpc-mapping-file>GoogleSearch.xml</jaxrpc-mapping-file>
+    <port-component>
+      <description>port component description</description>
+      <port-component-name>GoogleSearchPort</port-component-name>
+
+      <!-- Should be the right way to use QName with JAXB parsing --> 
+     <wsdl-port xmlns:ns="urn:GoogleSearch">ns:GoogleSearchPort</wsdl-port> 
+
+      <service-endpoint-interface>org.objectweb.wssample.gen.google.GoogleSearchPort</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>GoogleBean</ejb-link>
+      </service-impl-bean>
+    </port-component>
+  </webservice-description>
+</webservices>
+

Added: webservices/ews/trunk/ws4j2ee/samples/ejb/google/build.xml
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/ws4j2ee/samples/ejb/google/build.xml?rev=230793&view=auto
==============================================================================
--- webservices/ews/trunk/ws4j2ee/samples/ejb/google/build.xml (added)
+++ webservices/ews/trunk/ws4j2ee/samples/ejb/google/build.xml Mon Aug  8 05:40:25 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<project basedir="." default="jar">
+	<property name="src" location="."/>
+	<property name="build" location="build"/>
+	<property name="build.classes" location="${build}/classes"/>
+	<property name="build.lib" location="${build}/lib"/>
+	<property name="lib" location="lib"/>
+	<property name="jar.dir" location="../../../target/generated/samples/"/>
+		
+	<target name="compile" depends="init" unless="jars.uptodate">
+	   <mkdir dir="${build.classes}"/>
+	   <mkdir dir="${build.lib}"/>
+		<javac destdir="${build.classes}" debug="on">
+			<classpath refid="maven.dependency.classpath" />
+			<src path="${src}"/>
+		</javac>
+	</target>
+	<target name="jar" depends="compile" unless="jars.uptodate">
+		<mkdir dir="${build.classes}/META-INF/"/>
+		<copy file ="${src}/META-INF/webservices.xml" todir="${build.classes}/META-INF"/>
+		<copy file ="${src}/META-INF/ejb-jar.xml" todir="${build.classes}/META-INF"/>
+
+ 		<jar jarfile="${jar.dir}/google.jar" basedir="${build.classes}" >
+		<include name="**" />
+		<manifest>
+			<section name="org/apache/ws4j2ee">
+			<attribute name="Implementation-Title" value="Apache jsr109 impl"/>
+			<attribute name="Implementation-Vendor" value="Apache Web Services"/>
+			</section>
+		</manifest>
+		</jar>
+		<delete dir="${build}"/>
+	</target>
+	<target name="init">
+		<uptodate property="jars.uptodate" targetfile="${jar.dir}/google.jar">
+			<srcfiles dir="${src}">
+				<include name="**/*.java"/>
+				<include name="**/*.xml"/>
+				<include name="**/*.wsdl"/>
+				<exclude name="${build}/**"/>
+			</srcfiles>
+		</uptodate>
+		<echo message="the files are up to date = ${jars.uptodate}"></echo>
+	</target>
+</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: ews-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: ews-dev-help@ws.apache.org