Closed Shaqundalond closed 2 years ago
Actually, the base ValueListType
Struct element is returned by the SoapClient::__getTypes
method such as:
[12] => struct ValueListType {
LongName Value;
}
And from what I understand, the Value
is of type LongName
which is mainly a string, so it would not be valid to create a class for it.
Concerning the sequence
tag, I would agree that the Value
property could be an array of string.
Do you have a valid XML request that contains and demonstrates the correct ValueListType definition?
Thanks
Thank you for your fast Response .
Here is a snippet from a valid XML Request
<lcm:SubmitObjectsRequest>
<rim:RegistryObjectList>
<rim:ExtrinsicObject id="Document01"
mimeType="text/xml"
objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
<rim:Slot name="creationTime">
<rim:ValueList>
<rim:Value>20051224</rim:Value>
</rim:ValueList>
</rim:Slot>
<rim:Slot name="sourcePatientInfo">
<rim:ValueList>
<rim:Value>PID-3|ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</rim:Value>
<rim:Value>PID-5|Doe^John^^^</rim:Value>
<rim:Value>PID-7|19560527</rim:Value>
<rim:Value>PID-8|M</rim:Value>
<rim:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA</rim:Value>
</rim:ValueList>
</rim:Slot>
...
As you can see a ValueList
can hold multiple Value
Elements.
My assumption from php and Soapclient was that every element gets turned into a Class. Therefore there should be a Value
Class or rather a Longname
Class.
Ok, thanks for the sample, it clarifies the need to mark the Value
as an array.
But not every element is mapped to a class because the PHP class is turned to an XML tag so it has to the a simple property for the deepest/final string/int/float/etc. values :wink:.
I'll let you know as soon as I could find a proper way to handle this without breaking everything :smile:
Describe the bug When parsing the Complex Type "ValueListTyp", the resulting php class ignores the attributes of the sequence tag
The resulting Class only accepts a String for $Value instead of an array of \StructType\Value. Furthermore no \StructType Value is created.
To Reproduce Generate the Classes for the following WSDL
needs to be set to false
Expected behavior A Result more similar to this
Creation of a Value Class
Additional context One of the Reasons there might be no Value class is that there is another xsd included which also defines the element Value.