-
Notifications
You must be signed in to change notification settings - Fork 937
/
Copy pathAxis2JaxWsTest.groovy
27 lines (22 loc) · 1.2 KB
/
Axis2JaxWsTest.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
import java.nio.charset.StandardCharsets
class Axis2JaxWsTest extends AbstractJaxWsTest {
static {
updateConfiguration()
}
static updateConfiguration() {
// read default configuration file inside axis2 jar
String configuration = Axis2JaxWsTest.getClassLoader().getResourceAsStream("axis2.xml").getText(StandardCharsets.UTF_8.name())
// customize deployer so axis2 can find our services
configuration = configuration.replace("org.apache.axis2.jaxws.framework.JAXWSDeployer", "test.CustomJaxWsDeployer")
configuration = configuration.replace("<!--<parameter name=\"servicePath\">services</parameter>-->", "<parameter name=\"servicePath\">ws</parameter>")
configuration = configuration.replace("<parameter name=\"useGeneratedWSDLinJAXWS\">false</parameter>", "<parameter name=\"useGeneratedWSDLinJAXWS\">true</parameter>")
configuration = configuration.replace("<module ref=\"addressing\"/>", "")
File configurationDirectory = new File("build/axis-conf/")
configurationDirectory.mkdirs()
new File(configurationDirectory, "axis2.xml").setText(configuration, StandardCharsets.UTF_8.name())
}
}