User Registration - Missing RegistrationService

Hello all,

I’ve been following the sample-user-registration sample project, and I’ve hit an issue where I try to inject the RegistrationService, but it doesn’t appear to be available in my project. I’ve installed the Rest API add-on, but in the RegisterScreen.java file, I don’t seem to be able to find the RegistrationService. I see that it is available in the sample project, but I’m wondering if the CUBA version is the cause of the difference, or maybe something else.

My project is using the 7.1.4 platform version.

Thanks in advance for your assistance!

Hello, Adam!

RegistrationService is implemented in the sample.

See “global” module:
com.company.sample.service.RegistrationService

and implementation in the “core” module:
com.company.sample.service.RegistrationServiceBean.

Hi @Pinyazhin,

Thanks for your reply. I’m afraid I didn’t make my issue as clear as I should have.

The sample project itself has the RegistrationService, and that works as it should.

The problem I have is that I’m setting up another project in the 7.1.4 platform version, and in my own project, in the RegisterScreen.java file, I can’t find the RegistrationService to inject. When I try to manually add it in I get the following results:

55%20PM

I’m wondering what I might be doing incorrectly.

Thanks again!

Did you place RegistrationService interface to the “global” module? Web module communicates with the core via a global module.

Also, check your web-spring.xml file. It should contain registration of your service in the WebRemoteProxyBeanCreator:

<bean class="com.haulmont.cuba.web.sys.remoting.WebRemoteProxyBeanCreator">
    <property name="serverSelector"
              ref="cuba_ServerSelector"/>
    <property name="remoteServices">
        <map>
            <entry key="sample_RegistrationService"
                   value="com.company.sample.service.RegistrationService"/>
        </map>
    </property>
</bean>

To learn more, check the documentation about creating and using services.

If the problem still not resolved, please share a small demo project where issue is reproduced.

Hello @Pinyazhin,

I did not create a service or add anything to the web-spring.xml file. I didn’t see any instruction to do so in the sample-user-registration README file, so I didn’t know to do this.

Hello Adam,

Probably, it is not clear from README that you should create this service. Thank you for your feedback, we will add information about this service to the README file.