Dear Christoph,
Thanks for pointing that out to me, so I didn't have to look at the
wrong places for a solution.
I got the filters working, although it is very prototypical and should
be made generic.
The base of the problem with the current implementation lies in that
the filter is serialized as a array of items, instead as a nested map.
Therefore the filter that you define (OrderFilter) loses all meaning
to the magento api once it gets serialized (no key-nested map binding
anymore).
So I took a look at a specific filtered order request and adapted the
serialization process for this situation. (php, use: $soap-
>__getLastRequest(); to inspect the sent soap request after the call)
My php example uses a filter with two parts: orders that were updated
after jan 2010, restrict to store nb 7
$filters = array('updated_at' => array('gt' => '2010-01-01 13:31:50'),
'store_id' => array('eq' => 7));
php default soap client serializes this to an args array element with
one nested item. Within the nested item, two item nodes are added with
"key" and "value" children. The key is the getProperty() (e.g.
'updated_at'). The value is a map again with key ('gt') and value
('2010-01-01 13:31:50') child nodes (getOperator() and getValue()
respectively).
Magja can of course output the same soap request, so I did a test with
two changes
I changed the OrderFilter.serializeToApi()
-> every getProperty() key has a separate Map with operator and value
I changed the SoapCallFactory,createCall(String sessionId, String
methodPath, Object arg)
->if arg is the nested map type that is created by
OrderFilter.serializeToApi()
->serialize 'the php-way'
The code I used is just for testing, and I only need to know *if* the
filters will work with Magja at this stage of my project. So I'll
leave it here for now. But if anyone wants to know what I did exactly
in this test, don't hesitate to contact me.
On Feb 25, 12:20 pm, Christoph Petersen