Xamarin.Forms SOAP output style

Hi,
i call a soap 1.1 web service from my xamarin forms app (.netstandard 2.0). I generated the reference.cs file in my .android project. Then when i watch the request with fiddler, i see, there is a outcomming xml like this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header />
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <q1:testMaterial xmlns:q1="example.com/testWS"><testMaterialRequest href="#id1" />
         </q1:testMaterial>
         <q2:testMaterialRequestType id="id1" xsi:type="q2:testMaterialRequestType" xmlns:q2="example.com/testWS">
            <DataArea href="#id2" />
         </q2:testMaterialRequestType>
         <q3:Array id="id2" xmlns:q4="example.com/testWS" q3:arrayType="q4:testMaterialRequestTypeTestWS[1]" 
          xmlns:q3="http://schemas.xmlsoap.org/soap/encoding/">
             <Item href="#id3" />
         </q3:Array>
         <q5:testMaterialRequestTypeTestWS id="id3" xsi:type="q5:testMaterialRequestTypeTestWS" xmlns:q5="example.com/testWS">
           <ItemBarcode xsi:type="xsd:string">0036400780070001</ItemBarcode>
           <MachineBarcode xsi:type="xsd:string">2342423</MachineBarcode>
         </q5:testMaterialRequestTypeTestWS>
    </soap:Body>
</soap:Envelope>

When i call the same web service from a windows forms project (.net framework 4.7) i got a request xml like this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <testMaterial xmlns="example.com/testWS">
        <reportthrombexinRequest xmlns="">
          <DataArea><testWS>
            <ItemBarcode>0036400780070001</ItemBarcode>
            <MachineBarcode>2342423</MachineBarcode>
          </testWS>
          </DataArea>
        </testMaterialRequest>
        </testMaterial>
      </soap:Body>
</soap:Envelope>

I see, xamarin (respectively mono) generate a soap 1.1 message with using multible references like href... and id... .
Is there a way xamarin to say that it will generate a request without using "multible references" like .netFramework?

Sign In or Register to comment.