Dynamic WS Clients. Eureka! 2. How-to in Java
0. Introduction In the last post we got information about: Fully qualified names of classes The structures (classes) used in the WS for input and output. 1. The pom.xml file It is the same as the one in this elder post . The important thing is using Apache CXF libraries ("cxf-rt-frontent-jaxws", "cxf-rt-transports-http" and "cxf-rt-transports-http-jetty") 2. Simple scaffolding(1): Accessing the WSDL This is as simple as this 2 java lines of code: // 0.Package declarations import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; ... // 1. Declare WSDL JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory. newInstance (); Client client = dcf. createClient ( "http://XXX.XXX.XX.XX:8080/gexflow/ws/Registro_v2.0?wsdl" ); Here the "XXX.XXX.XX.XX" represents the WS server IP address. 3. Simple scaffolding(2): Creating the WS needed classes and ...