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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:47:20+00:00 2026-06-07T11:47:20+00:00

I would be very grateful if someone finds a solutions for my problem… While

  • 0

I would be very grateful if someone finds a solutions for my problem…

While invoking a web method from my WebService I’ve got following error:

[com.sun.istack.SAXParseException2; lineNumber: 1; columnNumber: 223; unexpected element (uri:””, local:”sport”). Expected elements are <{}mostFavored>,<{}teamA>,<{}teamB>,<{http://sdl.ws.lsep.lskings.com/}scoring>,<{http://sdl.ws.lsep.lskings.com/}sport>,<{}gameId>,<{http://sdl.ws.lsep.lskings.com/}gameScoring>]

I wonder why the message contains element “sport” and why it isn’t matched to the <{http://sdl.ws.lsep.lskings.com/}sport>. I think that this is related to the namespaces but I couldn’t manage to resolve that problem and I’ve been stuck for 2 nights so far…

I am using JBossWS tool to generate client web services and everything is deployed on JBoss 7.1.1 (but I don’t think that this is relevant). Please give me at least any clue 🙂

Here is GameScoring class:

@Entity
@Table(name = "`GAMESCORING`")
@XmlRootElement
@XmlType(name = "GameScoring", propOrder = { "gameScoringId", "scoring", "finished", "startTime", "stopTime",
    "tiebreak" })
public class GameScoring implements Serializable {
@Id
@GeneratedValue
@Column(name = "game_scoring_id")
private long gameScoringId;

@OneToMany(cascade = CascadeType.ALL, mappedBy = "scoring")
private List<GamePeriod> periods;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "scoring_id")
private Scoring scoring;

private boolean finished;

private Date startTime;

private Date stopTime;

private GamePeriod tiebreak;

public GameScoring() {
    super();
}

and the same class generated on the client side:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GameScoring", propOrder = {
"gameScoringId",
"scoring",
"finished",
"startTime",
"stopTime",
"tiebreak"
})

public class GameScoring {

protected long gameScoringId;
@XmlElement(namespace = "http://sdl.ws.lsep.lskings.com/")
protected Scoring scoring;
protected boolean finished;
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar startTime;
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar stopTime;
protected GamePeriod tiebreak;
+ getters/setters

How I invoke web service methods:

GameManagerService gm_service = new GameManagerService();
GameManagerPortType gm_port = gm_service.getGameManagerPort();
com.lskings.lsep.ws.sdl.Game game = gm_port.getMostFavored();

Here web service SEI:

@WebService(name = "GameManagerPortType")
@SOAPBinding(style = Style.RPC, use = Use.LITERAL)
public interface GameManagerEndpoint {

@WebMethod
@WebResult(name = "success")
public boolean addGame(
        @WebParam(name = "sportId") String sportId,
        @WebParam(name = "leagueId") String leagueId,
        @WebParam(name = "scoringId") String scoringId,
        @WebParam(name = "participantHomeId") long participantHomeId,
        @WebParam(name = "participantAwayId") long participantAwayId);

@WebMethod
@WebResult(name = "success")
public boolean deleteGame(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "exists")
public boolean exists(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "game")
public Game getGame(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "gameList")
public List<Game> getGamesForLeague(@WebParam(name = "leagueId") long leagueId);

@WebMethod
@WebResult(name = "gameList")
public List<Game> search(@WebParam(name = "query") String query);

@WebMethod
@WebResult(name = "gameList")
public List<Game> getGamesForSport(@WebParam(name = "sportId") long sportId);

@WebMethod
@WebResult(name = "game")
public Game getMostFavored();

@WebMethod
@WebResult(name = "success")
public boolean setMostFavored(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "gamePeriods")
public List<GamePeriod> getPeriods(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "gamePeriodsWithTiebreaks")
public List<GamePeriod> getPeriodsWithTiebreaks(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "gameScore")
public int[] getScore(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "periodActions")
public List<GameAction> getPeriodActions(@WebParam(name = "periodId") long periodId);

@WebMethod
@WebResult(name = "allActions")
public List<GameAction> getAllActions(@WebParam(name = "gameId") long gameId);

@WebMethod
@WebResult(name = "gameTimer")
public String getGameTimer(@WebParam(name = "gameId") long gameId);

}

full stack trace:

http://pastebin.com/9pfCNFcw

Game.java – server side

 @Entity
 @Table(name = "`GAME`")
 @XmlRootElement
 @XmlType(name = "Game", propOrder = { "gameId", "sport", "mostFavored" })
 public class Game implements Serializable {

private static final long serialVersionUID = -1564911377701558631L;

@Id
@GeneratedValue
@Column(name = "game_id")
private long gameId;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "sport_id")
private Sport sport;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "scoring_id")
private Scoring scoring;

@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "game_scoring_id")
private GameScoring gameScoring;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "teamA_id")
private Participant teamA;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "teamB_id")
private Participant teamB;

@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "league_id")
private League league;

@Column(name = "most_favored")
private boolean mostFavored;

public Game() {
    super();
}

public Game(Sport sport, Scoring scoring, Participant teamA, Participant teamB) {
    this(sport, scoring, teamA, teamB, null);
}

public Game(Sport sport, Scoring scoring, Participant teamA, Participant teamB, League league) {
    super();
    this.sport = sport;
    this.scoring = scoring;
    this.teamA = teamA;
    this.teamB = teamB;
    this.league = league;
    this.mostFavored = false;

    LinkedList<GamePeriod> periods = new LinkedList<GamePeriod>();

    this.gameScoring = new GameScoring();

    Period p = scoring.getPeriods().get(0);
    GamePeriod gp = new GamePeriod(p, gameScoring);
    periods.add(gp);
    gp.generateParents(true);

    gameScoring.setPeriods(periods);
    gameScoring.setScoring(scoring);
}

public Sport getSport() {
    return sport;
}

@XmlTransient
public Scoring getScoring() {
    return scoring;
}

@XmlTransient
public Participant getTeamA() {
    return teamA;
}

@XmlTransient
public Participant getTeamB() {
    return teamB;
}

@XmlTransient
public GameScoring getGameScoring() {
    return gameScoring;
}

public void setSport(Sport sport) {
    this.sport = sport;
}

public void setScoring(Scoring scoring) {
    this.scoring = scoring;
}

public void setGameScoring(GameScoring gameScoring) {
    this.gameScoring = gameScoring;
}

public void setTeamA(Participant teamA) {
    this.teamA = teamA;
}

public void setTeamB(Participant teamB) {
    this.teamB = teamB;
}

public long getGameId() {
    return gameId;
}

public void setGameId(long gameId) {
    this.gameId = gameId;
}

@XmlTransient
public League getLeague() {
    return league;
}

public void setLeague(League league) {
    this.league = league;
}

public boolean isMostFavored() {
    return mostFavored;
}

public void setMostFavored(boolean mostFavored) {
    this.mostFavored = mostFavored;
}

}

Game.java – client side:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Game", propOrder = {
"gameId",
"sport",
"mostFavored"
})
public class Game {

protected long gameId;
 //    @XmlElement(namespace = "http://sdl.ws.lsep.lskings.com/")
protected Sport sport;
protected boolean mostFavored;

/**
 * Gets the value of the gameId property.
 * 
 */
public long getGameId() {
    return gameId;
}

/**
 * Sets the value of the gameId property.
 * 
 */
public void setGameId(long value) {
    this.gameId = value;
}

/**
 * Gets the value of the sport property.
 * 
 * @return
 *     possible object is
 *     {@link Sport }
 *     
 */
public Sport getSport() {
    return sport;
}

/**
 * Sets the value of the sport property.
 * 
 * @param value
 *     allowed object is
 *     {@link Sport }
 *     
 */
public void setSport(Sport value) {
    this.sport = value;
}

/**
 * Gets the value of the mostFavored property.
 * 
 */
public boolean isMostFavored() {
    return mostFavored;
}

/**
 * Sets the value of the mostFavored property.
 * 
 */
public void setMostFavored(boolean value) {
    this.mostFavored = value;
}

}
  • 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-07T11:47:21+00:00Added an answer on June 7, 2026 at 11:47 am

    I found out a few days ago that it had something to do with @ManyToOne and @ManyToMany JPA annotations. However, I am not sure why it fails while using those annotations, the @XmlTransient annotation resolved it. After that I simply needed to wirte some extra code for getting related objects by id.

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

Sidebar

Related Questions

I would be very grateful if someone could help me with this. I have
I would be very grateful if someone could explain if it is possible to
I would be so very grateful if someone could help me out! I have
This is driving me crazy. Very grateful if someone could help me out! Problem:
I would be very grateful if someone could help me break through this issue
I'm quite new on data bases and would be very grateful for some help,
i m new to this android application development i would be very much grateful
have small problem, and would very much appreciate help :) I should convert byte
Would very much appreciate any help or hint on were to go next. I'm
I've recently begun working on a very large, high traffic website. We would very

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.