-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
32 lines (23 loc) · 1010 Bytes
/
Main.java
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
28
29
30
31
32
package com.nis.wsdltojava;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeSpec;
import javax.lang.model.element.Modifier;
import static org.joox.JOOX.$;
import org.joox.Match;
public class Main {
public static void main(String[] args) throws Exception {
Match append = $(Main.class.getResourceAsStream("/test.wsdl"))
.xpath("//*[local-name()='operation']");
System.out.println(append.toString());
TypeSpec helloWorld = TypeSpec.interfaceBuilder("HelloWorld")
.addModifiers(Modifier.PUBLIC)
.addMethod(MethodSpec.methodBuilder("beep")
.addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT)
.returns(ClassName.bestGuess("de.nis.MyCoolObject"))
.build())
.build();
System.out.println(helloWorld);
}
}