tags:

views:

47

answers:

1

We have a site built in Zend Framework and we're using the Zend Soap client.

I'm having trouble with one of the soap requests: It's expecting data in this form

        <CustomerForm>
            <CustomerFormRow>
                <CuisineType>3</CuisineType>
                <CuisineRestaurant>True</CuisineRestaurant>
                <NumberOfStaff>801</NumberOfStaff>
                ...

But the soap client is generating the following

        <customerform>
            <ns2:map>
                <item>
                    <key>CuisineType</key>
                    <value>Greek</value>
                </item>
                <item>
                    <key>CuisineRestaurant</key>
                    <value>Cafe</value>
                </item>
                <item>
                    <key>NumberOfStaff</key>
                    <value>11 to 20</value>
                </item>
                ...

When using

$_processFormWS->processFormWS($session_id, $customer_id, $form_data);

So the service isn't handling the data I'm sending!

Am I missing something?

Thanks!

A: 

Turns out that if I pass my $form_data as an object (rather than an array which it was before) then it works!

So:

$_processFormWS->processFormWS($session_id, $customer_id, (object) $form_data);

Would fix the above code.

Nick