observation:

On passing 10000 as string by qualifying the type in XML things work as
expected.

Eg: below works  ( <value><string>10000</string></value> )

REQ  >>>>>>>>>
<methodCall><methodName>findPartiesById</methodName><params><param><value><struct><member><name>login.username</name><value><string><![CDATA[admin]]></string></value></member><member><name>login.password</name><value><string><![CDATA[ofbiz]]></string></value></member><member><name>idToFind</name><value><string>10000</string></value></member></struct></value></param></params></methodCall>

and

below ( <value><i4>10000</i4></value> ) does not.


REQ  >>>>>>>>>   <?xml version="1.0" encoding="UTF-8"?>
REQ  >>>>>>>>>
<methodCall><methodName>findPartiesById</methodName><params><param><value><struct><member><name>login.password</name><value><string><![CDATA[ofbiz]]></string></value></member><member><name>idToFind</name><value><i4>10000</i4></value></member><member><name>login.username</name><value><string><![CDATA[admin]]></string></value></member></struct></value></param></params></methodCall>


IMHO the conversion of 10000  to 10,000  in backend is causing the problem .
I am not sure if there is a scope of improvement or application programmers
should
be more careful by explicitly sending qualified types.

regds
mallah.



On Sat, Aug 26, 2017 at 1:19 PM, Rajesh Mallah <[email protected]>
wrote:

> I think i caught it ,
>
> The problem is occurring only for numeric id.  When i explicitly specify a
> alphanum
> id in creating a new party group then the problem is not there.
>
> This is supported by the kind of sqls being created also :
> ( note the where clause ) i had specified partyID as '10000'  not sure if
> its' derby specific.
>
> 2017-08-26 13:10:23,767 |http-nio-8080-exec-1
> |GenericDAO                    |T| Ran query in 1 milli-seconds:
> EntityName: Party Sql: SELECT PARTY_ID, PARTY_TYPE_ID, EXTERNAL_ID,
> PREFERRED_CURRENCY_UOM_ID, DESCRIPTION, STATUS_ID, CREATED_DATE,
> CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN,
> DATA_SOURCE_ID, IS_UNREAD, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> CREATED_STAMP, CREATED_TX_STAMP FROM OFBIZ.PARTY WHERE ((PARTY_ID = ?))
> where clause:[PARTY_ID=10,000]
>
>
> Does it qualify to be a BUG ?
> I think the ramifications are severe as most application developers would
> like
> system to auto generate IDs for them.
> sw@development:~/Ofbiz/XML_RPC_SCRIPTS$ perl test-xmlrpc.pl  10000
> \ {
>     partiesFound   [],
>     party          undef
> }
> sw@development:~/Ofbiz/XML_RPC_SCRIPTS$
> sw@development:~/Ofbiz/XML_RPC_SCRIPTS$
> sw@development:~/Ofbiz/XML_RPC_SCRIPTS$
> sw@development:~/Ofbiz/XML_RPC_SCRIPTS$ perl test-xmlrpc.pl   MyID1000
> \ {
>     partiesFound   [],
>     party          {
>         createdByUserLogin        "admin",
>         createdDate               "20170826T13:12:47",
>         createdStamp              "20170826T13:12:47",
>         createdTxStamp            "20170826T13:12:47",
>         dataSourceId              undef,
>         description               undef,
>         externalId                undef,
>         isUnread                  undef,
>         lastModifiedByUserLogin   "admin",
>         lastModifiedDate          "20170826T13:12:47",
>         lastUpdatedStamp          "20170826T13:12:47",
>         lastUpdatedTxStamp        "20170826T13:12:47",
>         partyId                   "MyID1000",
>         partyTypeId               "PARTY_GROUP",
>         preferredCurrencyUomId    "USD",
>         statusId                  "PARTY_ENABLED"
>     }
> }
>
> Regds
> mallah
>
>
> On Sat, Aug 26, 2017 at 1:00 PM, Rajesh Mallah <[email protected]>
> wrote:
>
>> Hi Renuka ,
>>
>> Thanks for Response , My Steps are as follows
>>
>> (1) load seed,seed-initial,demo
>> (2) login to Ofbiz , using web ui  and create a PartyGroup via
>> Application > Party > New Party Group
>> (3) execute findPartiesById using RPC eg:
>> https://cwiki.apache.org/confluence/display/OFBIZ/Using+
>> XMLRPC+as+an+alternative+to+SOAP
>>
>> ( I use perl or the same  https://pastebin.com/raw/UwLNq5AT    ).
>>
>> (4) With new company ID the service findPartiesById does not return any
>> data , whereas for old data like 'Company'
>>      it does return..
>>
>> the problem seems to be with XMLRPC method only , as executing the
>> service via
>> Framework Web Tools > Run Service works fine for all PartyId.
>>
>> regds
>> mallah.
>>
>>
>>
>> On Sat, Aug 26, 2017 at 12:42 PM, Renuka Srishti <
>> [email protected]> wrote:
>>
>>> Hello Rajesh,
>>>
>>> Can you mention the steps you followed? As I have tried and its working
>>> fine.
>>>
>>> Yes, here I can see one improvement that after creating any party, we
>>> redirect to view profile and UI of this screen need some improvement. The
>>> message was shown there is not correct.
>>>
>>> Thanks
>>> Renuka Srishti
>>>
>>> On Sat, Aug 26, 2017 at 12:19 PM, Rajesh Mallah <[email protected]
>>> >
>>> wrote:
>>>
>>> > Hi
>>> >
>>> > We have an instance using the stock demo,seed,seed-initial data.
>>> > All the PartyGroups imported via demo  are searchable using
>>> > web service method  findPartiesById .
>>> >
>>> > However when we create a Party Group by the UI  and search
>>> > using same process the result is nil.
>>> >
>>> > the RPCXML conversation is here:
>>> >
>>> > https://pastebin.com/1LB9BCFd
>>> >
>>> > am i missing anything ?
>>> >
>>> >
>>> > regds
>>> > mallah.
>>> >
>>>
>>
>>
>

Reply via email to