Unknown Host exception accessing Weather.com site
843838Feb 1 2006 — edited Feb 2 2006Hi,
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