1 Reply Latest reply on Oct 29, 2008 9:58 AM by Tonio Caputo

    Design issue: packaging JAX-WS artifacts

    Janne Mattila Newbie

      We have a project with several web services (A, B , C) and a client that uses them. The services and the client are separate subprojects, each built independently. Both the services and the client use jbossws JAX-WS but of course other types of external clients may exist as well.

      We create the interfaces from wsdl and schemas using wsconsume. This produces the service interface and tens of data classes for each service.

      What's the best approach for packaging these artifacts?

      - having the same classes created for the client and the services so that the same classes exist in 2 places results in having to update lot of classes in 2 places when the interface changes
      - we could create separate jars for each web service interface: a.jar, b.jar, c.jar and include for example a.jar both in web service a project and the client project. This of course complicates the build structure a bit
      - or we could create a single webservice-api.jar which contains the artifacts for a, b, and c. Bit simpler build, but feels a bit bad to combine these 3 services which have nothing to do with each other into same package

        • 1. Re: Design issue: packaging JAX-WS artifacts
          Tonio Caputo Newbie

          Just thoughts:

          If I use web-services I'm supposing that you don't know nothing about the client and viceversa except for the WSDL.

          You may be tempted to add behavior to your generated classes, that won't be shown in the WSDL.

          A client that use your jar will have this behaviour added, but for example a .NET client won't know anything about that.

          So probably I will just use two different jars, and make sure that the client is just the WSDL mapped classes.

          Hope it helps