How to get collection from SOAP message

I use webservice to provide company information based on a special company number. But I can not get the data from the SOAP response message. You can see an example message with a response soap. (I forgot some company data tags).

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<businessGetDossierV3Response xmlns="http://www.webservices.nl/soap/">
<out>
<paging>
<curpage>1</curpage>
<perpage>10</perpage>
<numpages>1</numpages>
<numresults>1</numresults>
<maxresults>100</maxresults>
</paging>
<results>
<item>
<DossierNo></DossierNo>
<SubDossierNo></SubDossierNo>
<ChamberNo></ChamberNo>
<Legalformcode></Legalformcode>
<LegalformcodeText></LegalformcodeText>
<Tradename45></Tradename45>
<EstablishmentPostcode></EstablishmentPostcode>
<EstablishmentCity></EstablishmentCity>
<EstablishmentStreetname></EstablishmentStreetname>
<EstablishmentHouseNo></EstablishmentHouseNo>
<CorrespondencePostcode></CorrespondencePostcode>
<CorrespondenceCity></CorrespondenceCity>
<CorrespondenceStreetname></CorrespondenceStreetname>
<CorrespondenceHouseNo></CorrespondenceHouseNo>
</item>
</results>
</out>
</businessGetDossierV3Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

! this is the result that I see on the demo client! But this is my code in C #

        nl.webservices.ws1.BusinessDossierV3PagedResult result = null;
        result = myserviceBusiness.businessGetDossierV3(KVKnr, "0000", 1);

I want to do something like this (but with results instead of the paging part)

int page = result.paging.numpages;

Then I have to be like that, I suppose

string city = result.results.item.CorrespondenceCity;

But this error message

So, in Visual Studio 2010, I can only get the data in the paging part of the xml and put it in the text box, but not from the result part. Is it because the result is some kind of collection?

, InstallmentPostcode InstallmentCity ?

+3

Source: https://habr.com/ru/post/1792191/


All Articles