Last active
December 23, 2015 09:09
-
-
Save ggdio/6612890 to your computer and use it in GitHub Desktop.
A client class to MyServiceWs.java
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 br.com.ggdio.gists.ws.service.client; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import javax.xml.namespace.QName; | |
import javax.xml.ws.Service; | |
import javax.xml.ws.WebServiceClient; | |
import br.com.ggdio.ws.service.structure.MyService; | |
/** | |
* This class establish a connection to the webservice | |
* and based on the wsdl, perform methods calls. | |
* @author Guilherme Dio | |
* | |
*/ | |
@WebServiceClient(name = "MyService", targetNamespace = "http://example.ggdio.com.br/ws", wsdlLocation = "") | |
public class MyServiceClient extends Service { | |
public MyServiceClient(String url) throws MalformedURLException { | |
super(new URL(url), new QName("http://example.ggdio.com.br/ws", | |
"MyService")); | |
} | |
public MyServiceClient(URL wsdlDocumentLocation, QName serviceName) { | |
super(wsdlDocumentLocation, serviceName); | |
} | |
public MyService getPort() { | |
return (MyService) super.getPort(MyService.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment