Bonjour,
J'essai de créé un web service soap en depuis un WSDL en utilsant maven et CXF 3.
Mon POM est le suivant
La compile et le packaging se passent bien, si je lance le serveur depuis eclipse je n'ai pas de problème, par contre si je lance mon serveur depuis le shell...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.ocpp</groupId> <artifactId>OCPP2RC2SupervisionSimulator</artifactId> <version>0.0.1-SNAPSHOT</version> <name>Supervision</name> <packaging>jar</packaging> <description>Simulated OCPP 2.0 RC2 Supervision</description> <properties> <jdk.version>1.7</jdk.version> <cxf.version>3.0.4</cxf.version> <jar.version>LATEST</jar.version> <maven.version>3.2</maven.version> <spring.version>LATEST</spring.version> </properties> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven.version}</version> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> </configuration> </plugin> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot> <wsdlOptions> <wsdlOption> <wsdl>${basedir}/src/main/resources/wsdl/OCPP_CentralSystemService_2.0.0.98.wsdl</wsdl> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <addClasspath>true</addClasspath> <mainClass>com.ocpp.Supervision</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build> </project>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 INFO: Loading XML bean definitions from class path resource [cxf.xml] Mar 13, 2015 10:52:52 AM org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader warning WARNING: Ignored XML validation warning org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 134; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
Du coup j'ai deux questions :
- Pourquoi CXF essai de télécharger le xsd, j'avas cru comprendre que ces fichiers étaient embarqués dans les jar en dépendance ?
- Comment faire fonctionner mon serveur et en stan alone,qu'il n'ai pas besoin de télécharger des choses sur le réseau pour démarrer ?
Partager