Index: trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 12467)
+++ trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 12469)
@@ -94,5 +94,5 @@
             case WMS_ENDPOINT:
                 // convert to WMS type
-                return getWMSLayerInfo();
+                return getWMSLayerInfo(info);
             case WMTS:
                 // specify which layer to use
@@ -152,5 +152,12 @@
     }
 
-    protected ImageryInfo getWMSLayerInfo() throws IOException, WMSGetCapabilitiesException {
+    /**
+     * Asks user to choose a WMS layer from a WMS endpoint.
+     * @param info the WMS endpoint.
+     * @return chosen WMS layer, or null
+     * @throws IOException if any I/O error occurs while contacting the WMS endpoint
+     * @throws WMSGetCapabilitiesException if the WMS getCapabilities request fails
+     */
+    protected static ImageryInfo getWMSLayerInfo(ImageryInfo info) throws IOException, WMSGetCapabilitiesException {
         CheckParameterUtil.ensureThat(ImageryType.WMS_ENDPOINT.equals(info.getImageryType()), "wms_endpoint imagery type expected");
 
Index: trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 12467)
+++ trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 12469)
@@ -9,4 +9,5 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -22,4 +23,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
@@ -27,4 +29,5 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.gui.widgets.UrlLabel;
+import org.openstreetmap.josm.io.imagery.WMSImagery.WMSGetCapabilitiesException;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -232,6 +235,15 @@
      */
     private static void addWMSLayer(String title, String url) {
-        WMSLayer layer = new WMSLayer(new ImageryInfo(title, url));
-        Main.getLayerManager().addLayer(layer);
+        ImageryInfo info = new ImageryInfo(title, url);
+        if (info.getImageryType() == ImageryType.WMS_ENDPOINT) {
+            try {
+                info = AddImageryLayerAction.getWMSLayerInfo(info);
+            } catch (IOException | WMSGetCapabilitiesException e) {
+                Main.error(e);
+                JOptionPane.showMessageDialog(Main.parent, e.getMessage(), tr("No valid WMS URL or id"), JOptionPane.ERROR_MESSAGE);
+                return;
+            }
+        }
+        Main.getLayerManager().addLayer(new WMSLayer(info));
     }
 
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 12467)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 12469)
@@ -345,8 +345,8 @@
             bboxElem = getChild(element, "LatLonBoundingBox");
             if (bboxElem != null) {
-                double left = Double.parseDouble(bboxElem.getAttribute("minx"));
-                double top = Double.parseDouble(bboxElem.getAttribute("maxy"));
-                double right = Double.parseDouble(bboxElem.getAttribute("maxx"));
-                double bot = Double.parseDouble(bboxElem.getAttribute("miny"));
+                double left = getDecimalDegree(bboxElem ,"minx");
+                double top = getDecimalDegree(bboxElem, "maxy");
+                double right = getDecimalDegree(bboxElem, "maxx");
+                double bot = getDecimalDegree(bboxElem, "miny");
                 bounds = new Bounds(bot, left, top, right);
             }
@@ -357,4 +357,9 @@
 
         return new LayerDetails(name, ident, crsList, josmSupportsThisLayer, bounds, childLayers);
+    }
+
+    private static double getDecimalDegree(Element elem, String attr) {
+        // Some real-world WMS servers use a comma instead of a dot as decimal separator (seen in Polish WMS server)
+        return Double.parseDouble(elem.getAttribute(attr).replace(',', '.'));
     }
 
