Jump to content
We've recently updated our Privacy Statement, available here ×

iReport : WMS map as input for an image ?


guigui94

Recommended Posts

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.1net.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_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 
    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

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...