ee.datel:xtee-proxy

Java library for building X-Road v6 Adapter Servers.

License

License

GroupId

GroupId

ee.datel
ArtifactId

ArtifactId

xtee-proxy
Last Version

Last Version

1.0.7
Release Date

Release Date

Type

Type

war
Description

Description

ee.datel:xtee-proxy
Java library for building X-Road v6 Adapter Servers.
Project URL

Project URL

https://github.com/dateltaodev/xtee6adapter
Source Code Management

Source Code Management

https://github.com/dateltaodev/xtee6adapter/tree/main

Download xtee-proxy

How to add to project

<!-- https://jarcasting.com/artifacts/ee.datel/xtee-proxy/ -->
<dependency>
    <groupId>ee.datel</groupId>
    <artifactId>xtee-proxy</artifactId>
    <version>1.0.7</version>
    <type>war</type>
</dependency>
// https://jarcasting.com/artifacts/ee.datel/xtee-proxy/
implementation 'ee.datel:xtee-proxy:1.0.7'
// https://jarcasting.com/artifacts/ee.datel/xtee-proxy/
implementation ("ee.datel:xtee-proxy:1.0.7")
'ee.datel:xtee-proxy:war:1.0.7'
<dependency org="ee.datel" name="xtee-proxy" rev="1.0.7">
  <artifact name="xtee-proxy" type="war" />
</dependency>
@Grapes(
@Grab(group='ee.datel', module='xtee-proxy', version='1.0.7')
)
libraryDependencies += "ee.datel" % "xtee-proxy" % "1.0.7"
[ee.datel/xtee-proxy "1.0.7"]

Dependencies

compile (8)

Group / Artifact Type Version
com.fasterxml.jackson.dataformat : jackson-dataformat-xml jar 2.9.8
com.fasterxml.woodstox : woodstox-core jar 5.1.0
org.apache.httpcomponents : httpclient jar 4.5.8
commons-io : commons-io jar 2.6
org.apache.commons : commons-lang3 jar 3.9
org.slf4j : slf4j-api jar 1.7.21
org.slf4j : jcl-over-slf4j jar 1.7.21
org.slf4j : jul-to-slf4j jar 1.7.21

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.1.0

runtime (1)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.1.7

Project Modules

There are no modules declared in this project.

xtee6adapter

xtee6adapter is a Java library for building X-Road v6 Adapter Servers. The library implements X-Road v6 SOAP profile (version 4.0.16) and Service Metadata Protocol (version 2.1.5). The library takes care of serialization and deserialization of SOAP messages: built-in support for standard X-Road SOAP headers, only processing of application request and response elements from/to SOAP Body must be implemented. Supports Multipart/Related request and response.

Documentation

The most essential classes of the library are:

  • ee.datel.xtee.proxy.ProxyServlet : represents X-Road producer member that produces services to X-Road.
  • ee.datel.xtee.proxy.WsdlServlet : represents X-Road producer member that produces services description (WSDL) to X-Road.
  • ee.datel.xtee.proxy.response.ListMethods : represents X-Road producer member that produces metadata service listMethods to X-Road.
  • ee.datel.xtee.proxy.response.RestClient : client for service producer with REST (XML) interface.
  • ee.datel.xtee.proxy.response.MtomClient : client for service producer with SOAP (MTOM) interface.
  • ee.datel.xtee.proxy.server.logger.RequestLoggerFilter : logs all request/responses into file system.
  • ee.datel.xtee.proxy.server.ServerConfiguration : reads and holds adapter configuration.

Client adds to each producer request HTTP headers:

  • Xtee-ClientMemberCode - clientMemberCode from input Header.
  • Xtee-UserId - userId from input Header.
  • Xtee-RequestId- requestId from input Header.
  • Xtee-ThreadNumber - request adapter's identificator - same used in request/responses log files name.
  • SoapAction - {subsystemCode}.{serviceCode}.{serviceVersion}.only for SOAP producers.

Build configuration

In pom.xml file for each profile:

  • <conf.proxy.url> - this adapter access url, used in wsdl as soap:address location="<conf.proxy.url>"
  • <application.configuration> - configuration zip file full path and filename (optional then on class path)
  • <application.logging.pathbase> - full path for java logger and request/response files
  • <application.logging.max-age-months> - how many months keep request/response files in <application.logging.pathbase>/requests/

Configuration ZIP file

xtee-proxy.properties

Addeded into listMethods response as xml commenet:

  • metadata.profile= # configuration profile name
  • metadata.version= # configuration version identficator
  • metadata.date= # configuration version timestamp

Service configuration, for each service:

  • proxy.{subsystemCode}.{serviceCode}.mode= # rest or mtom - service producer type
  • proxy.{subsystemCode}.{serviceCode}.version= # {serviceVersion}
  • proxy.{subsystemCode}.{serviceCode}.xmlns= # service namespace
  • proxy.{subsystemCode}.{serviceCode}.url= # service producer URL. For REST producers adapter appends /{serviceCode}/{serviceVersion}.
  • proxy.{subsystemCode}.{serviceCode}.title= # service title

Services description

  • In zip file (or on class path /configuration/) for each subsystemCode own directory named as {subsystemCode}.
  • In the directory for each serviceCode + serviceVersion own xsd file named as {serviceCode}.{serviceVersion}.xsd. XSD file describes service request and response elements.

Service producer

REST example

@RequestMapping(value = "/archiveTables/v1", method = RequestMethod.POST, produces = MediaType.APPLICATION_XML_VALUE, consumes = {MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_XML_VALUE}) @ResponseBody public ArchiveTablesResponse getArchiveTables(final HttpServletRequest request) throws ManagedException { ... }


##### SOAP example

> ```
@SoapAction("etak.downloadArchiveFeature.v1")
  @ResponsePayload
  public DownloadArchiveFeatureResponse downloadArchiveFeature(@RequestPayload final DownloadArchiveFeature request)
              throws Exception {
      ...
  }

Versions

Version
1.0.7