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 6199859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:15:48+00:00 2026-05-24T04:15:48+00:00

I’ve just started using CXF 2.4 to expose some methods in an existing web

  • 0

I’ve just started using CXF 2.4 to expose some methods in an existing web application. One of the methods returns a complex type object – Employee which has an Address object as a property.

The employee object looks like:

public class Employee implements Serializable {
    private String gid;
    private String name;
    private Address employeeAddress;
    //...getters and setters omitted
}

The method signature in the service side interface looks like:

Employee getEmployee(@WebParam(name="gid") String gid);

On the client side I used the CXF WsdlToJava utility to generate my client side stubs from the server wsdl address and was happily using the Employee object in my client web application.

Today a co-worker pointed out to me that I shouldn’t be using the webservice generated objects in my client application code. Instead I should create an Employee class specific to my client web app and copy the properties from the web service Employee object to my application Employee object to prevent the web service code ending up throughout the code base.

To me this seems like overkill, in effect I’ll create an Employee class plus an Address class and copy properties back and forth between objects of those types and those of the webservices.

In my application I’m displaying the details of the Employee object on a JSP page but not doing much else with it.

So to sum up my question – when using webservice calls in CXF which return complex type objects, should you always use separate client application specific objects which copy the properties of the webservice generated objects? Is there a rule to use or does it depend on how complex the objects returned are and what the client application intends to do with them (e.g. just display them, edit them and return them, store them in a client application db.)

Thanks
Darren

  • 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-05-24T04:15:49+00:00Added an answer on May 24, 2026 at 4:15 am

    I don’t see any problem in using webservice generated object on the client side.
    And creating own class and move the prperties back and forth is just a time killing process.

    When tool is providing you the implementation feature why we need to manually do the changes.If there is a valid point then need to be figure out.

    So my answear is you can work with the webservice generated Employee class for your implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.