-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XmlArrayItemAttribute is not honored #180
Comments
Hi @comburo! By WCF you mean SoapSerializer.DataContractSerializer? |
@kotovaleksandr Hi, no, as mentioned in the issue I'm using the XmlSerializer. |
@kotovaleksandr I think this can be referenced (and closed) in latest Release 0.9.9.5, right? |
@comburo This should be released and ready for testing ;) |
Cool, thanks! |
I've verified and it now works as expected. Thanks! |
Hello, To summary, this code : [OperationContract]
public Result DeleteEntities(UserToken user,
[XmlArray("EntityCodes", IsNullable = true)]
[XmlArrayItem("EntityCode", IsNullable = true)]
List<string> entityCodeList) result in WSDL : <xsd:element name="DeleteEntities">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="user" type="tns:UserToken"/>
<xsd:element minOccurs="0" maxOccurs="1" name="entityCodeList" nillable="true" type="tns:ArrayOfString"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element> instead of : <xsd:element name="DeleteEntities">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="user" type="tns:UserToken"/>
<xsd:element minOccurs="0" maxOccurs="1" name="EntityCodes" nillable="true" type="tns:ArrayOfEntityCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element> |
I created a new issue here : #1106 |
I'm trying to port an existing .NET Framework WCF service to .NET Core using SOAP Core. Most of it seems to work as-is, which is great! But I just ran into an issue where the original service has an array of strings, but defines the name of the seperate items using an [XmlArryItem] attribute.
I've created a simple test service to illustrate the point.
Consider this Operation Contract:
And the result object (not important, but for completeness):
This services uses the XmlSerializer:
The WSDL will look like this (displaying only the relevant part):
But with WCF, the WSDL would look like this (displaying only the array):
Notice how the "name" of an individual array item is different.
I'll try to see if I can track down the issue, fix it and submit a PR, but I have no idea where to start looking. So any pointers would be appreciated :-)
The text was updated successfully, but these errors were encountered: