[cxf] branch master updated: Fixing test case, regenerating the expired X509 certificate

2021-02-06 Thread reta
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
 new bf94a2c  Fixing test case, regenerating the expired X509 certificate
bf94a2c is described below

commit bf94a2c424960cdfd676365c1e8286c2e12cc292
Author: reta 
AuthorDate: Sat Feb 6 17:04:56 2021 -0500

Fixing test case, regenerating the expired X509 certificate
---
 .../xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml 
b/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml
index b9e4090..d551dbd 100644
--- a/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml
+++ b/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml
@@ -3,7 +3,7 @@
 
 
 
-
MIIEFjCCA3+gAwIBAgIJAJORWX2Xsa8DMA0GCSqGSIb3DQEBBQUAMIG5MQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxFjAUBgNVBAcTDU5pYWdhcmEgRmFsbHMxLDAqBgNVBAoTI1NhbXBsZSBDbGllbnQgLS0gTk9UIEZPUiBQUk9EVUNUSU9OMRYwFAYDVQQLEw1JVCBEZXBhcnRtZW50MRcwFQYDVQQDEw53d3cuY2xpZW50LmNvbTEgMB4GCSqGSIb3DQEJARYRY2xpZW50QGNsaWVudC5jb20wHhcNMTEwMjA5MTgzMDI3WhcNMjEwMjA2MTgzMDI3WjCBuTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMRYwFAYDVQQHEw1OaWFnYXJhIEZhbGxzMSwwKgYDVQQKEyNTYW1wbGUgQ2xpZW50IC0
 [...]
+
MIIGVTCCBD2gAwIBAgIUSnJcLvUm6RKmqj4TUK8BDYdexi8wDQYJKoZIhvcNAQELBQAwgbkxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhOZXcgWW9yazEWMBQGA1UEBwwNTmlhZ2FyYSBGYWxsczEsMCoGA1UECgwjU2FtcGxlIENsaWVudCAtLSBOT1QgRk9SIFBST0RVQ1RJT04xFjAUBgNVBAsMDUlUIERlcGFydG1lbnQxFzAVBgNVBAMMDnd3dy5jbGllbnQuY29tMSAwHgYJKoZIhvcNAQkBFhFjbGllbnRAY2xpZW50LmNvbTAeFw0yMTAyMDYyMjAxMTdaFw0zMTAyMDQyMjAxMTdaMIG5MQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlvcmsxFjAUBgNVBAcMDU5pYWdhcmEgRmFsbHMxLDAqBgNVBAoMI1NhbXB
 [...]
 
 
 



[cxf] branch master updated: Fixing test

2019-04-03 Thread coheigea
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
 new 0b808a6  Fixing test
0b808a6 is described below

commit 0b808a68b71b5dec8c72355ef5d8aaf614f1636a
Author: Colm O hEigeartaigh 
AuthorDate: Wed Apr 3 13:58:20 2019 +0100

Fixing test
---
 .../tools/java2wsdl/processor/JavaToProcessorTest.java | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git 
a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
 
b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
index 00ab62d..404911c 100644
--- 
a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
+++ 
b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
@@ -30,6 +30,9 @@ import java.util.Map;
 import javax.wsdl.Definition;
 import javax.wsdl.Port;
 import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.namespace.QName;
@@ -59,7 +62,6 @@ import org.apache.cxf.tools.wsdlto.core.FrontEndProfile;
 import org.apache.cxf.tools.wsdlto.core.PluginLoader;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer;
 import org.apache.cxf.wsdl.WSDLConstants;
-import org.apache.cxf.wsdl.WSDLHelper;
 
 import org.junit.After;
 import org.junit.Before;
@@ -75,7 +77,6 @@ import static org.junit.Assert.fail;
 public class JavaToProcessorTest extends ProcessorTestBase {
 JavaToWSDLProcessor processor = new JavaToWSDLProcessor();
 String classPath = "";
-private WSDLHelper wsdlHelper = new WSDLHelper();
 @Before
 public void startUp() throws Exception {
 env = new ToolContext();
@@ -119,7 +120,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
 assertTrue("Fail to generate wsdl file: " + wsdlFile.toString(), 
wsdlFile.exists());
 
 String tns = "http://simple.fortest.tools.cxf.apache.org/;;
-Definition def = wsdlHelper.getDefinition(wsdlFile);
+
+Definition def = getDefinition(wsdlFile.getPath());
 assertNotNull(def);
 Service wsdlService = def.getService(new QName(tns, "Hello"));
 assertNotNull("Generate WSDL Service Error", wsdlService);
@@ -215,7 +217,7 @@ public class JavaToProcessorTest extends ProcessorTestBase {
 JavaToWS.main(args);
 File wsdlFile = new File(output, "java2wsdl.wsdl");
 assertTrue("Generate Wsdl Fail", wsdlFile.exists());
-Definition def = wsdlHelper.getDefinition(wsdlFile);
+Definition def = getDefinition(wsdlFile.getPath());
 Service wsdlService = def.getService(new QName(tns, serviceName));
 assertNotNull("Generate WSDL Service Error", wsdlService);
 
@@ -1043,4 +1045,12 @@ public class JavaToProcessorTest extends 
ProcessorTestBase {
 assertEquals(-1, sw.getBuffer().indexOf("Exception Message"));
 }
 
+private Definition getDefinition(String wsdl) throws WSDLException {
+WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+wsdlReader.setFeature("javax.wsdl.verbose", false);
+return wsdlReader.readWSDL(wsdl);
+
+}
+
 }