[OFBiz] Dev - returning errors from service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - returning errors from service

Luke Prentice
i have a minilang service (changeParkedInvoices) called as an event:

    <request-map uri="changeParkedInvoices">
        <security https="true" auth="true"/>
        <event type="service" invoke="changeParkedInvoices"/>
        <response name="success" type="view" value="findParkedInvoices"/>
        <response name="error" type="view" value="findParkedInvoices"/>
    </request-map>

service definition:

    <service name="changeParkedInvoices" engine="simple" location="au/com/arl/account/AccountServices.xml"
        invoke="changeParkedInvoices" auth="true" use-transaction="true">
        <description>Accept or Reject Invoices</description>
        <attribute type="String" mode="IN" name="operation" optional="false"/>
        <attribute type="String" mode="IN" name="requestMessage" optional="true"/>
        <attribute type="List" mode="IN" name="invoiceId" optional="false"/>
    </service>

if i do <add-error> and <check-errors> in the service i don't see this meaningful error on the return ftl. instead i get this:

The Following Errors Occurred:
  • layoutEvents.error_call_eventorg.ofbiz.webapp.event.EventHandlerException: Service invocation error (Commit transaction failed)
qns:

1) how can i return an error properly from a minilang service called as an event?
2) how can i return an error properly from a bsh service called as an event?

thanks, luke.


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - returning errors from service

David E. Jones

Which version of OFBiz are you using? Problems with this bad name for  
an i18n'ed property were fixed a while back and you should be getting  
better results back than that...

-David


On Aug 9, 2005, at 3:04 AM, Luke Prentice wrote:

> i have a minilang service (changeParkedInvoices) called as an event:
>
>     <request-map uri="changeParkedInvoices">
>         <security https="true" auth="true"/>
>         <event type="service" invoke="changeParkedInvoices"/>
>         <response name="success" type="view"  
> value="findParkedInvoices"/>
>         <response name="error" type="view"  
> value="findParkedInvoices"/>
>     </request-map>
>
> service definition:
>
>     <service name="changeParkedInvoices" engine="simple"  
> location="au/com/arl/account/AccountServices.xml"
>         invoke="changeParkedInvoices" auth="true" use-
> transaction="true">
>         <description>Accept or Reject Invoices</description>
>         <attribute type="String" mode="IN" name="operation"  
> optional="false"/>
>         <attribute type="String" mode="IN" name="requestMessage"  
> optional="true"/>
>         <attribute type="List" mode="IN" name="invoiceId"  
> optional="false"/>
>     </service>
>
> if i do <add-error> and <check-errors> in the service i don't see  
> this meaningful error on the return ftl. instead i get this:
>
> The Following Errors Occurred:
> layoutEvents.error_call_eventorg.ofbiz.webapp.event.EventHandlerExcept
> ion: Service invocation error (Commit transaction failed)
> qns:
>
> 1) how can i return an error properly from a minilang service  
> called as an event?
> 2) how can i return an error properly from a bsh service called as  
> an event?
>
> thanks, luke.
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - returning errors from service

Si Chen-2
In reply to this post by Luke Prentice
Not enough to figure out what happened yet...  How about the full stack
trace?

Si

Luke Prentice wrote:

> i have a minilang service (changeParkedInvoices) called as an event:
>
>     <request-map uri="changeParkedInvoices">
>         <security https="true" auth="true"/>
>         <event type="service" invoke="changeParkedInvoices"/>
>         <response name="success" type="view" value="findParkedInvoices"/>
>         <response name="error" type="view" value="findParkedInvoices"/>
>     </request-map>
>
> service definition:
>
>     <service name="changeParkedInvoices" engine="simple"
> location="au/com/arl/account/AccountServices.xml"
>         invoke="changeParkedInvoices" auth="true" use-transaction="true">
>         <description>Accept or Reject Invoices</description>
>         <attribute type="String" mode="IN" name="operation"
> optional="false"/>
>         <attribute type="String" mode="IN" name="requestMessage"
> optional="true"/>
>         <attribute type="List" mode="IN" name="invoiceId"
> optional="false"/>
>     </service>
>
> if i do <add-error> and <check-errors> in the service i don't see this
> meaningful error on the return ftl. instead i get this:
>
> The Following Errors Occurred:
>
>     * layoutEvents.error_call_eventorg.ofbiz.webapp.event.EventHandlerException:
>       Service invocation error (Commit transaction failed)
>
> qns:
>
> 1) how can i return an error properly from a minilang service called
> as an event?
> 2) how can i return an error properly from a bsh service called as an
> event?
>
> thanks, luke.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev