Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 477dc35

Browse files
Roman JakubcoRoman Jakubco
authored andcommitted
CodeSV 1.2.1
1 parent e4a0b7d commit 477dc35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1043
-25
lines changed

codesv-examples/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
### SV as Code Code Examples
1+
### CodeSV Code Examples
2+
These are sample Gradle projects that contain tests to show the capabilities of CodeSV. All examples in these projects are virtualizing HTTP services using a HTTP fluent API.
23

3-
This is a sample gradle project containing tests showing capabilities of SV as Code. All examples are virtualizing HTTP services using HTTP fluent API.
4+
These projects are runnable only with Java 8 and Gradle.
45

5-
This project is runnable only with Java 8 and Gradle.
6+
Projects:
7+
* [virtualized-http-example](./virtualized-http-examples/)
8+
* [springboot-virtualized-soap-example](./springboot-virtualized-soap-example/)

codesv-examples/build.gradle

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
group 'com.ca.codesv'
2-
version '1.2.0'
2+
version '1.2.1'
33

44
apply plugin: 'java'
5-
6-
sourceCompatibility = 1.8
7-
targetCompatibility = 1.8
8-
ext.moduleDepVersion = "1.2.0"
9-
repositories {
10-
mavenLocal()
11-
maven { url "http://ca.bintray.com/sv" }
12-
mavenCentral()
13-
}
14-
15-
16-
dependencies {
17-
// Logging
18-
compile 'org.slf4j:slf4j-api:1.7.21'
19-
compile 'com.ca.codesv:codesv-dist-jar:1.2.0'
20-
21-
compile 'org.apache.httpcomponents:httpclient:4.5.3'
22-
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
23-
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Aug 17 14:54:26 CEST 2017
1+
#Tue Jan 09 10:20:45 CET 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip

codesv-examples/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
include 'springboot-virtualized-soap-example'
2+
include 'virtualized-http-examples'
13
rootProject.name = 'svcode-examples'
24

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Spring Boot virtualized SOAP example
2+
3+
This is a sample gradle project showing the capabilities of CodeSV at virtualizing SOAP messages with the Spring Boot WS application. This project contains the Spring Boot application that creates a webservice server from a WSDL file and creates a webservice client that can be used for making requests. When the Spring Boot application is running, it exposes the real webservice to the localhost and can be found at `http://localhost:9090/codenotfound/ws/helloworld.wsdl`.
4+
5+
Tests in this project contain an example of a real webservice call and also an example of CodeSV virtualizing the SOAP response.
6+
7+
This project is runnable only with Java 8 and Gradle.
8+
9+
#### Prerequisite
10+
To successfully compile and run this sample project, you first need to run the Gradle task genJaxb to generate necessary classes:
11+
```
12+
./gradlew genJaxb
13+
```
14+
15+
#### Running the spring boot application
16+
```
17+
./gradlew bootRun
18+
```
19+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
apply plugin: 'java'
2+
apply plugin: 'idea'
3+
apply plugin: 'org.springframework.boot'
4+
apply plugin: 'maven'
5+
apply plugin: 'checkstyle'
6+
7+
group 'com.ca.codesv'
8+
9+
buildscript {
10+
repositories {
11+
mavenLocal()
12+
maven { url "http://ca.bintray.com/sv" }
13+
mavenCentral()
14+
}
15+
dependencies {
16+
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
17+
}
18+
}
19+
20+
21+
configurations {
22+
jaxb
23+
jaxws
24+
}
25+
26+
27+
repositories {
28+
mavenLocal()
29+
maven { url "http://ca.bintray.com/sv" }
30+
mavenCentral()
31+
}
32+
33+
task genJaxb {
34+
ext.destDir = file("${buildDir}/generated-sources/jaxb")
35+
ext.classesDir = "${buildDir}/classes/jaxb"
36+
doLast {
37+
ant {
38+
mkdir(dir: sourceSets.main.output.classesDir)
39+
mkdir(dir: destDir)
40+
mkdir(dir: classesDir)
41+
taskdef(name: 'wsimport',
42+
classname: 'com.sun.tools.ws.ant.WsImport',
43+
classpath: configurations.jaxws.asPath
44+
)
45+
wsimport(keep: true,
46+
destdir: sourceSets.main.output.classesDir,
47+
sourcedestdir: destDir,
48+
extension: "true",
49+
verbose: "false",
50+
quiet: "false",
51+
package: "com.ca.codesv.types.greeting",
52+
xnocompile: "true",
53+
wsdl: "${projectDir}/src/main/resources/wsdl/greeting.wsdl") {
54+
xjcarg(value: "-XautoNameResolution")
55+
}
56+
57+
javac(destdir: classesDir, source: 1.6, target: 1.6, debug: true,
58+
debugLevel: "lines,vars,source",
59+
classpath: configurations.jaxb.asPath) {
60+
src(path: destDir)
61+
include(name: "**/*.java")
62+
include(name: "*.java")
63+
}
64+
}
65+
}
66+
}
67+
68+
sourceCompatibility = 1.8
69+
targetCompatibility = 1.8
70+
71+
ext['jetty.version'] = '9.2.17.v20160517'
72+
73+
dependencies {
74+
compile("org.springframework.boot:spring-boot-starter")
75+
compile("org.springframework.boot:spring-boot-starter-test")
76+
compile("org.springframework.boot:spring-boot-starter-web-services")
77+
compile(files(genJaxb.classesDir).builtBy(genJaxb))
78+
79+
jaxb("com.sun.xml.bind:jaxb-xjc:2.1.7")
80+
jaxws('com.sun.xml.ws:jaxws-tools:2.1.4')
81+
82+
testCompile("junit:junit:4.12")
83+
testCompile("com.ca.codesv:codesv-dist-jar:1.2.1")
84+
}
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Jan 09 10:20:45 CET 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip

codesv-examples/springboot-virtualized-soap-example/gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)