Thanks David. Yes you are right indeed. I think I did not read your recent
post correctly.

- Vikas

On Fri, Jul 25, 2008 at 2:16 PM, David E Jones <[EMAIL PROTECTED]>
wrote:

>
> Nope because then it will try to call a service called "serviceName". You
> have to have the string expansion for this, because technically what you
> want even in that case is:
>
> service-name="${serviceName}"
>
> and not
>
> service-name="serviceName"
>
> ... and so you need string expansion anyway.
>
> -David
>
>
>
> On Jul 25, 2008, at 2:39 AM, Vikas Mayur wrote:
>
>  May it work with doing <set field="serviceName" value="
>> update${parameters.entityName}"> first and use serviceName to pass other
>> tags like<set-service-fields service-name="serviceName"> and <call-service
>> service-name="serviceName">
>>
>> - Vikas
>>
>> On Thu, Jul 24, 2008 at 12:32 PM, Radoslav Tomko <[EMAIL PROTECTED]>
>> wrote:
>>
>>  Hi,
>>>
>>> I am trying to make "common" service for my project, and i am facing
>>> problem
>>> using dynamic service name.
>>> My common service has Map parameter, and then it calls required service
>>> using values from that Map.
>>>
>>> Sample:
>>>
>>>  Service definition:
>>>
>>>  <service name="updateCommon" engine="simple"
>>>          location="com/codes/CommonServices.xml"
>>> invoke="updateCommon" auth="true">
>>>      <description>Update entity - common</description>
>>>      <attribute name="entityName" type="String" mode="IN"
>>> optional="false"/>
>>>      <attribute name="data" type="Map" mode="IN" optional="false"/>
>>>  </service>
>>>
>>>  Service:
>>>
>>>  <simple-method method-name="updateCommon" short-description="Update
>>> entity - common">
>>>      <!-- no problem -->
>>>      <set-service-fields
>>> service-name="update${parameters.entityName}" map-name="parameters.data"
>>> to-map-name="serviceParams"/>
>>>
>>>      <!- there is problem -->
>>>      <call-service service-name="update${parameters.entityName}"
>>> in-map-name="serviceParams">
>>>          <results-to-map map-name="result"/>
>>>      </call-service>
>>>  </simple-method>
>>>
>>>
>>> And I want it to call service like this (let say, I pass 'GlAccount' in
>>> entity-name parameter for updateCommon service):
>>>
>>>  <service name="updateGlAccount" default-entity-name="GlAccount"
>>> engine="simple"
>>>          location="com/accounting/ledger/GeneralLedgerServices.xml"
>>> invoke="updateGlAccount" auth="true">
>>>      <description>Update a GlAccount record</description>
>>>      <auto-attributes include="pk" mode="IN" optional="false"/>
>>>      <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>  </service>
>>>
>>>
>>> I test that for "<set-service-fields ...>" tag the dynamic use of
>>> service-name is working fine, and parameters for service
>>> are filled correctly, but for "call service" tag it's not working. It
>>> gives me an error saying "Cannot locate service by
>>> name (update${parameters.entityName})".
>>>
>>> I know to do that using service written in java, but this looks more
>>> simply :-)
>>>
>>> Is there some way to solve that or is there any other way to do that,
>>> except java ?
>>>
>>>
>>> Thanx for any advance,
>>>
>>> Radoslav Tomko
>>>
>>>
>>>
>>>
>

Reply via email to