Building a SOAP Style WebService 1) What data is exchanged? XML (so I need to configure the Java classes into/out of XML) This JAX-B Java for XML Binding My example is Horoscope.java <=> XML Complex Type 2) I need to build (and publish) an Endpoint what URL do I want to use? IP/Post/? My example is HoroscopeApplication 3) I need to build a WebService implementation this is an Interface, and the implementation My example Interface is HoroscopeSOAP w/ @WebService and @WebMethod(s) My example implentation is HoroscopeSOAPImpl w/ @WebService(endpointInterface="..." 4) I am going to start (run as Java Appl) the Endpoint My example is HoroscopeApplication If I open a Browse to the Endpoint URL, I see nothing... However if I open a Browser to: ?wsdl My example Endpoint WSDL is: http://localhost:8888/ws/horoscope?wsdl I will see the SOAP WSDL document ---------------------------------------------- To build SOAP Client 1) I need the WSDL URL 2) I build a new Java Project (in this project) I will need... a Java class(es) to hold all the "Complex types" being sent to me or the type I send to the Service This Java class represents the Data Types in the WSDL I also need a "Helper" class to handle the I/O I need to convert the incoming XML to Java I need to convert the outgoing Java to XML I need help 3) I am going to ask a built-in tool to build the Java class the I/O Service code anything else listed in the WSDL this tool is wsimport To run wsimport, I right click on the src folder in the Client project I select -> Show in -> terminal that open a command prompt in the correct folder I run: wsimport -s . http://localhost:8888/ws/horoscope?wsdl 4) I need to write main to call the SOAP WebService in this code I need to call the "Helper" classes generated by the wsimport my examples is: HoroscopeClient I construct a "Helper Service" my example HoroscopeSOAPImplService serviceImpl = new HoroscopeSOAPImplService(); using the service I construct a "helper Port" my example: HoroscopeSOAP service = serviceImpl.getHoroscopeSOAPImplPort(); the using the port I invoke the SOAP WebSerice methods my examples: ... service.getDate() ... service.getHoroscopeNames()