Hi Ivan,
XSD/WSDL's in in the commons package and the .template files are not the
same.
XSD/WSDL's are (more or less) the original specification files and
required for the code generation and for the client. The .template files
contain placeholders that the server needs to build an appropriate WSDL
at runtime.
- Florian
Hello,
After looking on how to fix WebSphere support for latest version of apache
chemistry, I'm a bit confused with this code:
https://github.com/apache/chemistry-opencmis/blob/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
Can XSD/WSDL's from commons be re-used instead of copy and pasting them
into server module?
https://github.com/apache/chemistry-opencmis/tree/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl
I have an idea to attach both WSDL's from commons into maven repo and then
unpack into bindings war, so there will be no ".template" files copy and
paste issue.
Please let me know WDYT.
P.S.: Below are snippets from maven on how to get WSDL into maven repo and
then use it as dependency in other maven project:
1. Project1. Publish wsdl/xsd into maven repo
<!-- Antrun to zip wsdl files and schemas, can be done
with assembly as well-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>wsdl=pack</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="target/wsdl-tmp/" />
<copy todir="target/wsdl-tmp/" flatten="true">
<fileset dir="${wsdl.path}">
<include name="**/*.*" />
</fileset>
</copy>
<zip destfile="target/wsdl.zip">
<fileset dir="target/wsdl-tmp">
<include name="**/*.*" />
</fileset>
</zip>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${plugin.version.build-helper}</version>
<executions>
<execution>
<id>2</id>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/wsdl.zip</file>
*<classifier>wsdl</classifier>*
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
2. Project 2. Use wsdl to generate client or include into target artifact:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${plugin.version.dependency}</version>
<executions>
<execution>
<id>unpack</id>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>${project.version}</version>
*<classifier>wsdl</classifier>*
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${wsdl.unpacked.path}</outputDirectory>
<includes>**/*.wsdl,**/*.xsd</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Regards,
Ivan