The map passed to a service call is the "context" (incoming parameters) for 
that service.

You're passing an entity value object to the service as the context instead of 
putting the entity value object IN the context and then passing the context. 
There are two problems with that:

1. the entity value object will likely have values in it that are not valid for 
the service
2. the service engine is going to look for values in the value object that are 
not part of the entity, thus triggering an error meant to help with run-time 
debugging

-David


On Jan 31, 2010, at 7:25 PM, Patrick wrote:

> Basically I am trying to pass a ProductCategory into the service
> createProductCategory below
> 
> <simple-method method-name="createUserLoginAndCategory"
> login-required="false">
> <make-value value-field="productCat" entity-name="ProductCategory"/>
> <set field="productCat.productCategoryId" value="778"/>
> <set field="productCat.categoryName" value="TEST"/>
> <call-service service-name="createProductCategory" in-map-name="productCat" />
> 
> I would like to create this entity "ProductCategory" and pass it into
> the service "createProductCategory"
> 
> The error I get is this, java.lang.IllegalArgumentException:
> [GenericEntity.set] "userLogin" is not a field of ProductCategory,
> must be one of: productCategoryId, productCategoryTypeId,
> 
> This doesn't make sense to me, because I know that userLogin is not a
> field of ProductCategory, my code doesn't indicate that at all.
> Thanks in advance for any assistance. Patrick

Reply via email to