Created
May 10, 2015 07:43
-
-
Save tongtie/d7834c80b783ea993803 to your computer and use it in GitHub Desktop.
client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package service; | |
/** | |
* Created by mrt on 2015/5/10. | |
*/ | |
import javax.xml.namespace.QName; | |
import javax.xml.ws.Service; | |
import java.net.URL; | |
class Client { | |
public static void main(String args[ ]) throws Exception { | |
URL url = new URL("http://localhost:9000/PersonList?wsdl"); | |
QName qname = new QName("http://service/", "PersonListService"); | |
// Create, in effect, a factory for the service. | |
Service service = Service.create(url, qname); | |
// Extract the endpoint interface, the service "port". | |
Persons eif = service.getPort(Persons.class); | |
System.out.println(eif.getPersonList().size()); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment