Patrik,
Is there a good/better way of acheiving the "No ServiceContext" parameter
for a few Service methods?
I am using Spring/Hibernate-JPA to connect from Flex client.
Here is your earlier quote...
"In the web client we use a servlet filter and then when invoking the
services we just do ServiceContextStore.get() to fetch the ServiceContext
instance. I agree that the more this can be hidden by AOP the better. We
might change to your design in the web client also."
I am not sure if I can so something in my Spring Configuration file to
insert the servicecontext???
Any help will be great!!
Thanks,
Deepak.
Patrik Nordwall wrote:
>
> Hi Ryan,
>
> The ServiceContext parameter is added by the Transformation.ext. Therefore
> you don't see anything in the templates.
>
> Since you are working on the flex support I don't think you need to
> involve SpecialCases.xpt. You can do this directly in the templates,
> Service.xpt.
>
> This is how I would do it (not complete). This will create an interface
> without the service context parameter in the methods.
>
> In Service.xpt add the following
>
> «DEFINE service FOR Service»
> «EXPAND serviceInterface»
> «EXPAND clientServiceInterface»
> ...
>
> «DEFINE clientServiceInterface FOR Service»
> «FILE javaFileName(getServiceapiPackage() + "." + name + "Client")»
> package «getServiceapiPackage()»;
>
> «IF formatJavaDoc() == "" -»
> /**
> * Generated client interface for the Service «name».
> */
> «ELSE -»
> «formatJavaDoc()»
> «ENDIF -»
> public interface «name»Client {
>
> «EXPAND clientInterfaceMethod FOREACH operations.select(op |
> op.isPublicVisibility())»
>
> }
> «ENDFILE»
> «ENDDEFINE»
>
> «DEFINE clientInterfaceMethod FOR ServiceOperation»
> «formatJavaDoc()»
> public «getTypeName()» «name»(«EXPAND paramTypeAndName FOREACH
> parametersWithoutServiceContext() SEPARATOR ","») «
> EXPAND Exception::throws»;
> «ENDDEFINE»
>
> In helper.ext add the following:
>
> List[Parameter] parametersWithoutServiceContext(ServiceOperation
> operation) :
> isServiceContextToBeGenerated() ?
> operation.parameters.reject(p | p.type ==
> getProperty("framework.serviceContextClass")) :
> operation.parameters;
>
>
>
> In the web client we use a servlet filter and then when invoking the
> services we just do ServiceContextStore.get() to fetch the ServiceContext
> instance. I agree that the more this can be hidden by AOP the better. We
> might change to your design in the web client also.
>
> /Patrik
>
>
>
--
View this message in context:
http://www.nabble.com/Remote-service-calls-%28help-with-a-special-cases.xpt--%29-tp18513907s17564p25247217.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer