Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unknown Host exception accessing Weather.com site

843838Feb 1 2006 — edited Feb 2 2006
Hi,

We are working on a website where we need to use weather.com xml feed to show the different weathers for different US cities. The problem we are getting is while trying to access the URL for collecting the xml feed from weather.com through a JSP it is giving �unknown host exception�.

Below is the code which we are using for this.

String url = http://xoap.weather.com/weather/local/USIL0225?cc=*&prod=xoap&par=[partner_id]&key=[license_key]
<%!
public void transform(javax.servlet.jsp.JspWriter out, String url) throws Exception{
javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer transformer = tFactory.newTransformer (new javax.xml.transform.stream.StreamSource("WeatherChannelFeed.xsl"));
transformer.transform (new javax.xml.transform.stream.StreamSource(url), new javax.xml.transform.stream.StreamResult(out));
}
%>

I will really appreciate any help on this issue. Please let us know in case you have any questions.

Thanks,
Sanjay.
Ext 41233
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2006
Added on Feb 1 2006
1 comment
56 views