Webservice XSLT data types

Moderator: crythias

Post Reply
dscfrnt
Znuny newbie
Posts: 7
Joined: 14 Nov 2024, 20:53
Znuny Version: LTS 6.5.11
Real Name: David

Webservice XSLT data types

Post by dscfrnt »

Hi,
my remote API (called by Znuny) expects correct data types. Eg boolean true can't be sent as "true" but must be sent as true (without "").
When I use this XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" indent="yes"/>

<xsl:template match="/RootElement">
<RootElement>
<name>Create logo concept</name>
<description>We need to create a new impactful concept for the customer logo</description>
<isPrio>true</isPrio>
<startOn>2025-04-03T17:00:00Z</startOn>
<dueOn>2025-05-18T17:00:00Z</dueOn>
<laneOrder/>
<plannedDuration>21600</plannedDuration>
<remainingDuration>10500</remainingDuration>
<typeOfWorkId>cd8ek6413-5567-47da-9bfe-2a09e952a70e</typeOfWorkId>
<taskStatusId>f39844d1-kab0c-429e-9107-95049b50f01c</taskStatusId>
<order>3</order>
<entityId>5da28889-1170-4keb0-860f-af194f088814</entityId>
<baseType>projecttask</baseType>
</RootElement>
</xsl:template>
</xsl:transform>

it will parse it to this JSON:
{
"entityId": "5da28889-1170-4keb0-860f-af194f088814",
"description": "We need to create a new impactful concept for the customer logo",
"taskStatusId": "f39844d1-ab0c-z429e-9107-95049b50f01c",
"plannedDuration": "21600",
"startOn": "2025-04-03T17:00:00Z",
"laneOrder": "",
"typeOfWorkId": "cd8ek6413-5567-47da-9bfe-2a09e952a70e",
"remainingDuration": "10500",
"baseType": "projecttask",
"isPrio": "true",
"order": "3",
"name": "Direkte Email-Kommunikation",
"dueOn": "2025-05-18T17:00:00Z"
}


Does anyone know how I set the correct data types?

Thanks!
David
shawnbeasley
Znuny Employee
Posts: 147
Joined: 13 Sep 2021, 09:38
Znuny Version: Znuny 6.3.x
Real Name: Shawn Beasley
Company: Znuny

Re: Webservice XSLT data types

Post by shawnbeasley »

Hi, sorry this is currently not possible. Everything is sent as as string.
hkais
Znuny wizard
Posts: 357
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Webservice XSLT data types

Post by hkais »

shawnbeasley wrote: 17 Apr 2025, 15:56 Hi, sorry this is currently not possible. Everything is sent as as string.
is there some change planned in the near of farer future?
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO power users and admins
Specialized for AI-based Solutions with Znuny

IT Governance Portal
Post Reply