Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX WS marshalling,

John Bates
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing web service using JAX WS,
my coursework is to utilise web services to compose a travel agency. The travel agency consists of three independent services: flight booking, hotel reservation, and currency conversion. i will build the first two application services by myself but i should consume a publically available service for currency conversion.

My issue is getting the flight information from java objects to xml document,
would you please hlp me in this issue,

Thanks for your time.
Chao Fan,

@WebMethod(operationName = “Flightfile”)
public Boolean CreateItinerary() {
Flights ss = new Flights();
List newSegments = (List) setSegments.getFlightSegments();
ss toflights;
toflights = new ss();
toflights.setAirline(“American Airlines”);
toflights.setOriginCity(“long beach”); toflights.setDestinationCity(“aus islands”);
try {
javax.xml.bind.JAXBContext jaxbCtx =
javax.xml.bind.Marshaller marshaller = jaxbCtx.createMarshaller();
marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, “UTF-8″); //NOI18N
marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
File flightstore = new File(“file.xml”);
marshaller.marshal(ss, flightstore);
James Boswell
Posts: 1051
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to provide more information here. Simply saying you have an issue is not very helpful.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic