Question
· Dec 23

Import error when using SOAP wizard with Gematik TI Connector WSDL Files

Hello Community,

I'm trying to import WSDL service descriptions from Gematik (https://www.gematik.de/) to allow communication with the german TI infrastructure using the TI connectors webservice interface over a IRIS healthconnect SOAP operation. For import I'm using the SOAP Wizard Add-Inn from Studio.

The WSDL files can be found here: https://fachportal.gematik.de/fileadmin/Fachportal/Downloadcenter/Schemata-_und_WSDL-Dateien/Schema-_und_WSDL-Dateien/OPB3.1_Schemadateien_R3.1.2_Kon_PTV3_20191002.zip

The interface specification and some helpful graphics are published here: https://gemspec.gematik.de/downloads/gemILF/gemILF_PS/gemILF_PS_V2.22.0.html

I exctracted the folder with the schema files to the filesystem of our Health Connect server and tried to import some services.

CardService and EventService worked as expected without any problems. With some configuration of the connectors endpoint it is possible to list all card terminals associated with the specific connector. When importing the VSDService, which allows to read health ensurance card data from card reader terminals, I got import errors. The file is located in conn/vsds/VSDService.wsdl relatively located to the root folder of the archive. The file could be loaded and parsed in the first place, but when trying to create class files an business operations I got an error

I thought it might be a rights problem and changed ownership of all files to the cacheusr (called irisuser in new installations), but this did not change anything.

I found this post in the developer community, but this one also does not seem to cover my case. The VSDService.wsdl is parsable and the error occurres at a later point while processing the contents. I had a similar error before with another file, when trying to import without providing the complete folder structure and contained files. In the current case all references exist and should be resolvable. Here is the WSDL File I'm trying to import:

<?xml version="1.0" encoding="UTF-8"?>
<!-- gematik revision="\main\rel_online\rel_ors1\1" -->
<!-- edited with XMLSpy v2010 (http://www.altova.com) by n.n. (gematik) -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:GERROR="http://ws.gematik.de/tel/error/v2.0" xmlns:VSD="http://ws.gematik.de/conn/vsds/VSDService/v5.2" name="VSD" targetNamespace="http://ws.gematik.de/conn/vsds/VSDService/v5.2">
	<documentation>
		Copyright (c) 2011, gematik - Gesellschaft für Telematikanwendungen der Gesundheitskarte mbH. Alle Rechte vorbehalten.
		Beschreibung: Dienste zum Lesen der Versichertenstammten von einer eGK
	</documentation>
	<types>
		<xs:schema>
			<xs:import schemaLocation="VSDService.xsd" namespace="http://ws.gematik.de/conn/vsds/VSDService/v5.2"/>
			<xs:import schemaLocation="../../tel/error/TelematikError.xsd" namespace="http://ws.gematik.de/tel/error/v2.0"/>
		</xs:schema>
	</types>
	<message name="ReadVSDRequestMessage">
		<part name="parameter" element="VSD:ReadVSD"/>
	</message>
	<message name="ReadVSDResponseMessage">
		<part name="parameter" element="VSD:ReadVSDResponse"/>
	</message>
	<message name="FaultMessage">
		<part name="parameter" element="GERROR:Error"/>
	</message>
	<portType name="VSDServicePortType">
		<operation name="ReadVSD">
			<input message="VSD:ReadVSDRequestMessage"/>
			<output message="VSD:ReadVSDResponseMessage"/>
			<fault name="FaultMessage" message="VSD:FaultMessage"/>
		</operation>
	</portType>
	<binding name="VSDServiceBinding" type="VSD:VSDServicePortType">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="ReadVSD">
			<soap:operation soapAction="http://ws.gematik.de/conn/vsds/VSDService/v6.0#ReadVSD"/>
			<input>
				<soap:body use="literal"/>
			</input>
			<output>
				<soap:body use="literal"/>
			</output>
			<fault name="FaultMessage">
				<soap:fault name="FaultMessage" use="literal"/>
			</fault>
		</operation>
	</binding>
	<service name="VSDService">
		<port name="VSDServicePort" binding="VSD:VSDServiceBinding">
			<soap:address location="http://unspecified"/>
		</port>
	</service>
</definitions>

I would really appreciate, if anyone would help me out with some ideas how to fix this error.

Kind regards,

Martin

Product version: IRIS 2021.1
$ZV: IRIS for UNIX (SUSE Linux Enterprise Server for x86-64) 2021.1 (Build 215U) Wed Jun 9 2021 09:48:27 EDT
Discussion (5)1
Log in or sign up to continue

Hi @Martin Staudigel you only can include DTD in the XSD if you define it using specific flags.

The solution is to create a new class to import the schema in XSD programatically. This is an example of the code:

Class XML.SchemaReader Extends %Persistent

{
ClassMethod ImportClasses(fileName As %String = "C:\Temp\example.xsd") As %Status
{
#include %occInclude
#include %occSAX
		#dim sReader as %XML.Utils.SchemaReader = ##class(%XML.Utils.SchemaReader).%New()
		#dim features as Filero.DataType.String
		set sReader.SAXFlags = $$$SAXFULLDEFAULT-$$$SAXVALIDATIONREUSEGRAMMAR
		set sReader.MakePersistent = 0
		set sReader.MakeRelationships = 0
		set sReader.GenerateXMLNILNOOBJECT = 1
		set sReader.GenerateXMLNIL = 1
		set sReader.KeepEmptyClasses = 1
		set features("BINARYASSTREAM") = 1
		quit sReader.Process(fileName,"ImportedScheme",.features)
}
}

This code will create a package "ImportedScheme" in your IRIS

Hello Luis,

thanks for taking the time to analyze my problem. I'm not sure if I fully understood what the problem and the suggested solution is. In the end I would like to have a functional SOAP Operation, with request and response classes to use the service.

As I understand your answer, the problem lies in the inclusion of datatypes, which is not supported by the SOAP wizard, so the process has to be done programmatically and the problem lies here:

<types>
  <xs:schema>
    <xs:import schemaLocation="VSDService.xsd" namespace="http://ws.gematik.de/conn/vsds/VSDService/v5.2"/>
    <xs:import schemaLocation="../../tel/error/TelematikError.xsd" namespace="http://ws.gematik.de/tel/error/v2.0"/>
  </xs:schema>
</types>

I would have to Import the referenced schemas using your to create the contained datatypes. I do so by importing the referenced xsd file using the classmethod you provided. After that, I'd guess the original wsdl file has also to be modified in some way to set the referenced datatypes to the formerly imported. Are my assumptions right, and how could I do this?

What I meanwhile tried was to import the two schemas into the currently used namespace using the schema import feature of the management portal. Doing so leads to the creation of some new datatypes:

When I'm then removing the "types" section from the wsdl file, I'm getting another error, which indicates that some other parts are missing.

Could you explain how to enable the import and the class creation of the initial wsdl file after the xsd schema files are imported? I'm sorry, but it seems like there is a missing piece in my understanding.

Thanks and regards,

Martin

Hello Jani,

as far as I understand does the importer resolve imported references. Normally there is no need to separately import the referenced schemas when importing a wsdl file. This worked with some other serviced quite good, it is just two of them, which do not work.

Anyways, I was using the schema reader provided by Luis and the result from importing the VSDService.xsd is a package structure that also contains the elements defined by the file ConnectorContext.xsd. What I still don't have is the soap operation class and the request and response message classes...

Kind regards, Martin

What solved my problem was to copy the referenced XSD file from schemaLocation="../../tel/error/TelematikError.xsd" to the local folder where the wsdl file was located and then change the reference to schemaLocation="TelematikError.xsd".

After doing this the import of the wsdl file ran through and created all datatype classes, request, resoponse and operation class.

Thanks for your help and time,

regards, Martin