From e2150f22562b4bc06307f4ac7b842687390e4856 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 16 Oct 2014 13:42:04 +0200 Subject: change webservice implementation to Apache CXF --- .../java/at/gv/util/wsdl/ur_V5/URSucheService.java | 99 +++++++++++----------- 1 file changed, 49 insertions(+), 50 deletions(-) (limited to 'src/main/java/at/gv/util/wsdl/ur_V5/URSucheService.java') diff --git a/src/main/java/at/gv/util/wsdl/ur_V5/URSucheService.java b/src/main/java/at/gv/util/wsdl/ur_V5/URSucheService.java index 8e5fe73..048acdb 100644 --- a/src/main/java/at/gv/util/wsdl/ur_V5/URSucheService.java +++ b/src/main/java/at/gv/util/wsdl/ur_V5/URSucheService.java @@ -1,75 +1,81 @@ - package at.gv.util.wsdl.ur_V5; -import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; -import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; - +import javax.xml.ws.Service; /** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.4-b01 - * Generated source version: 2.2 + * This class was generated by Apache CXF 3.0.1 + * 2014-10-16T12:00:10.781+02:00 + * Generated source version: 3.0.1 * */ -@WebServiceClient(name = "URSucheService", targetNamespace = "urn:at:statistik:ur:ws", wsdlLocation = "file:/D:/Projekte/svn/online-vollmachten/egovutils/src/main/resources/wsdl/ur_V5/URSucheService.wsdl") -public class URSucheService - extends Service -{ +@WebServiceClient(name = "URSucheService", + wsdlLocation = "./src/main/resources/wsdl/ur_V5/URSucheService.wsdl", + targetNamespace = "urn:at:statistik:ur:ws") +public class URSucheService extends Service { - private final static URL URSUCHESERVICE_WSDL_LOCATION; - private final static WebServiceException URSUCHESERVICE_EXCEPTION; - private final static QName URSUCHESERVICE_QNAME = new QName("urn:at:statistik:ur:ws", "URSucheService"); + public final static URL WSDL_LOCATION; + public final static QName SERVICE = new QName("urn:at:statistik:ur:ws", "URSucheService"); + public final static QName URSucheService = new QName("urn:at:statistik:ur:ws", "URSucheService"); static { - URL url = null; - WebServiceException e = null; - try { - url = new URL("file:/D:/Projekte/svn/online-vollmachten/egovutils/src/main/resources/wsdl/ur_V5/URSucheService.wsdl"); - } catch (MalformedURLException ex) { - e = new WebServiceException(ex); - } - URSUCHESERVICE_WSDL_LOCATION = url; - URSUCHESERVICE_EXCEPTION = e; + URL url = URSucheService.class.getResource("./src/main/resources/wsdl/ur_V5/URSucheService.wsdl"); + if (url == null) { + url = URSucheService.class.getClassLoader().getResource("./src/main/resources/wsdl/ur_V5/URSucheService.wsdl"); + } + if (url == null) { + java.util.logging.Logger.getLogger(URSucheService.class.getName()) + .log(java.util.logging.Level.INFO, + "Can not initialize the default wsdl from {0}", "./src/main/resources/wsdl/ur_V5/URSucheService.wsdl"); + } + WSDL_LOCATION = url; } - public URSucheService() { - super(__getWsdlLocation(), URSUCHESERVICE_QNAME); - } - -// public URSucheService(WebServiceFeature... features) { -// super(__getWsdlLocation(), URSUCHESERVICE_QNAME, features); -// } - public URSucheService(URL wsdlLocation) { - super(wsdlLocation, URSUCHESERVICE_QNAME); + super(wsdlLocation, SERVICE); } -// public URSucheService(URL wsdlLocation, WebServiceFeature... features) { -// super(wsdlLocation, URSUCHESERVICE_QNAME, features); -// } - public URSucheService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } -// public URSucheService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { -// super(wsdlLocation, serviceName, features); -// } + public URSucheService() { + super(WSDL_LOCATION, SERVICE); + } + + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public URSucheService(WebServiceFeature ... features) { + super(WSDL_LOCATION, SERVICE, features); + } + + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public URSucheService(URL wsdlLocation, WebServiceFeature ... features) { + super(wsdlLocation, SERVICE, features); + } + + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public URSucheService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { + super(wsdlLocation, serviceName, features); + } /** - * + * * @return * returns URSuche */ @WebEndpoint(name = "URSucheService") public URSuche getURSucheService() { - return super.getPort(new QName("urn:at:statistik:ur:ws", "URSucheService"), URSuche.class); + return super.getPort(URSucheService, URSuche.class); } /** @@ -81,14 +87,7 @@ public class URSucheService */ @WebEndpoint(name = "URSucheService") public URSuche getURSucheService(WebServiceFeature... features) { - return super.getPort(new QName("urn:at:statistik:ur:ws", "URSucheService"), URSuche.class, features); - } - - private static URL __getWsdlLocation() { - if (URSUCHESERVICE_EXCEPTION!= null) { - throw URSUCHESERVICE_EXCEPTION; - } - return URSUCHESERVICE_WSDL_LOCATION; + return super.getPort(URSucheService, URSuche.class, features); } } -- cgit v1.2.3