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 @@ + + +EWS Security + + + +

EWS Security

+

Introduction

+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 + + +

Design Considerations

+There were some design guide lines that shaped up the design and implementation of EWS security. + +
+
+
  • Loosely Coupled with the Service Implementation +
    +
      +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. +
      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. +
    +
    +
  • Adaptability to New Requirements and Technologies +
    +
      +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. +
    +
    +
  • Use Existing Technologies and the Programming Model +
    +
      +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. + +
    +
    +
  • Uses the Existing Configuration Files +
    +
      +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. +
      E.g. +
        +Client Side : client-config.wsdd +
        Server Side : At deployment Webservices.xml +
        At run time server-config.wsdd +
      +
    +
    +
  • J2EE like Programming Model +
    +
      +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. + +
    +
    +
  • Implementation Transparency to the Web Service Client +
    +
      +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.
      + +
      +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. + +
    + + +

    Approach

    + +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. +
    +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. +
    +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. +
    + +
    + +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. + + +

    The Challenge

    + +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. +
    + +
    +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. +
    +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. + + +

    Implementation

    +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. +
      +
    1. Provide Security at Web Service domain +
    2. Provide Security at J2EE platform. +
    3. Map the Security Services of one domain to the other. +
    +In order to perform these tasks, the implementation has two separate modules namely, +
      +
    1. Axis side Security module +
    2. J2EE side Security module +
    +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. +
    +
    +
    +

    Axis side Security Module

    +This sub module performs the following tasks. + +
    +
    +
  • Provides Client side Security handlers for Java clients to add security to the SOAP +requests. + + +
  • Provide Server side Security handlers to process the security information available in the +SOAP requests. + + +
  • Provides Server side Security handlers to add security to the SOAP responses. + + +
  • Provides Client side Security handlers for java clients to process the security information +in the SOAP responses. + + +
  • Retrieves the security information required at J2EE domain, from the SOAP Security +headers and HTTP headers. + + +
  • 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. + + +
  • Defines the entry formats of the configuration files and customizes the general handlers +at both client side and server side, according to the configurations. + +
    + +
    + + +

  • Security Senders

    +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). +

  • SimpleWSS4J2EESender

    + +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. +

  • WSDoAllSender

    + +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. +

  • Security Receivers

    + +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. +

  • BasicAuth4J2EEReceiver

    + +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). +

  • SimpleWSS4J2EEReceiver

    + +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). +

  • AllSecurity4J2EEReciever

    + +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. +
      +
    1. Signature Verification +
    2. Decryption +
    3. UsernameToken Processing +

    +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. + +

    J2EE side Security module

    + +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. +
    +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. +
    +
    + +
    +
    + +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. +
    +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. +
    +
    +
      LoginContext lc = new LoginContext("SomeLoginModule", handler);
    +
    +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
    +
      handle(Callback[] callbacks)

    +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.
    + +
    +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. + + + 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 @@ + + +math + + + BookQuoteService + MathFace + testData.math.MathFaceHome + testData.math.MathFace + testData.math.MathFaceImpl + Stateless + Bean + + 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 + service/Joe + javax.xml.rpc.Service + WEB-INF/joe.wsdl + WEB-INF/joe.xml + + + sample.Joe + JoePort + + + + + + \ 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 @@ + + Apache-Axis + + MathFace + MathFace Servlet + testData.math.MathFaceImpl + + \ 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 @@ + + + + MathFaceService + math.wsdl + jaxrpc-mapping.xml + + MathFace + ns1:math + testData.math.MathFace + + MathFace + + + + 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 @@ + + +Transaction + + + + + \ 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 @@ + + + + + +

    Using the Ws4J2ee tool

    + +org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2ee module [-o out-dir] + +

    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. +

    + +

    Content of the Module

    +

    +

      +
    1. webservices.xml file
    2. +
    3. SEI(class file)
    4. +
    5. Implementation bean(class file)
    6. +
    7. ejb-jar.xml/web.xml file
    8. +
    9. (optional wsdl file and jaxrpcmapping file/both or none) +
    +

    + +

    Packaging

    +

    ejb based Jar file

    +
     
    +	/-META-INF/webservice.xml
    +	 -META-INF/ejb-jar.xml
    +         -SEI class
    +         -service implementation bean class
    +         -any other referance classes
    +
    +

    Web based jar file

    +
     
    +	/-META-INF/webservice.xml
    +	 -META-INF/web.xml
    +         -SEI class
    +         -service implementation bean class
    +         -any other referance classes
    +
    + + + +

    Appendix

    +

    Service Endpoint Interface

    +

    The JAX-RPC specification requires that a JAX-RPC service endpoint interface must +follow the following rules:

    +
      +
    1. Service endpoint interface must extend java.rmi.Remote either directly or indirectly
    2. +
    3. All methods in the interface must throw java.rmi.RemoteException. Methods may + throw service specific exceptions in addition to the RemoteException.
    4. +
    5. 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. +
    6. +
    7. 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.
    8. +
    9. 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.
    10. +
    + +

    Service Implementation Bean

    +

    The Stateless Service Implementation Session Bean.

    +

    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.

    +
      +
    1. The Service Implementation Bean must have a default public constructor.
    2. +
    3. 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.
    4. +
    5. 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.
    6. +
    7. 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.
    8. +
    9. The class must be public, must not be final and must not be abstract.
    10. +
    11. The class must not define the finalize() method.
    12. +
    13. 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.
    14. +
    15. 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.
    16. +
    17. The Enterprise JavaBeans specification section 7.8.2 defines the allowed + container service access requirements.
    18. +
    + +
    Exposing an existing EJB
    +

    An existing Enterprise JavaBean may be used as a Service Implementation Bean if it meets the following requirements:

    +
      +
    1. The business methods of the EJB bean class that are exposed on the SEI must meet the Service
    2. +
    3. Implementation Bean requirements defined in section 5.3.1.
    4. +
    5. The SEI must meet the requirements described in the JAX-RPC specification for Service Endpoint Interfaces.
    6. +
    7. The transaction attributes of the SEI methods must not include Mandatory.
    8. +
    9. 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.
    10. +
    + +

    WebEndpoint Based Serivce Implementation Bean

    +

    The Service Implementation Bean must follow the Service Developer requirements outlined in the JAX-RPC specification and are listed below except as noted.

    +
      +
    1. ?The Service Implementation Bean must have a default public constructor.
    2. +
    3. ?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.
    4. +
    5. 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.
    6. +
    7. ?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.
    8. +
    9. ?The class must be public, must not be final and must not be abstract.
    10. +
    11. ?The class must not define the finalize() method.
    12. +
    + + + + + \ 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 @@ + + +WS4J2ee Tool + + + +

    WS4J2ee Tool

    +

    Tools Functions

    +
      +
    1. Parse the webservice.xml file
    2. +
    3. If wsdl file and jaxrpc mapping file does not exists create them using the SEI.
    4. +
    5. Generate axis Skelton for axis using the "wsdl file".
    6. +
    7. Generate ejb remote/local and home interface files if Web Service is based on EJB.
    8. +
    9. generate the wrapper web service file.
    10. +
    11. Generate the container DD if required.
    12. +
    13. Generate the one jar file which has all information to deploy the service.
    14. +
    +

    The Architecture of Code generation tool

    +

    Interestingly enough the architecture of the tool can be explained in the following Diagram.

    + +
    Figure: Ws4J2ee class composition +

    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.

    +

    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.

    + +
    Figure: the components of the Project +

    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.

    +

    The Context

    +

    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.

    + +
    Figure: Composition of the J2EEWebserviceContext + +

    The J2EEWebserviceContext or “the Context” is made up of seven parts.

    +
      +
    1. The Webserivce Context – This is a runtime representation of the webserive.xml file.
    2. +
    3. ) The WSDL context – information about the WSDL file. +
    4. The JAXRPC Context - information about the jaxrpc mapping file.
    5. +
    6. EJB context – runtime representation of the ejb module.
    7. +
    8. Web context – runtime representation of the web module.
    9. +
    10. Service reference Context – runtime representation of the service reference module.
    11. +
    12. MiscInfo - this hold the Miscellaneous information.
    13. +
    +

    Each “XXContext” has set of interfaces and the actual implementations of the each context is Hidden behind the ContextFactory which uses the “Factory Patten”.

    + +

    The Parsing Module

    +

    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.

    +

    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.

    +

    One XML file is a WSDL file and it is parsed by the Jaxrpcmapper which is an extension of WSDL2Java and Java2WSDL of axis.

    +

    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).

    + +

    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.

    +

    The populated information is wrapper by Adapters to adept for the “XXContext” interfaces using the “Adepter Patten”.

    + +

    The Code Generation Framework

    + +

    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.

    +

    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.

    + + \ 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + 3 + + ews-ws4j2ee + ews + ${ews.version} + + ../project.xml + + EWS : WebServices For J2EE + org.apache.geronimo.ews.ws4j2ee + http://people.apache.org/~guillaume/ews-logo.jpg + 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.
    The EWS (Enterprise Web Service) is an + effort to merge these two technologies.]]>
    + + EWS provides a tool that enables the Web Services modules + to be deployed in a J2EE Container. + + + + + + scm:subversion:http://svn.apache.org/repos/asf/webservices/ews/trunk/ws4j2ee + scm:subversion:https://svn.apache.org/repos/asf/webservices/ews/trunk/ws4j2ee + http://svn.apache.org/viewcvs.cgi/webservices/ews/trunk/ws4j2ee/?root=Apache-SVN + + + + dev@geronimo.apache.org + src/java + src/test + + + **/*Test.java + + + **/WebApplicationTest.java + + + + + target/src + + **/*.properties + **/*.ser + ** + + + **/org/apache/geronimo/ews/ws4j2ee/** + + false + + + src/resources + + **/*Provider + **/*.properties + common.xml + + false + + + + + + + + + + ews + ews-mapper + SNAPSHOT + + true + + jar + + + commons-logging + commons-logging + 1.0.4 + jar + + true + + + + ant + ant + 1.5.3-1 + jar + + true + + + + geronimo-spec + geronimo-spec-ejb + 2.1-rc3 + jar + + true + + + + geronimo-spec + geronimo-spec-j2ee + 1.4-rc3 + jar + + true + + + + +
    \ 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + BookQuoteService + + + BookQuoteService + bookquote + com.jwsbook.jaxrpc.BookQuoteHome + com.jwsbook.jaxrpc.BookQuoteEJB + com.jwsbook.jaxrpc.BookQuoteBean + Stateless + Bean + + + 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 @@ + + +BookQuoteService + BookQuoteService + + BookQuoteService + BookQuoteService + BookQuoteService + BookQuote.wsdl + BookQuote.xml + + BookQuote + BookQuote + + + token + token + + + BookQuote + ns1:BookQuotePort + com.jwsbook.jaxrpc.BookQuote + + com.jwsbook.jaxrpc.BookQuoteBean + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + BookQuoteService + + + echo + echo + org.apache.ws.echosample.EchoHome + org.apache.ws.echosample.EchoEJB + org.apache.ws.echosample.EchoBean + Stateless + Bean + + + + + + + echo + * + + + + 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 @@ + + + echo Service + echo + + echo + echo + echoService + echo.wsdl + echomapping.xml + + echo + echo + + + token + token + + + echo + ns1:echoPort + org.apache.ws.echosample.Echo + + echo + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + +Google Search EJB + + + Google Search EJB + GoogleBean + org.objectweb.wssample.gen.google.GoogleSearchHome + org.objectweb.wssample.gen.google.GoogleSearchPortEJB + org.objectweb.wssample.gen.google.GoogleSearchPortBean + Stateless + Bean + + + + 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 @@ + + + + Google Search + + GoogleSearchPortService + GoogleSearch.wsdl + GoogleSearch.xml + + port component description + GoogleSearchPort + + + ns:GoogleSearchPort + + org.objectweb.wssample.gen.google.GoogleSearchPort + + GoogleBean + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    +
    + +
    + + + + + + + + + + + +
    --------------------------------------------------------------------- To unsubscribe, e-mail: ews-dev-unsubscribe@ws.apache.org For additional commands, e-mail: ews-dev-help@ws.apache.org