wood burning stoves 2.0*
The moose likes Web Services and the fly likes  JAX WS marshalling, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark " JAX WS marshalling," Watch " JAX WS marshalling," New topic
Author

JAX WS marshalling,

John Bates
Greenhorn

Joined: May 31, 2012
Posts: 9
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.JAXBContext.newInstance(ss.getClass().getPackage().getName());
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
Bartender

Joined: Nov 09, 2011
Posts: 1012
    
    5

You need to provide more information here. Simply saying you have an issue is not very helpful.
 
 
subject: JAX WS marshalling,
 
Similar Threads
JAX-WS Client for a SOAP service provider
new to webservices,want a online tutorial for JAX-WS
Suggestion for novice to Web Service
EAR file
doubt in web service composition