1

I need to write a c# client to consume a PHP WebService. In the WSDL there is an object whit the following xsd:

<s:complexType name="affiliazione">
<s:annotation>
</s:annotation>
<s:sequence>
<s:element name="disciplina" type="s:string" nillable="false" maxOccurs="unbounded" minOccurs="1">
<s:annotation>
</s:annotation>
</s:element>
</s:sequence>
</s:complexType>

The way Visual Studio creates the corresponding xml is the following:

<q2:affiliazione id="id1" xsi:type="q2:affiliazione">
<disciplina href="#id2"/>
</q2:affiliazione><q3:Array id="id2" q3:arrayType="xsd:string[1]"       xmlns:q3="http://schemas.xmlsoap.org/soap/encoding/">
    <Item>AG010</Item></q3:Array    >
    </affiliazione>

But the server accepts only the following format:

    <affiliazione xsi:type="rss:affiliazione">
      <disciplina>AG010</disciplina>
      <disciplina>CJ014</disciplina>                        
     </affiliazione>

where the array "disciplina" is written in a flat way. I tried to decorate the object "disciplina" in the proxy with the XmlElement and DataMember but with no success.

Could you please help me? Thank you so much!

1

0

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.