ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumit Sabu <sabu.su...@gmail.com>
Subject Re: ajax json response
Date Mon, 23 Feb 2015 03:46:35 GMT
Remove my name from this mail chain.

I am not a part of this   so called organisation   :   OFBIZ

Remove my name.

On Sun, Feb 22, 2015 at 4:18 PM, info@agentur-m3.de <info@agentur-m3.de>
wrote:

> Hello everyone!
>
> Here is a question concerning an ajax request:
>
> <service name="getNext" engine="java"
>       location="org.ofbiz.pcomp.pCompServices" invoke="getNext">
>     <description>get next</description>
>    <!-- <auto-attributes mode="IN" entity-name="pcRating"
> include="nonpk" optional="true" /> -->
>  <attribute name="pcId" mode="IN" type="String" optional="true" />
>  <attribute name="idX" mode="OUT" type="Integer" optional="false" />
>  <attribute name="idY" mode="OUT" type="Integer" optional="false" />
> </service>
>
>     <request-map uri="getNext">
>       <security https="true" auth="true"/>
>       <event type="service" invoke="getNext"/>
>       <response name="success" type="request" value="json"/>
>       <response name="error" type="request" value="json"/>
>     </request-map>
>
>
> The request works fine and gives back correct values for idX and idY.
>
> My question is, if the line
>       <response name="success" type="request" value="json"/>
>
> is correct (or if there is an better alternative), because
> the return values are not json, but 2 x  plain integer.
>
> The java function implementing the service returns this:
>
>          Map result = ServiceUtil.returnSuccess();
>          int idX = 5;
>          int idY = 6;
>          result.put("idX",idX);
>          result.put("idY",idY);
>          return result;
>
> So is value="json" formally correct?
>
> Thank you for your help!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message