Login  Register

Re: Unable to override userLogin Service

Posted by John Martin on Oct 23, 2006; 7:39pm
URL: http://ofbiz.116.s1.nabble.com/Unable-to-override-userLogin-Service-tp142187p142191.html

Thanks Scott for looking into that.  That makes complete sense.

I'm going to need to dig into this a little since I wanted to issolate
my login service from the existing login services.  It doesn't appear
that it will be a huge problem though.

Thanks again - this is just what I needed.

-John

On 10/22/06, Scott Gray <[hidden email]> wrote:

> Hi John
>
> I got it figured, it's all in the checkAuth method, when you call
> userLogin the code realises that you are manually authorizing  so
> doesn't call userLogin itself,  but when you call atpUserLogin  the code
> is automatically calling userLogin as well and then removes the
> parameters from the context.  The solution is to change
> serviceengine.xml to call your atpUserLogin instead of userLogin.
>
> Hope that helps.
>
> Regards
> Scott
>
> Scott Gray wrote:
> > Hi John
> >
> > I can't help you much but i can tell you that the parameters are
> > removed from context in ServiceDispatcher.java at checkAuth() but I
> > don't know why the default service would work but your one wouldn't.
> >
> > Regards
> > Scott
> >
> > John Martin wrote:
> >> Hi -
> >>
> >> I posted this a week ago but got no response, hopefully someone has a
> >> suggestion for me?
> >>
> >> Thanks,
> >>
> >> John
> >>
> >>
> >> On 10/13/06, John Martin <[hidden email]> wrote:
> >>> I'm integrating ofBiz with a 3rd party system using RMI.  I've copied
> >>> with success various service definitions into my own xml files to
> >>> issolate my changes from ofBiz. When I tried to override the userLogin
> >>> it wouldn't work.  I started getting:
> >>>
> >>>       org.ofbiz.service.ServiceValidationException:
> >>>
> >>>       The following required parameter is missing:
> >>> [apUserLogin.login.password]
> >>>       The following required parameter is missing:
> >>> [apUserLogin.login.username]
> >>>
> >>> I tried debugging the ofBiz ServiceValidation functionality to see
> >>> what is happening.  It appears to me that the password and username
> >>> form variables are being removed from the context but unable to find
> >>> where that occurs.
> >>>
> >>> My remote client is successful calling userLogin but fails calling my
> >>> apUserLogin service.  There is no difference between the services
> >>> except for the service name.
> >>>
> >>> The problem seems to be specifically with the userLogin service call
> >>> because other services in the same servicedef xml file work.
> >>>
> >>> Here's my steps:
> >>>
> >>> 1. Copied framework/common/servicedef/service.xml to service_ap.xml
> >>> 2. Removed all but the methods I wanted to override (userLogin,
> >>> updatePassword)
> >>> 3. Added 'ap' prefix to each of the service names
> >>> 4. Added export="true" to each service
> >>> 5. Added xml file to the framework\common\ofbiz-compo    nent.xml
> >>>
> >>>     <service-resource type="model" loader="main"
> >>> location="servicedef/services.xml"/>
> >>>     <service-resource type="model" loader="main"
> >>> location="servicedef/services_ap.xml"/>
> >>>
> >>> Does anyone know what just the userLogin service would not work?
> >>>
> >>> Thanks,
> >>>
> >>> John
> >>>
> >>
> >
> >
>
>