Making complex_filter

58 views
Skip to first unread message

Sven

unread,
Nov 21, 2011, 11:28:58 AM11/21/11
to magja-discuss
Hi all,

I added magja to a project recently and it looks promising.

I've been trying to figure out a way to have Magja accept a complex
filter query as described here for PHP:
http://www.westwideweb.com/wp/2011/06/23/magento-api-select-orders-by-date-range/
I edited SoapCallFactory to accept a nested HashMap hierarchy to be
able to drill down the filter, I see the SOAP request is going away
but the filter itself doesn't take effect, I get all products in
return.

Anyone who run complex filters with magja? If that's the case I would
really appreciate a hint or example how to get it working.

None of requests below are working.

Regards,
Sven

<mag:call xmlns:mag=.........>
<sessionId>25aace54bd945a3105395a075f812df3</sessionId>
<resourcePath>catalog_product.list</resourcePath>
<args xsi:type="SOAP-XML:Map">
<updated_at>
<to xsi:type="xsd:string">2011-11-20 23:52:05</to>
<from xsi:type="xsd:string">2011-11-19 23:52:05</from>
</updated_at>
</args>
</mag:call>

nor:

<mag:call xmlns:mag=.........>
<sessionId>e782f6ea21e68532f4405f380cabcc2f</sessionId>
<resourcePath>catalog_product.list</resourcePath>
<args xsi:type="SOAP-XML:Map">
<complex_filter>
<created_at>
<to xsi:type="xsd:string">2011-11-21 00:13:35</to>
<from xsi:type="xsd:string">2011-11-20 00:13:35</from>
</created_at>
</complex_filter>
</args>
</mag:call>

Sven

unread,
Nov 22, 2011, 9:03:21 PM11/22/11
to magja-discuss
It's cold out here in the darkness! ;)

Anyway, I figured it out (made quite a few diff on xml output). Magja
doesn't make a correct SOAP request when Maps are used. I've changed
the code in SoapCallFactory and now I'm back on track again.

Regards,
Sven


On Nov 21, 5:28 pm, Sven <svenne.d...@gmail.com> wrote:
> Hi all,
>
> I added magja to a project recently and it looks promising.
>
> I've been trying to figure out a way to have Magja accept a complex

> filter query as described here for PHP:http://www.westwideweb.com/wp/2011/06/23/magento-api-select-orders-by...

Christoph Petersen

unread,
Nov 23, 2011, 12:10:01 PM11/23/11
to magja-...@googlegroups.com
Hi Sven,

can you provide a patch for the changes (if not already done so) so
everyone can benefit from it?

Thanks & BR
Christoph

--
Christoph Petersen
Drögestr. 20
22305 Hamburg
Deutschland

Landline: +49 (0) 040 / 65 91 08 86
Mobile (DE): +49 (0) 179 / 53 99 981

Web: http://www.xgrr.de/
Instant Messenger:
ICQ: 162186953
MSN: c.pet...@peterschen.de
Google Talk / Jabber: christoph...@googlemail.com

Sven Wesley

unread,
Nov 23, 2011, 12:47:12 PM11/23/11
to magja-...@googlegroups.com
I will when it's tested. 
In the meantime could you please add me to the project commit list?

Did anyone think of replacing the need of a Magento localhost installation for tests? I think most of the tests would work fine with Mockito. It's easy to mock a test environment, and it all happens within the Maven context.

/S


2011/11/23 Christoph Petersen <c...@peterschen.de>
 Google Talk / Jabber: christoph.petersen@googlemail.com

Christoph Petersen

unread,
Nov 23, 2011, 2:05:01 PM11/23/11
to magja-...@googlegroups.com
I added that to the issue list a couple of weeks ago...

Sven Wesley <svenn...@gmail.com> wrote:

>>>> filter query as described here for PHP:http://www.westwideweb.**
>>>>
>com/wp/2011/06/23/magento-api-**select-orders-by.<http://www.westwideweb.com/wp/2011/06/23/magento-api-select-orders-by.>


>>>> ..
>>>> I edited SoapCallFactory to accept a nested HashMap hierarchy to be
>>>> able to drill down the filter, I see the SOAP request is going away
>>>> but the filter itself doesn't take effect, I get all products in
>>>> return.
>>>>
>>>> Anyone who run complex filters with magja? If that's the case I
>would
>>>> really appreciate a hint or example how to get it working.
>>>>
>>>> None of requests below are working.
>>>>
>>>> Regards,
>>>> Sven
>>>>
>>>> <mag:call xmlns:mag=.........>

>>>> <sessionId>**25aace54bd945a3105395a075f812d**f3</sessionId>
>>>> <resourcePath>catalog_product.**list</resourcePath>


>>>> <args xsi:type="SOAP-XML:Map">
>>>> <updated_at>

>>>> <to xsi:type="xsd:string">2011-11-**20 23:52:05</to>
>>>> <from xsi:type="xsd:string">2011-11-**19 23:52:05</from>


>>>> </updated_at>
>>>> </args>
>>>> </mag:call>
>>>>
>>>> nor:
>>>>
>>>> <mag:call xmlns:mag=.........>

>>>> <sessionId>**e782f6ea21e68532f4405f380cabcc**2f</sessionId>
>>>> <resourcePath>catalog_product.**list</resourcePath>


>>>> <args xsi:type="SOAP-XML:Map">
>>>> <complex_filter>
>>>> <created_at>

>>>> <to xsi:type="xsd:string">2011-11-**21 00:13:35</to>
>>>> <from xsi:type="xsd:string">2011-11-**20 00:13:35</from>


>>>> </created_at>
>>>> </complex_filter>
>>>> </args>
>>>> </mag:call>
>>>>
>>>
>> --
>> Christoph Petersen
>> Drögestr. 20
>> 22305 Hamburg
>> Deutschland
>>
>> Landline: +49 (0) 040 / 65 91 08 86
>> Mobile (DE): +49 (0) 179 / 53 99 981
>>
>> Web: http://www.xgrr.de/
>> Instant Messenger:
>> ICQ: 162186953
>> MSN: c.pet...@peterschen.de
>> Google Talk / Jabber:

>christoph.petersen@googlemail.**com<christoph...@googlemail.com>
>>

Reply all
Reply to author
Forward
0 new messages