1

How do I tell WCF to make use of wsdl arrayType? Like this:

<complexType name="ArrayOfString">
   <complexContent>
      <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="string[]"/>
      </restriction>
   </complexContent>
</complexType>

This is what WCF is doing (The not expected)

<complexType name="ArrayOfstring">
    <sequence>
       <element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true"       type="xs:string"/>
     </sequence>
    <element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring"/>
</complexType>
0

2 Answers 2

1

Found the solution. I have to add this to make it work: [XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use = OperationFormatUse.Encoded)]

Sign up to request clarification or add additional context in comments.

Comments

0

I think WCF doesn't support it out of the box because that is WSDL extension to standard XSD description of data type. Both XmlSerializer and DataContractSerializer should work with standard XSD in scenarios where web services are not involved at all so it uses the plain XSD approach.

If you need the first approach you can either write WSDL + XSDs yourselves or you can try to implement custom export extension - to use that for WCF client generation you will also need custom import extension.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.