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
Webservice XSLT data types
Moderator: crythias
-
- 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
Hi, sorry this is currently not possible. Everything is sent as as string.
-
- Znuny wizard
- Posts: 357
- Joined: 16 Apr 2016, 08:55
- Znuny Version: see in post
- Real Name: Hans
- Contact:
Re: Webservice XSLT data types
is there some change planned in the near of farer future?shawnbeasley wrote: ↑17 Apr 2025, 15:56 Hi, sorry this is currently not possible. Everything is sent as as string.
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
Specialized for AI-based Solutions with Znuny
IT Governance Portal