describeNamedMaps

Description

Takes a list of maps as the input in the request and gives the description of those maps.

ACL Authorization Flow

To return the description of maps, the user (or the role they belong to) needs EXECUTE permission on the Named table.

Messages

The following table lists the request and response messages for the describeNamedMaps operation.

Click on a message name to get more information about the message.

Message Description
DescribeNamedMapsRequest The request message for the describeNamedMaps operation.
DescribeNamedMapsResponse The response message for the describeNamedMaps operation.

Examples

Sample SOAP request:

<?xml version="1.0"?>   
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:v1="http://www.mapinfo.com/midev/service/mapping/v1">  
   <S:Header/>  
   <S:Body>  
      <v1:DescribeNamedMapsRequest>  
        <v1:NamedMap>/Samples/NamedMaps/MapWithLayerStyle</v1:NamedMap>  
        <v1:NamedMap>/Samples/NamedMaps/USAWithGradSymLayer</v1:NamedMap>  
        <v1:NamedMap>/DoesNotExist</v1:NamedMap>  
      </v1:DescribeNamedMapsRequest>  
   </S:Body>  
</S:Envelope>

Sample SOAP response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
       <soap:Body>
              <DescribeNamedMapsResponse 
		xmlns="http://www.mapinfo.com/midev/service/mapping/v1" 
		xmlns:ns2="http://www.mapinfo.com/midev/service/mappingcommon/v1" 
		xmlns:ns3="http://www.mapinfo.com/midev/service/table/v1" 
		xmlns:ns4="http://www.mapinfo.com/midev/service/style/v1" 
		xmlns:ns5="http://www.mapinfo.com/midev/service/featurecollection/v1" 
		xmlns:ns6="http://www.mapinfo.com/midev/service/geometries/v1" 
		xmlns:ns7="http://www.mapinfo.com/midev/service/theme/v1" 
		xmlns:ns8="http://www.mapinfo.com/midev/service/common/v1" 
		xmlns:ns9="http://www.mapinfo.com/midev/service/units/v1">
                     <Map name="/Samples/NamedMaps/MapWithLayerStyle">
                           ...
                     </Map>
                     <Map name="/Samples/NamedMaps/USAWithGradSymLayer">
                           ...
                     </Map>
                     <ErrorMessages>
                           <ns8:ErrorMessage name="/DoesNotExist">
				RepositoryEx_ResourceNotFound: 
				Resource was not found - /DoesNotExist</ns8:ErrorMessage>
                     </ErrorMessages>
              </DescribeNamedMapsResponse>
       </soap:Body>
</soap:Envelope>
Sample SOAP stub for Java:
package mapping.sample;

import mapping.utility.Preference;
import mapping.utility.PrintMappingResponse;

import com.mapinfo.midev.service.mapping.v1.DescribeNamedMapsRequest;
import com.mapinfo.midev.service.mapping.v1.DescribeNamedMapsResponse;
import com.mapinfo.midev.service.mapping.ws.v1.MappingServiceInterface;
import com.mapinfo.midev.service.mapping.ws.v1.ServiceException;

public class DescribeNamedMaps {
	private static DescribeNamedMapsRequest createDescribeNamedMapsRequest() throws Exception {
		DescribeNamedMapsRequest request = new DescribeNamedMapsRequest();
		request.getNamedMap().add("/Samples/NamedMaps/MapWithLayerStyle");
		request.getNamedMap().add("/Samples/NamedMaps/MapWithLayer");
		request.getNamedMap().add("/Samples/NamedMaps/USAWithGradSymLayer");
		return request;
	}

	public static void main(String[] args) {
		try {
			MappingServiceInterface mapping = Preference.getServiceinterface();
			DescribeNamedMapsRequest request = createDescribeNamedMapsRequest();
			DescribeNamedMapsResponse response = mapping.describeNamedMaps(request);
			PrintMappingResponse.printDescribeNamedMapsResponse(response);
		} catch (ServiceException se) {
			PrintMappingResponse.printError(se);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

Sample SOAP stub for .NET:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.ServiceModel;
using MappingSamples.MappingService;

namespace MappingSamples
{
    class DescribeNamedMaps
    {
        static void Main(string[] args)
        {
            try
            {
                // create the client to communicate to the service
                MappingServiceInterfaceClient client = Preference.getServiceInterface();

                // create the DescribeNamedMapsRequest.
                DescribeNamedMapsRequest request = createDescribeNamedMapsRequest();

                // call the describeNamedMaps function.
                DescribeNamedMapsResponse response = client.describeNamedMaps(request);
                if (response.Map == null)
                {
                    Console.WriteLine("No maps found on the server.");
                }
                else
                {
                    foreach (Map map in response.Map)
                    {
                        if (map != null)
                        {
                            Console.WriteLine("Map information:");
                            PrintUtils.printMap(map);
                            Console.WriteLine("------");
                        }
                    }
                }
            }
            catch (FaultException<MapInfoDeveloperException> ee)
            {
                String s = ee.Message;
                Console.Out.WriteLine("Service Error returned: " + s);
            }
            catch (Exception ex)
            {
                String e = ex.ToString();
                Console.Out.WriteLine("Error: " + ex.ToString());
            }
            Console.Read();
        }

        // This creates a DescribeNamedMapsRequest.
        private static DescribeNamedMapsRequest createDescribeNamedMapsRequest()
        {
            // create the DescribeNamedMapsRequest
            DescribeNamedMapsRequest req = new DescribeNamedMapsRequest();
            req.NamedMap = new string[3];
            req.NamedMap[0] = "/Samples/NamedMaps/MapWithLayerStyle";
            req.NamedMap[1] = "/Samples/NamedMaps/MapWithLayer";
            req.NamedMap[2] = "/Samples/NamedMaps/USAWithGradSymLayer"; 

            return req;
        }
    }
}