soap-client
soap-client copied to clipboard
How I do correctly iterate nested child elements?
Q | A |
---|---|
Version | 0.7.11 |
Support Question
Be kind, I am pretty new to SOAP, so apologies in advance. We have the following structure in our WSDL:
<xsd:choice>
<xsd:element name="SupportPerson" type="UserRegistrationDetailsType" minOccurs="0">
<xsd:element name="SupportOrganisation" type="org:SupportOrganisationsType" minOccurs="0">
</xsd:choice>
I am able to get the class layout sent to the soap library with the expected data structure, however although the <SupportOrganisation>
element is generated in the request, it seems to take the shape of some other type - it's like the data is being applied to it differently and so only a small set of fields are going through. This is why I think the <xsd:choice>
structure is causing issues here, do we need to iterate over child elements differently? I think the field values in the request are mistakenly applied to the first optional element (in this case the <SupportPerson>
element), and so they don't get passed through to the <SupportOrganisation>
element and populated.
Hello,
Not sure about this either. Can you provide me the relevant PHP classes and how you are using this? I did find some issues in php-src according to xsd choices in soap that might apply to this:
https://bugs.php.net/bug.php?id=77457 https://bugs.php.net/bug.php?id=50997 https://bugs.php.net/bug.php?id=70756
So it might be a PHP bug.
Hi @veewee thanks for answering, I'm the developer working on this, @stgeer is my helpful delivery manager π
It's a strange one, as even though I'm setting plenty of values in the class constructors, they are being ignored or applied to other fields in the generated SOAP request. There are a lot of moving parts to this one unfortunately.
This is the outer XML type:
<xsd:complexType name="SupportingPartyType">
<xsd:sequence>
<xsd:element name="UserType" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="IsPrimaryFlag" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="SupportingPartyRole" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="Relationship" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="RelationshipStartDate" type="xsd:date" minOccurs="0"/>
<xsd:element name="RelationshipEndDate" type="xsd:date" minOccurs="0" nillable="true"/>
<xsd:choice>
<xsd:element name="SupportPerson" type="UserRegistrationDetailsType" minOccurs="0"/>
<xsd:element name="SupportOrganisation" type="org:SupportOrganisationType" minOccurs="0"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
This is the SupportPerson
type:
<xsd:complexType name="UserRegistrationDetailsType">
<xsd:sequence>
<xsd:element name="UserType" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="Title" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="FirstName" type="cm:String50LengthType" minOccurs="0"/>
<xsd:element name="LastName" type="cm:String50LengthType" minOccurs="0"/>
<xsd:element name="Gender" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="DOB" type="xsd:date" minOccurs="0"/>
<xsd:element name="MedicareNumber" type="pers:MedicareNumberType" minOccurs="0"/>
<xsd:element name="EmailAddress" type="cm:EmailLengthType" minOccurs="0"/>
<xsd:element name="IndigenousStatus" type="cm:String30LengthType" minOccurs="0"/>
<xsd:element name="PhoneContactList" type="PhoneContactListType" minOccurs="0"/>
<xsd:element name="RequireOnlineAccessFlag" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="IsPrimaryFlag" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="ReceiveEmailNotificationFlag" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="ReceiveSMSNotificationFlag" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="AddressList" type="add:MandatoryStructuredAddressListType" minOccurs="0"/>
<xsd:element name="TISLanguage" type="xsd:string" minOccurs="0"/>
<xsd:element name="NRSRequiredFlag" type="xsd:boolean" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
When I set values for SupportPerson
, the structure is correct and I get a SOAP message with all required fields set like this:
<ns2:SupportingParty>\n
<ns2:UserType>Other</ns2:UserType>\n
<ns2:IsPrimaryFlag>false</ns2:IsPrimaryFlag>\n
<ns2:SupportingPartyRole>Representative (Authorised)</ns2:SupportingPartyRole>\n
<ns2:Relationship>Child</ns2:Relationship>\n
<ns2:RelationshipStartDate>2022-06-14</ns2:RelationshipStartDate>\n
<ns2:RelationshipEndDate xsi:nil="true"/>\n
<ns2:SupportPerson>\n
<ns2:Title>Mrs</ns2:Title>\n
<ns2:FirstName>Test-Helper</ns2:FirstName>\n
<ns2:LastName>.......</ns2:LastName>\n
<ns2:Gender>Female</ns2:Gender>\n
<ns2:DOB>1944-07-16</ns2:DOB>\n
<ns2:MedicareNumber IRN="3">2303303661</ns2:MedicareNumber>\n
<ns2:EmailAddress>.......</ns2:EmailAddress>\n
<ns2:PhoneContactList>\n
<ns2:PreferredPhoneContact>Mobile</ns2:PreferredPhoneContact>\n
<ns2:Phone>\n
<ns2:PhoneType>Mobile</ns2:PhoneType>\n
<ns2:CountryCode>+61</ns2:CountryCode>\n
<ns2:AreaCode/>\n
<ns2:PhoneNumber>0499........</ns2:PhoneNumber>\n
</ns2:Phone>\n
</ns2:PhoneContactList>\n
<ns2:ReceiveEmailNotificationFlag>true</ns2:ReceiveEmailNotificationFlag>\n
<ns2:ReceiveSMSNotificationFlag>true</ns2:ReceiveSMSNotificationFlag>\n
<ns2:AddressList>\n
<ns3:Address>\n
<ns3:AddressPurpose>Home</ns3:AddressPurpose>\n
<ns3:AddressType>Street Address</ns3:AddressType>\n
<ns3:StreetName>BROADWAY</ns3:StreetName>\n
<ns3:StreetStartNumber>999</ns3:StreetStartNumber>\n
<ns3:Latitude>-37.857094</ns3:Latitude>\n
<ns3:Longitude>153.72906</ns3:Longitude>\n
<ns3:GeoCodeAddress>999 BROADWAY, DUNOLLY VIC 3472</ns3:GeoCodeAddress>\n
<ns3:Suburb>DUNOLLY</ns3:Suburb>\n
<ns3:State>VIC</ns3:State>\n
<ns3:Country>Australia</ns3:Country>\n
<ns3:PostCode>3472</ns3:PostCode>\n
</ns3:Address>\n
</ns2:AddressList>\n
<ns2:TISLanguage/>\n
<ns2:NRSRequiredFlag>false</ns2:NRSRequiredFlag>\n
</ns2:SupportPerson>\n
</ns2:SupportingParty>
This is SupportOrganisation
:
<xsd:complexType name="SupportOrganisationType">
<xsd:complexContent>
<xsd:extension base="OutletBaseBasic">
<xsd:sequence>
<xsd:element ref="pers:Employee" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
...which is an extension of this:
<xsd:complexType name="OutletBaseBasic">
<xsd:sequence>
<xsd:element name="OutletID" type="xsd:string" minOccurs="0"/>
<xsd:element name="OutletType" type="xsd:string" minOccurs="0"/>
<xsd:element name="OutletName" type="xsd:string" minOccurs="0"/>
<xsd:element name="ParentOrganisationID" type="xsd:string" minOccurs="0"/>
<xsd:element name="ParentOrganisationName" type="xsd:string" minOccurs="0"/>
<xsd:element name="ProviderID" type="xsd:string" minOccurs="0"/>
<xsd:element name="ProviderName" type="xsd:string" minOccurs="0"/>
<xsd:element name="NAPSServiceProviderId" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
...and including this:
<xsd:element name="Employee" type="Employee"/>
<xsd:complexType name="Employee">
<xsd:complexContent>
<xsd:extension base="Person">
<xsd:sequence>
<xsd:element name="PreferredName" type="xsd:string" minOccurs="0"/>
<xsd:element name="MiddleName" type="xsd:string" minOccurs="0"/>
<xsd:element name="RowVersion" type="xsd:string" minOccurs="0"/>
<xsd:element name="ID" type="xsd:string" minOccurs="0"/>
<xsd:element name="UserType" type="xsd:string" minOccurs="0"/>
<xsd:element name="JobTitle" type="xsd:string" minOccurs="0"/>
<xsd:element name="Title" type="xsd:string" minOccurs="0"/>
<xsd:element name="EMailAddr" type="xsd:string" minOccurs="0"/>
<xsd:element name="LoginName" type="xsd:string" minOccurs="0"/>
<xsd:element name="Status" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Active"/>
<xsd:enumeration value="Inactive"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DeactivateDate" type="xsd:date" nillable="true" minOccurs="0"/>
<xsd:element name="PrimaryOrganizationID" type="xsd:string" minOccurs="0"/>
<xsd:element name="PrimaryPosition" type="xsd:string" minOccurs="0"/>
<xsd:element name="PrimaryPositionID" type="xsd:string" minOccurs="0"/>
<xsd:element name="PrimaryResponsibilityID" type="xsd:string" minOccurs="0"/>
<xsd:element name="HomePhoneNumber" type="xsd:string" minOccurs="0"/>
<xsd:element name="MobilePhoneNumber" type="xsd:string" minOccurs="0"/>
<xsd:element name="WorkPhoneNumber" type="xsd:string" minOccurs="0"/>
<xsd:element name="ADNotificationStatus" type="xsd:string" minOccurs="0"/>
<xsd:element name="PositionList" type="PositionList" minOccurs="0" maxOccurs="1"/>
<xsd:element name="ResponsibilityList" type="ResponsibilityList" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Accreditation" type="Accreditation" minOccurs="0"/>
<xsd:element name="PortalViewTypePref" type="xsd:string" minOccurs="0"/>
<xsd:element name="FaxNumber" type="xsd:string" minOccurs="0"/>
<xsd:element name="ACATID" type="xsd:string" minOccurs="0"/>
<xsd:element name="MName" type="xsd:string" minOccurs="0"/>
<xsd:element name="ListContextOrganization" type="ListContextOrganizationType" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
...which is an extension of this:
<xsd:element name="Person" type="Person"/>
<xsd:complexType name="Person">
<xsd:sequence>
<xsd:element name="FirstName" type="xsd:string" minOccurs="0"/>
<xsd:element name="LastName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
PHP classes are:
<?php
namespace Drupal\mac_soapclient\WebEnquiry\Types;
use Phpro\SoapClient\Type\RequestInterface;
class SupportOrganisationType extends OutletBaseBasic implements RequestInterface
{
/**
* @var \Drupal\mac_soapclient\WebEnquiry\Types\Employee
*/
private Employee $Employee;
/**
* Constructor
*
* @var string $OutletID
* @var string $OutletType
* @var string $OutletName
* @var string $ParentOrganisationID
* @var string $ParentOrganisationName
* @var string $ProviderID
* @var string $ProviderName
* @var string $NAPSServiceProviderId
* @var \Drupal\mac_soapclient\WebEnquiry\Types\Employee|null $Employee
*/
public function __construct($OutletID, $OutletType, $OutletName, $ParentOrganisationID, $ParentOrganisationName, $ProviderID, $ProviderName, $NAPSServiceProviderId, $Employee)
{
parent::__construct(
$OutletID,
$OutletType,
$OutletName,
$ParentOrganisationID,
$ParentOrganisationName,
$ProviderID,
$ProviderName,
$NAPSServiceProviderId,
);
if ($Employee) {
$this->Employee = $Employee;
}
}
/**
* @return \Drupal\mac_soapclient\WebEnquiry\Types\Employee
*/
public function getEmployee()
{
return $this->Employee;
}
/**
* @param \Drupal\mac_soapclient\WebEnquiry\Types\Employee $Employee
* @return SupportOrganisationType
*/
public function withEmployee($Employee)
{
$new = clone $this;
$new->Employee = $Employee;
return $new;
}
}
When I set all these values in the class constructor, and pass in a class looking like this:
-SupportingParty: Drupal\mac_soapclient\WebEnquiry\Types\SupportingPartyType^ {#3716
-UserType: "Other"
-IsPrimaryFlag: true
-SupportingPartyRole: "Representative (Regular)"
-Relationship: ""
-RelationshipStartDate: DateTime @1655188896 {#3714
date: 2022-06-14 06:41:36.626919 UTC (+00:00)
}
-RelationshipEndDate: null
-SupportOrganisation: Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType^ {#3711
-Employee: Drupal\mac_soapclient\WebEnquiry\Types\Employee^ {#3709
-PreferredName: null
-MiddleName: null
-RowVersion: null
-ID: null
-UserType: null
-JobTitle: null
-Title: "Mr"
-EMailAddr: "[email protected]"
-LoginName: null
-Status: null
-DeactivateDate: null
-PrimaryOrganizationID: null
-PrimaryPosition: null
-PrimaryPositionID: null
-PrimaryResponsibilityID: null
-HomePhoneNumber: null
-MobilePhoneNumber: null
-WorkPhoneNumber: "+610421212145"
-ADNotificationStatus: null
-PositionList: null
-ResponsibilityList: null
-Accreditation: null
-PortalViewTypePref: null
-FaxNumber: null
-ACATID: null
-MName: null
-ListContextOrganization: null
-FirstName: "Helper"
-LastName: "OrgHelper"
}
-OutletID: "2-ZORF7VK"
-OutletType: null
-OutletName: "MyGovID Outlet"
-ParentOrganisationID: "2-ZOLA62T"
-ParentOrganisationName: "CRSixThreeEight Calwell"
-ProviderID: null
-ProviderName: null
-NAPSServiceProviderId: null
}
}
It ends up generating a SOAP message that looks like this:
<ns2:SupportingParty>\n
<ns2:UserType>Other</ns2:UserType>\n
<ns2:IsPrimaryFlag>true</ns2:IsPrimaryFlag>\n
<ns2:SupportingPartyRole>Representative (Regular)</ns2:SupportingPartyRole>\n
<ns2:Relationship/>\n
<ns2:RelationshipStartDate>2022-06-14</ns2:RelationshipStartDate>\n
<ns2:RelationshipEndDate xsi:nil="true"/>\n
<ns2:SupportOrganisation>\n
<ns4:Employee>\n
<ns4:Title>Mr</ns4:Title>\n
<ns4:EMailAddr>[email protected]</ns4:EMailAddr>\n
<ns4:DeactivateDate xsi:nil="true"/>\n
<ns4:WorkPhoneNumber>+610421212145</ns4:WorkPhoneNumber>\n
</ns4:Employee>\n
</ns2:SupportOrganisation>\n
</ns2:SupportingParty>\n
See how the OutletID
, OutletName
properties etc are missing from the top level SupportOrganisation
object? And the Employee
object is missing several values too?
Any thoughts or ideas?
Oh, the class that builds the SupportingParty
element is:
<?php
namespace Drupal\mac_soapclient\WebEnquiry\Types;
use Phpro\SoapClient\Type\RequestInterface;
class SupportingPartyType implements RequestInterface
{
/**
* @var string
*/
private $UserType;
/**
* @var bool
*/
private $IsPrimaryFlag;
/**
* @var string
*/
private $SupportingPartyRole;
/**
* @var string
*/
private $Relationship;
/**
* @var \DateTime
*/
private $RelationshipStartDate;
/**
* @var \DateTime
*/
private $RelationshipEndDate;
// /**
// * @var \Drupal\mac_soapclient\WebEnquiry\Types\UserRegistrationDetailsType
// */
// private $SupportPerson;
//
// /**
// * @var \Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType
// */
// private $SupportOrganisation;
/**
* Constructor
*
* @var string $UserType
* @var bool $IsPrimaryFlag
* @var string $SupportingPartyRole
* @var string $Relationship
* @var \DateTime $RelationshipStartDate
* @var \DateTime $RelationshipEndDate
* @var \Drupal\mac_soapclient\WebEnquiry\Types\UserRegistrationDetailsType|null $SupportPerson
* @var \Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType|null $SupportOrganisation
*/
public function __construct($UserType, $IsPrimaryFlag, $SupportingPartyRole, $Relationship, $RelationshipStartDate, $RelationshipEndDate, $SupportPerson = NULL, $SupportOrganisation = NULL)
{
$this->UserType = $UserType;
$this->IsPrimaryFlag = $IsPrimaryFlag;
$this->SupportingPartyRole = $SupportingPartyRole;
$this->Relationship = $Relationship;
$this->RelationshipStartDate = $RelationshipStartDate;
$this->RelationshipEndDate = $RelationshipEndDate;
if (isset($SupportPerson)) {
$this->SupportPerson = $SupportPerson;
}
else if (isset($SupportOrganisation)) {
$this->SupportOrganisation = $SupportOrganisation;
}
// $this->SupportPerson = $SupportPerson;
// $this->SupportOrganisation = $SupportOrganisation;
}
/**
* @return string
*/
public function getUserType()
{
return $this->UserType;
}
/**
* @param string $UserType
* @return SupportingPartyType
*/
public function withUserType($UserType)
{
$new = clone $this;
$new->UserType = $UserType;
return $new;
}
/**
* @return bool
*/
public function getIsPrimaryFlag()
{
return $this->IsPrimaryFlag;
}
/**
* @param bool $IsPrimaryFlag
* @return SupportingPartyType
*/
public function withIsPrimaryFlag($IsPrimaryFlag)
{
$new = clone $this;
$new->IsPrimaryFlag = $IsPrimaryFlag;
return $new;
}
/**
* @return string
*/
public function getSupportingPartyRole()
{
return $this->SupportingPartyRole;
}
/**
* @param string $SupportingPartyRole
* @return SupportingPartyType
*/
public function withSupportingPartyRole($SupportingPartyRole)
{
$new = clone $this;
$new->SupportingPartyRole = $SupportingPartyRole;
return $new;
}
/**
* @return string
*/
public function getRelationship()
{
return $this->Relationship;
}
/**
* @param string $Relationship
* @return SupportingPartyType
*/
public function withRelationship($Relationship)
{
$new = clone $this;
$new->Relationship = $Relationship;
return $new;
}
/**
* @return \DateTime
*/
public function getRelationshipStartDate()
{
return $this->RelationshipStartDate;
}
/**
* @param \DateTime $RelationshipStartDate
* @return SupportingPartyType
*/
public function withRelationshipStartDate($RelationshipStartDate)
{
$new = clone $this;
$new->RelationshipStartDate = $RelationshipStartDate;
return $new;
}
/**
* @return \DateTime
*/
public function getRelationshipEndDate()
{
return $this->RelationshipEndDate;
}
/**
* @param \DateTime $RelationshipEndDate
* @return SupportingPartyType
*/
public function withRelationshipEndDate($RelationshipEndDate)
{
$new = clone $this;
$new->RelationshipEndDate = $RelationshipEndDate;
return $new;
}
/**
* @return \Drupal\mac_soapclient\WebEnquiry\Types\UserRegistrationDetailsType
*/
public function getSupportPerson()
{
return $this->SupportPerson;
}
/**
* @param \Drupal\mac_soapclient\WebEnquiry\Types\UserRegistrationDetailsType $SupportPerson
* @return SupportingPartyType
*/
public function withSupportPerson($SupportPerson)
{
$new = clone $this;
$new->SupportPerson = $SupportPerson;
return $new;
}
/**
* @return \Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType
*/
public function getSupportOrganisation()
{
return $this->SupportOrganisation;
}
/**
* @param \Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType $SupportOrganisation
* @return SupportingPartyType
*/
public function withSupportOrganisation($SupportOrganisation)
{
$new = clone $this;
$new->SupportOrganisation = $SupportOrganisation;
return $new;
}
}
Hello @ocean ,
Thanks for the detailed information. As pointed out in the links above, I am quite sure that it is a bug in PHP's encoding/decoding system. (You can validate that by using the classmap and generated classes directly on PHP's soapclient)
I don't really have a solution for you lying around here, since it is a bug internally in PHP - but you might be able to do something with custom type converters? https://github.com/php-soap/ext-soap-engine#typeconverter
Alternatively, if you have close contact with the SOAP server people, you might ask for an alternative approach or a change in the WSDL in order to support both scenarios without having it as a choice persΓ©?
If you find any solution, feel free to let me know.
Thanks @veewee
I got the server team to change the WSDL to remove the <xsd:choice>
structure around the SupportPerson
and SupportOrganisation
, and have just spent all day regenerating all the classes and fixing them all up to work again.
Then I submitted my test and the SOAP message body that is generated is the same π
That is, I am still feeding it this object structure:
-SupportingParty: Drupal\mac_soapclient\WebEnquiry\Types\SupportingPartyType^ {#3716
-UserType: "Other"
-IsPrimaryFlag: true
-SupportingPartyRole: "Representative (Regular)"
-Relationship: ""
-RelationshipStartDate: DateTime @1655298677 {#3714
date: 2022-06-15 13:11:17.969535 UTC (+00:00)
}
-RelationshipEndDate: null
-SupportOrganisation: Drupal\mac_soapclient\WebEnquiry\Types\SupportOrganisationType^ {#3711
-Employee: Drupal\mac_soapclient\WebEnquiry\Types\Employee^ {#3709
-PreferredName: null
-MiddleName: null
-RowVersion: null
-ID: null
-UserType: null
-JobTitle: null
-Title: "Mr"
-EMailAddr: "[email protected]"
-LoginName: null
-Status: null
-DeactivateDate: null
-PrimaryOrganizationID: null
-PrimaryPosition: null
-PrimaryPositionID: null
-PrimaryResponsibilityID: null
-HomePhoneNumber: null
-MobilePhoneNumber: null
-WorkPhoneNumber: "+610421212145"
-ADNotificationStatus: null
-PositionList: null
-ResponsibilityList: null
-Accreditation: null
-PortalViewTypePref: null
-FaxNumber: null
-ACATID: null
-MName: null
-ListContextOrganization: null
-FirstName: "Helper"
-LastName: "OrgHelper"
}
-OutletID: "2-ZORF7VK"
-OutletType: null
-OutletName: "MyGovID Outlet"
-ParentOrganisationID: "2-ZOLA62T"
-ParentOrganisationName: "CRSixThreeEight Calwell"
-ProviderID: null
-ProviderName: null
-NAPSServiceProviderId: null
}
-SupportPerson: null
}
and yet it is still generating this SOAP message:
<ns2:SupportingParty>\n
<ns2:UserType>Other</ns2:UserType>\n
<ns2:IsPrimaryFlag>true</ns2:IsPrimaryFlag>\n
<ns2:SupportingPartyRole>Representative (Regular)</ns2:SupportingPartyRole>\n
<ns2:Relationship/>\n
<ns2:RelationshipStartDate>2022-06-15</ns2:RelationshipStartDate>\n
<ns2:RelationshipEndDate xsi:nil="true"/>\n
<ns2:SupportOrganisation>\n
<ns4:Employee>\n
<ns4:Title>Mr</ns4:Title>\n
<ns4:EMailAddr>[email protected]</ns4:EMailAddr>\n
<ns4:DeactivateDate xsi:nil="true"/>\n
<ns4:WorkPhoneNumber>+610421212145</ns4:WorkPhoneNumber>\n
</ns4:Employee>\n
</ns2:SupportOrganisation>\n
</ns2:SupportingParty>\n
Notice how OutletName
, ParentOrganisationName
etc are still missing from the message π
My next thought is to write a custom middleware to hack the SOAP message as it is generated, maybe??
Ok, thanks to the crazy middleware capability in this library, I was able to write a custom middleware which hacks the XML stream and rebuilds the required elements correctly, woohoo! π
Thanks for the responses @veewee (and the library) π
Nice! It's probably not the best solution and rather a hack until a more permanent fix. Will have to look into the specifics of the issue some day
Closing this one - choice types will be dealt with in #464