Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7968691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:07:00+00:00 2026-06-04T07:07:00+00:00

I’m developing a JSF 2.0 app that consumes a SOAP-based web service. I want

  • 0

I’m developing a JSF 2.0 app that consumes a SOAP-based web service.

I want to use in the JSFs pages most of the generated client classes for the Web Service – but the client classes are not managed beans (nor CDI beans)… and as there are a lot of client classes I don’t think is feasible to add @ManagedBean or @Named annotations to all classes…

Let me give you an example so things might get a bit clearer:

The User class is a generated client class – this class has only two attributes (login and password).

I want to be able to assign values to the attributes of a given user in the JSF page:

<h:inputText value="#{user.name}"/>
<h:inputText value="#{user.password}"/>

And then I want to call my UserService to authenticate the user:

<h:commandButton value="Login" action="#{userService.authenticate}"/>

The only way (AFAIK) to assign a value to the User object from the JSF page is by making the User object a managed bean (or a CDI bean).

As there are more than 100 client classes, I definitely don’t want to add @ManagedBean or @Named annotations on all classes (I equally don’t want to add message-bean element for each class in the faces-config.xml).

And even if annotating all classes were a feasible option, the solution would have a drawback: the service contract (WSDL) might change at any minute and I would be obligated to regenerate the client classes… I’d loose the annotated classes.

What is the best way to handle this (kind of) issue?

I’ve looked for a way to declare all classes of a package in the faces-config.xml (example below), but I could find neither a way to do that nor a feasible alternative.

<managed-beans>
    <managed-beans-package>x.y.z.ws.client</managed-beans-package>
    <managed-beans-scope>none</managed-beans-scope>
</managed-beans>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:07:01+00:00Added an answer on June 4, 2026 at 7:07 am

    Just make the User a property of UserService. That’s also more conform JSF’s MVC ideology. The UserService is the controller and the User is the model.

    Thus so,

    @ManagedBean
    @ViewScoped
    public class UserService {
    
        private User user;
    
        // ... (don't forget to prepare user in (post)constructor if "new" user)
    }
    

    with

    <h:inputText value="#{userService.user.name}" />
    <h:inputText value="#{userService.user.password}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.