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

  • Home
  • SEARCH
  • 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 8538341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:06:27+00:00 2026-06-11T11:06:27+00:00

I have to make a web service using JAX-RPC for a project and I

  • 0

I have to make a web service using JAX-RPC for a project and I get error: invalid type for JAX-RPC structure: jspf.common.ForumPost when trying to compile it. We have to use JDK 5 and J2EE 1.4. I’m using Netbeans 7.0 with the JAX-RPC plugin and Glassfish v1 support plugin to use Application Server PE 9 as my container.

This is my class:

package jspf.common;

import java.sql.Date;


public class ForumPost extends java.lang.Object implements java.io.Serializable {

    private String poster;
    private String content;
    private int topic_id;
    private int post_id;
    private Date time;

    /**
     * Creates a new ForumPost object.
     * @param poster The username of the user that posted the post.
     * @param content The body/content of the post.
     * @param topic_id The topic ID that this post replies to.
     * @param post_id This post's ID.
     */
    public ForumPost() {
    }

    public ForumPost(int post_id, int topic_id, String poster, String content, Date time) {
        this.poster = poster;
        this.content = content;
        this.topic_id = topic_id;
        this.post_id = post_id;
        this.time = time;
    }

    public Date getTime() {
        return time;
    }

    public String getContent() {
        return content;
    }

    public int getPost_id() {
        return post_id;
    }

    public String getPoster() {
        return poster;
    }

    public int getTopic_id() {
        return topic_id;
    }
}

Yes, I have to use this old technology unfortunately.

I was having similar issues with another class but that seemed to be fixed by removing the ArrayList that was within it, but I actually need that ArrayList.

Why am I getting this error?

EDIT: I got rid of all references to java.sql.Date, as follows:

package jspf.common;

public class ForumPost extends java.lang.Object implements java.io.Serializable {

    private String poster;
    private String content;
    private int topic_id;
    private int post_id;
    private long time;

    /**
     * Creates a new ForumPost object.
     * @param poster The username of the user that posted the post.
     * @param content The body/content of the post.
     * @param topic_id The topic ID that this post replies to.
     * @param post_id This post's ID.
     */
    public ForumPost() {
    }

    public ForumPost(int post_id, int topic_id, String poster, String content, long time) {
        this.poster = poster;
        this.content = content;
        this.topic_id = topic_id;
        this.post_id = post_id;
        this.time = time;
    }

    public long getTime() {
        return time;
    }

    public String getContent() {
        return content;
    }

    public int getPost_id() {
        return post_id;
    }

    public String getPoster() {
        return poster;
    }

    public int getTopic_id() {
        return topic_id;
    }
}

And I still get the same error. I don’t understand what the problem is.

  • 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-11T11:06:27+00:00Added an answer on June 11, 2026 at 11:06 am

    I found the problem. Value types as defined in the J2EE 1.4 documentation must contain getter and setter methods, my class contained only getter methods.

    Value Types

    A value type is a class whose state can be passed between a client and
    a remote service as a method parameter or return value. For example,
    in an application for a university library, a client might call a
    remote procedure with a value type parameter named Book, a class that
    contains the fields Title, Author, and Publisher.

    To be supported by JAX-RPC, a value type must conform to the following
    rules:

    • It must have a public default constructor.
    • It must not implement (either directly or indirectly) the java.rmi.Remote interface.
    • Its fields must be supported JAX-RPC types.

    The value type can contain public, private, or protected fields. The
    field of a value type must meet these requirements:

    • A public field cannot be final or transient.
    • A nonpublic field must have corresponding getter and setter methods.

    Source: http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXRPC4.html#wp130601

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

Sidebar

Related Questions

I have a method that I call to make web service requests using GET.
I have an application I am developing that deploys a JAX-WS web service using
We have created a web service using JAX-WS and ProSyst OSGi. Accessing the service
Hope you are fine. I have to make a Web Project (very simple) I
I have several web applications that make use of packages using WebActivator. On my
I'm trying to make a sample SOAP web service using Spring-WS and JAXB and
I have a Rails app whose major part is to query another web-service using
I have created a web service which has a couple of methods developed using
I'm trying to consume a RESTful web service using WCF. I have no control
I have a WCF web service which throws exceptions when invalid data is submitted.

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.