User Tools

Site Tools


web-integration:java-example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
web-integration:java-example [2019/08/15 06:40]
740803864 [Result Page]
web-integration:java-example [2019/08/15 06:49]
740803864 [Web Application Configuration File]
Line 241: Line 241:
 ==== Result Page ==== ==== Result Page ====
  
-After successful authentication, ''UDI'' value is printed on ''result.jsp'' page:+After successful authentication, ''UDI'' value is printed at ''result.jsp'' page:
  
-<code html>+<code javascript>
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  
Line 259: Line 259:
 </code> </code>
 ===== Web Application Configuration File ===== ===== Web Application Configuration File =====
-This file is required by Servlet API. This file provides to application ''wsUrl'' configuration value:+This file is required by Servlet API. File provides ''wsUrl'' configuration value:
  
 <code xml> <code xml>
Line 285: Line 285:
 ===== Maven Configuration File ===== ===== Maven Configuration File =====
  
 +Maven configuration file contents definition of plugin to generate WS classes and instruction to filter ''${ws.url}'' value:
 +
 +<code xml>
 +<?xml version="1.0" encoding="UTF-8"?>
 +<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/maven-v4_0_0.xsd">
 +    <modelVersion>4.0.0</modelVersion>
 +    <groupId>com.aducid</groupId>
 +    <version>1.DEV-SNAPSHOT</version>
 +    <packaging>war</packaging>
 +    <artifactId>example_ws</artifactId>
 +    <name>demo: example ws</name>
 +    <build>
 +        <finalName>example-ws</finalName>
 +        <plugins>
 +            <plugin>
 +                <groupId>org.apache.maven.plugins</groupId>
 +                <artifactId>maven-compiler-plugin</artifactId>
 +                <version>3.8.1</version>
 +                <configuration>
 +                    <source>1.8</source>
 +                    <target>1.8</target>
 +                    <encoding>UTF-8</encoding>
 +                    <debug>true</debug>
 +                    <showWarnings>true</showWarnings>
 +                </configuration>
 +            </plugin>
 +            <plugin>
 +                <groupId>org.jvnet.jax-ws-commons</groupId>
 +                <artifactId>jaxws-maven-plugin</artifactId>
 +                <version>2.3</version>
 +                <executions>
 +                    <execution>
 +                        <id>client</id>
 +                        <configuration>
 +                            <wsdlUrls>
 +                                <wsdlUrl>${ws.url}/aducid-client-api-ws/wsa?wsdl</wsdlUrl>
 +                            </wsdlUrls>
 +                            <vmArgs>
 +                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
 +                            </vmArgs>
 +                            <encoding>UTF-8</encoding>
 +                        </configuration>
 +                        <goals>
 +                            <goal>wsimport</goal>
 +                        </goals>
 +                    </execution>
 +                </executions>
 +            </plugin>
 +            <plugin>
 +                <groupId>org.apache.maven.plugins</groupId>
 +                <artifactId>maven-war-plugin</artifactId>
 +                <version>3.2.2</version>
 +                <configuration>
 +                    <webResources>
 +                        <resource>
 +                            <filtering>true</filtering>
 +                            <directory>src/main/webapp</directory>
 +                            <includes>
 +                                <include>WEB-INF/web.xml</include>
 +                            </includes>
 +                        </resource>
 +                        <resource>
 +                            <directory>${project.build.sourceDirectory}</directory>
 +                            <targetPath>sources</targetPath>
 +                        </resource>
 +                    </webResources>
 +                </configuration>
 +            </plugin>
 +        </plugins>
 +    </build>
 +    <dependencies>
 +        <dependency>
 +            <groupId>javax.servlet</groupId>
 +            <artifactId>javax.servlet-api</artifactId>
 +            <version>3.0.1</version>
 +            <scope>provided</scope>
 +        </dependency>
 +    </dependencies>
 +</project>
 +</code>
 ===== Building Application ===== ===== Building Application =====
 +
 +There is prepared batch file ''build.bat'' to build application. It is neccessary to define right ''ws.url'' value as an address to AIM server:
 +
 +<code>
 +set MAVEN_OPTS="-Xmx512m"
 +mvn -Dws.url=https://myaim.aducid.com -Dfile.encoding=UTF-8 clean install
 +</code>
  
web-integration/java-example.txt ยท Last modified: 2020/02/29 10:52 by mpospisek