S
S
SwoDs2018-04-06 18:47:37
PHP
SwoDs, 2018-04-06 18:47:37

SOAP response comes with key and value nodes?

I used to work a lot with SOAP services as a client, but here I need to make a SOAP service, everything was fine until I started testing with a large data set, I searched on the net, there are similar problems but without a solution ....:
I get it like this:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <Expert-Request>
            <item>
                <key>Expert_Status</key>
                <value>
                    <item>
                        <key>ChassisNo</key>
                        <value>9998886NZ12345678</value>
                    </item>
                    <item>
                        <key>MotradaIntVehicleNo</key>
                        <value>757169</value>
                    </item>
                    ...   
                </value>
            </item>
        </Expert-Request>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And it should be like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <Expert_Status>
            <ChassisNo>9998886NZ12345678</ChassisNo>
            <MotradaIntVehicleNo>757169</MotradaIntVehicleNo>
            ...

ps take an example from one of the questions on the net, so as not to reprint your own ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SwoDs, 2018-04-09
@SwoDs

The answer was simple, when a response is formed from the server, you need to transfer not an array, but an object of objects

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question