From 7a5b350a93990956106d91679240b6e8326cb110 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 5 Nov 2014 08:07:15 +0100 Subject: change more client implementations to APACHE CXF --- .../gv/util/wsdl/mis/usp/GetMandatesService.java | 78 ++++++++++++++-------- 1 file changed, 50 insertions(+), 28 deletions(-) (limited to 'src/main/java/at/gv/util/wsdl/mis/usp/GetMandatesService.java') diff --git a/src/main/java/at/gv/util/wsdl/mis/usp/GetMandatesService.java b/src/main/java/at/gv/util/wsdl/mis/usp/GetMandatesService.java index 778922f..7e9e012 100644 --- a/src/main/java/at/gv/util/wsdl/mis/usp/GetMandatesService.java +++ b/src/main/java/at/gv/util/wsdl/mis/usp/GetMandatesService.java @@ -1,41 +1,42 @@ - package at.gv.util.wsdl.mis.usp; -import java.net.MalformedURLException; import java.net.URL; -import java.util.logging.Logger; import javax.xml.namespace.QName; -import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; - +import javax.xml.ws.Service; /** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.6 in JDK 6 - * Generated source version: 2.1 + * This class was generated by Apache CXF 3.0.1 + * 2014-10-28T17:50:38.761+01:00 + * Generated source version: 3.0.1 * */ -@WebServiceClient(name = "GetMandatesService", targetNamespace = "http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", wsdlLocation = "file:/D:/eclipse/development/egovutils/src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl") -public class GetMandatesService - extends Service -{ +@WebServiceClient(name = "GetMandatesService", + wsdlLocation = "./src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl", + targetNamespace = "http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl") +public class GetMandatesService extends Service { - private final static URL GETMANDATESSERVICE_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(at.gv.util.wsdl.mis.usp.GetMandatesService.class.getName()); + public final static URL WSDL_LOCATION; + public final static QName SERVICE = new QName("http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", "GetMandatesService"); + public final static QName GetMandatesPort = new QName("http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", "GetMandatesPort"); static { - URL url = null; - try { - URL baseUrl; - baseUrl = at.gv.util.wsdl.mis.usp.GetMandatesService.class.getResource("."); - url = new URL(baseUrl, "file:/D:/eclipse/development/egovutils/src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/D:/eclipse/development/egovutils/src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - GETMANDATESSERVICE_WSDL_LOCATION = url; + URL url = GetMandatesService.class.getResource("./src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl"); + if (url == null) { + url = GetMandatesService.class.getClassLoader().getResource("./src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl"); + } + if (url == null) { + java.util.logging.Logger.getLogger(GetMandatesService.class.getName()) + .log(java.util.logging.Level.INFO, + "Can not initialize the default wsdl from {0}", "./src/main/resources/wsdl/mis/usp/mis-usp-1.0.2.wsdl"); + } + WSDL_LOCATION = url; + } + + public GetMandatesService(URL wsdlLocation) { + super(wsdlLocation, SERVICE); } public GetMandatesService(URL wsdlLocation, QName serviceName) { @@ -43,17 +44,38 @@ public class GetMandatesService } public GetMandatesService() { - super(GETMANDATESSERVICE_WSDL_LOCATION, new QName("http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", "GetMandatesService")); + 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 GetMandatesService(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 GetMandatesService(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 GetMandatesService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { + super(wsdlLocation, serviceName, features); + } + /** - * + * * @return * returns GetMandatesPortType */ @WebEndpoint(name = "GetMandatesPort") public GetMandatesPortType getGetMandatesPort() { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", "GetMandatesPort"), GetMandatesPortType.class); + return super.getPort(GetMandatesPort, GetMandatesPortType.class); } /** @@ -65,7 +87,7 @@ public class GetMandatesService */ @WebEndpoint(name = "GetMandatesPort") public GetMandatesPortType getGetMandatesPort(WebServiceFeature... features) { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/mandates/mis/usp/1.0.2/wsdl", "GetMandatesPort"), GetMandatesPortType.class, features); + return super.getPort(GetMandatesPort, GetMandatesPortType.class, features); } } -- cgit v1.2.3