我有這樣的SOAP消息,我需要序列化到C#對象:C# - 反序列化SOAP消息
<SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAPSDK4:GetStoreInformationResponse xmlns:SOAPSDK4="http://www.example.com/message/">
<StoreInformation>
<StoreID>99612</StoreID>
<BusinessDate>2016-01-28</BusinessDate>
<Address type="Address-US">
<Street>Via Roma 1</Street>
<City>Milano</City>
</Address>
</StoreInformation>
</SOAPSDK4:GetStoreInformationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我發現系列化的許多例子,但我不能將這些應用到我的情況。 有人可以幫助我嗎?
感謝
謝謝你,但我收到此錯誤時調用「return(GetStoreInformationResponse)serializer.Deserialize(reader);」:XML文檔中的錯誤。內部異常是:意外的 –
你能發佈生成的C#類嗎? –
請參閱下面的內容;) –