• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating a weather forecast page

 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a complete newbie to web services, but I want to create a page with the current weather and forecast using the service provided here. I have no idea how to get started and Google is not helping me. I've seen the various Javascript gadgets from weather.com and so on, but that's not what I'm looking for. This is a page that will be displayed on a 47" monitor in kiosk mode so I have to build it from scratch.

Can someone please direct me to a tutorial or other reading that will help me get started on using this web service and parsing the resulting XML file in a way that I can use it?

BTW, if there is a better web service for weather, please let me know. I'd like to find one that provides severe weather alerts in addition to current conditions and forecasts.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

CDYNE Weather is a free SOAP Web Service that provides you with up to date weather information in the United States. This information is derived from the National Oceanic and Atmospheric Administration's (NOAA) National Weather service into a clean and easy to parse XML format. The first method offers the city's weather by zip code, and the second shows the weather station's 7 day forecast by zip code. This free Weather Web Service also comes standard with hyperlinks that show images (GIF) of the day's weather conditions, so you can show off your application with visual representations.



1. Download a copy of SOAPUI.
2. Download and install Apache CXF.
3. Configure SOAPUI to use CXF wsdl2java tools.
4. Point SOAPUI at the WSDL.
5. Generate Java code.
6. Embed generated Java Classes in your web-app.
7. Test and Deploy.

Easy! ;)

WP
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Easy for you. I'm already stuck on step one. I've installed soapUI but when I try to add a wsdl I get "Error loading [http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected character encountered: '#'"

I also get this message using the URLs in the soapUI tutorial. I've configured the proxy settings but I wonder if this is an authentication error with a misleading error message because I can enter the url in a browser and get the xml file just fine, and it looks like a correctly formed xml file with no sign of a "#" anywhere in the file.

Is soapUI my only option? There is no support unless I buy the Pro version. There is a community forum with lots of questions but very few replies.




 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The more I mess with this, the more it becomes obvious that I'm getting in over my head. I searched for "web services" on Amazon and got over 45,000 results. I'm thinking that this book might be a good one, or maybe this one.

Anyone have any experience with these books or maybe suggest some others?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd advise finding a service that uses a RESTful API. REST is much more modern than SOAP, and about 100 times easier to deal with.
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Bear. I found one here. I'll look for some tutorials on using REST services. Is there another tool similar to soapUI that's designed to work with REST?

This is all new territory for me, so I have a lot to learn.

Any thoughts on the books I found or others you can recommend?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read up on REST before deciding if you need "tools".
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic