SoapCore icon indicating copy to clipboard operation
SoapCore copied to clipboard

Some fields does not deserialized (2)

Open SUDALV92 opened this issue 1 year ago • 2 comments

This is an old issue, but the original already closed. This is still happening. I have created a sample project. Try to call RemainsClient2Save method with this xml:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema'>
    <SOAP-ENV:Body>
        <RemainsClient2Save xmlns="http://tempuri.org/">
            <clientId>29048700</clientId>
            <firstPackage>false</firstPackage>
            <remains>
                <RemainClient2>
                    <BestBefore>2023-05-03 16:52:57</BestBefore>
                    <RetailPrice>315</RetailPrice>
                    <ProductSeria>1260821, годен до: 01.08.2023</ProductSeria>
                    <ContractNumber>Фиктивный ГК 2023(РЛО)</ContractNumber>
                    <ProductCode>6331338</ProductCode>
                    <ProductName>Метформин Пролонг-Акрихин таб.пролонг.п.п.о. 1000мг №60</ProductName>
                    <ProgramName>РЛО</ProgramName>
                    <QuantityRem>1</QuantityRem>
                    <RetailPriceVat>28.665</RetailPriceVat>
                    <StoreId>177</StoreId>
                </RemainClient2>
            </remains>
        </RemainsClient2Save>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and watch the deserialized fields (for example: ProductSeria - it is null) SoapNullFieldsTest.zip

SUDALV92 avatar Feb 06 '24 11:02 SUDALV92

I'd suggest forking the repository and setting up a small unit test that replicated your error. Then you can debug through the serialization and see where it goes wrong.

andersjonsson avatar Feb 09 '24 09:02 andersjonsson

The property (xml node) order is wrong in your sample... this is why ProductSeria is not deserialized. It should be before the BestBefore field.

Check your wsdl... image

zgabi avatar Feb 15 '24 20:02 zgabi

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 17 '24 02:03 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 31 '24 02:03 github-actions[bot]