Provide data - Web service

Provide web service

A new web service can by created via the Web service menu / New web service. This option is only available if Web service under Provide data is selected. So that self-created web services can be consumed, the settings of the provided web service must be configured accordingly. In each configuration dialog, you can reach the corresponding Intrexx Help by pressing F1 or by clicking on the "Help" button.

Permissions

To configure web services, the portal permission "Register web services" and permission for the "Tools" module are required.

HTTPS encryption

In the following it is assumed that the relevant certificates as well keystore and truststore are already present. Care should be taken to ensure that keystore and truststore are of the Java keystore type.

AXIS2 configuration

To setup a transport using HTTPS, modifications to the Axis2 configuration file need to be carried out. Switch to the >portal directory /internal/webservice/provider/axis2/conf/ to do that and open the file "axis2.xml" in your preferred text editor. Search for the following entry:

<!-- ================================================= -->
<!-- Non-blocking http/s Transport Listener  -->
<!-- the non blocking http transport based on HttpCore + NIO extensions -->
<transportReceiver class="de.uplanet.lucy.server.webservice.provider.axis2.transport.nhttp.HttpCore NIOListener" name="http">
	<parameter locked="false" name="port">"WS_PORT"</parameter>
	<parameter locked="false" name="non-blocking">true</parameter>
	<parameter locked="false" name="hostname">"HOST_NAME"</parameter>
</transportReceiver>

Beneath this entry is another "<transportreceiver>" element that is currently commented out. Remove the comment tags to activate the entry.

<!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
<transportReceiver class="de.uplanet.lucy.server.webservice.provider.axis2.transport.nhttp.HttpCore
NIOSSLListener" name="https">
	<parameter locked="false" name="port">SSL_WS_PORT</parameter>
	<parameter locked="false" name="non-blocking">true</parameter>
	<parameter locked="false" name="keystore">
		<KeyStore>
			<Location>KEYSTORE.jks</Location>
			<Type>JKS</Type>
			<Password>KEYSTORE_PASSWORD</Password>
			<KeyPassword>KEY_PASSWORD</KeyPassword>
		</KeyStore>
	</parameter>
	<parameter locked="false" name="truststore">
		<TrustStore>
			<Location>TRUSTSTORE.jks</Location> 
			<Type>JKS</Type>
			<Password>TRUSTSTORE_PASSWORD</Password>
		</TrustStore>
	</parameter>
	<parameter name="SSLVerifyClient">require</parameter>
<!--supports optional|require or defaults to none -->
</transportReceiver>

The following values need to be filled in correctly:

Parameters

Description

SSL_WS_PORT

Port that can be used to call the HTTPS Web service. It should be noted that this port is different to the port for unsecured Web service calls.

KEYSTORE.jks

Path to the Keystore in the format JKS. The path must be entered relevant to the portal directory \internal\webservice\provider\

KEYSTORE_PASSWORD

Password for the stated Keystore.

KEY_PASSWORD

Password for the used key.

TRUSTSTORE.jks

Path to the Truststore in the format JKS. The path must be entered relevant to the portal directory \internal\webservice\provider\

TRUSTSTORE_PASSWORD

Password for the stated Truststore.

Once the values have been entered correctly, the next entry to search for is:

<transportSender class="org.apache.axis2.transport.http.CommonsHTTPTransportSender" name="https">
	<parameter name="PROTOCOL">HTTP/1.1</parameter>
	<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>

Beneath this entry is another "<transportsender>" element that is currently commented out. Remove the comment tags to activate the entry.

<!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions-->
<transportSender name="https" class="de.uplanet.lucy.server.webservice.provider.axis2.transport.nhttp.Http
CoreNIOSSLSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="keystore" locked="false">
	<KeyStore>
		<Location>KEYSTORE.jks</Location>
		<Type>JKS</Type>
		<Password>KEYSTORE_PASSWORD</Password>
		<KeyPassword>KEY_PASSWORD</KeyPassword>
	</KeyStore>
</parameter>
<parameter locked="false" name="truststore">
	<TrustStore>
		<Location>TRUSTSTORE.jks</Location>
		<Type>JKS</Type>
		<Password>TRUSTSTORE_PASSWORD</Password>
	</TrustStore>
</parameter>
<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
	;<!--supports Strict|AllowAll|DefaultAndLocalhost or the default if none 	specified-->
</transportSender>

The following values need to be filled in correctly:

Parameters

Description

KEYSTORE.jks

Path to the Keystore in the format JKS. The path must be entered relevant to the portal directory \internal\webservice\provider\

KEYSTORE_PASSWORD

Password for the stated Keystore.

KEY_PASSWORD

Password for the used key.

TRUSTSTORE.jks

Path to the Truststore in the format JKS. The path must be entered relevant to the portal directory \internal\webservice\provider\

TRUSTSTORE_PASSWORD

Password for the stated Truststore.

Save the file and then restart the portal service. When doing this, make sure that the entries are correct, i.e. When doing this, make sure that the entries are correct, i.e. the port and https instead of http. If the URL has been correctly entered, the applied certificate must be accepted. Subsequently, the WSDL file will be shown in the browser.

More information

General
Consume web service
Export / Import