6 Replies Latest reply: Oct 4, 2012 8:48 AM by mycoffee RSS

    Build webservice

    mycoffee
      Hi All
      I need to build a small webapp that has some jsp pages and also a webservice (server)
      All will be deployed in many types of application servers (websphere, geronimo, weblogic ...)
      What is the best approach for that :
      - An ear file that include myweb.war file and myservice.war
      - A war for all. I don't know if I can I include the webservice inside the same war? If possible, I want it to be one war file

      Thank you
        • 1. Re: Build webservice
          maheshguruswamy
          mycoffee wrote:
          Hi All
          I need to build a small webapp that has some jsp pages and also a webservice (server)
          All will be deployed in many types of application servers (websphere, geronimo, weblogic ...)
          What is the best approach for that :
          - An ear file that include myweb.war file and myservice.war
          - A war for all. I don't know if I can I include the webservice inside the same war? If possible, I want it to be one war file

          Thank you
          Everything can be included in one WAR file.
          • 2. Re: Build webservice
            mycoffee
            Thank you

            So what way is the best to generate a web service in the existing war file? That can deploy in multiple servers
            My war file is still using java 1.5
            • 3. Re: Build webservice
              965123
              JAX-WS
              • 4. Re: Build webservice
                maheshguruswamy
                mycoffee wrote:
                Thank you

                So what way is the best to generate a web service in the existing war file? That can deploy in multiple servers
                My war file is still using java 1.5
                Start with just creating the webservice first and get it up and running. Packaging and deployment are subsequent steps. As the other poster mentioned start with JAX-WS.
                • 5. Re: Build webservice
                  mycoffee
                  I did create a simple webservice by JAX-WS.
                  @WebService (endpointInterface = "com.server.WS")
                  public class UBLImpl implements WS {
                       public String request(String message) {     
                            return "OK";
                       }
                  }

                  My client will send me some xml in the message, not a simple string
                  How do I bind it

                  Could some one show me where to find a good document to create a webservice more than just the greeting? Thanks
                  • 6. Re: Build webservice
                    mycoffee
                    I am OK now.
                    Thank you all
                    Using JAXWS