javaweb-servicesjbossjax-wsjax-ws-customization

Where are the Web Service Interfaces?


I'm working on a medium-size project using JBoss Developer Studio (based on Eclipse). We have 2 Web Projects, 1 of them to contain/manage Web Services using JAX-WS with JBossWS. My boss was updating the software architecture document and asked me where are the interfaces generated on the Web Service project. I told her those interfaces are generated by default with the tool, then I started searching all the project and there are no explicit interfaces (by explicit I mean a MyService.java file with a public interface MyService), I can see our classes, the WSDL files and the servlets configured in the web.xml calling their corresponding service implementation class.

Is neccesary to create interfaces for these services? In case it is or could be, are there any tools to help me and the team in the creation of these interfaces, because we have like 100 methods for each service class?

Just to add some info, we have another Web Project that consumes these services using interfaces and calling the WSDL files over the web.


Solution

  • Those interfaces are generated on the client (your another web project in this case). Usually, you feed wsdl to something like wsdl2java (by the looks of things, it's wsconsume for jbossws) and get your interfaces. However, such approach might give you ugly java code, so alternatively, you could write those by hand (this is the case, when you prefer to write wsdl by hand as well).

    P.S.: There are lot's of eclipse plugins for wsdl2java, so if there is a market in jboss studio you can, probably, find it out there.