iReport : WMS map as input for an image ?

1

dear all,

I wonder if instead of the default map component i can use a WMS url to define an image source in iReport ?

here is an example of WMS that show an image as jpeg file :

http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?request=getmap&service=wms&BBOX=-90,30,5,65&srs=EPSG:4326&format=image/jpeg&layers=gebco_08_grid&width=900&height=600&version=1.1.1

I did try serveral options i failed. the error i got :

Error filling print... 
net.sf.jasperreports.engine.JRException: Error opening input stream from URL : http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?request=getmap&service=wms&BBOX=-90,30,5,65&srs=EPSG:4326&format=image/jpeg&layers=gebco_08_grid&width=300&height=150&version=1.1.1
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error opening input stream from URL : http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?request=getmap&service=wms&BBOX=-90,30,5,65&srs=EPSG:4326&format=image/jpeg&layers=gebco_08_grid&width=300&height=150&version=1.1.1 
 

...

Caused by: net.sf.jasperreports.engine.JRException: Error opening input stream from URL : http://www.gebco.net/data_and_products/gebco_web_services/web_map_servic...
at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:317)

...

Caused by: java.net.ConnectException: Connection timed out: connect

but in firefox the URL is loaded very fastly si the URL is OK

anyone can help me ?

thanks

Guillaume

guigui94's picture
Joined: Mar 19 2010 - 1:51am
Last seen: 9 months 2 weeks ago
Now that it's WE here i realize that my proxy setting was not set ... WMS works fine as image source.
guigui94 - 6 years 4 months ago
Hi, I searched for hours but not found even a clue except yours. Can you explain briefly how did you achive to change google map server to your wms server. Thanks in advance
ismails - 6 years 3 months ago
juste use a classic image component instead of the google map one.
guigui94 - 6 years 3 months ago
show 1 more...

You can use also a WMS server as the source for your map image. But alas, it seems to crash the Jasper Reports environment.

jonay.santana - 4 years 3 months ago

0 Answers:

No answers yet
Feedback
randomness