Welcome
Guest
, you are in:
<root>
EnterpriseLibrary
FDOT Security STS
FDOT_Application_Model
GisFramework
•
Login
FDOT Wiki
GisFramework
¶
Gis Framework
Fdot Wiki
Random Page
All Pages
Categories
Search the wiki
»
Back
WCF GIS Services
Modified on Monday, 18 July 2011 08:16 AM
by 156.75.200.64
Categorized as
Service Calls
The Gis Framework exposes WCF Services to perform Geometry Service Operations and Queries. This can be used to obtain GIS information for webpages that are not in the context of the GIS Framework Map. {toc} ==WCF Service Set-up== [image|Adding A Service Reference|{UP(GisFramework.WcfGisServices)}AddQueryServiceReference.png] Calls to the WCF Services of the GIS Framework must have a custom header added that specifies what virtual application the service call should be done in the context of. (((@@ var queryService = new GISQueryService.QueryServiceClient(); queryService.ChannelFactory.Endpoint.Behaviors.Add(new CustomHeaderBehavior()); @@))) ====CustomHeaderBehavior==== (((@@public class CustomHeaderBehavior : IEndpointBehavior { public void Validate(ServiceEndpoint endpoint) { } public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { throw new NotImplementedException(); } public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { clientRuntime.MessageInspectors.Add(new CustomHeaderMessageInspector()); } }@@))) ====CustomHeaderMessageInspector==== (((@@ public class CustomHeaderMessageInspector : IClientMessageInspector { public object BeforeSendRequest(ref Message request, IClientChannel channel) { string myHeaderName = "X-FDOT-GIS-Application-Id"; // The headerValue below should be the name of your Virtual Application string myheaderValue = "GEV"; if (!request.Properties.ContainsKey(HttpRequestMessageProperty.Name)) { request.Properties.Add(HttpRequestMessageProperty.Name, new HttpRequestMessageProperty()); } var property = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]; property.Headers[myHeaderName] = myheaderValue; return null; } public void AfterReceiveReply(ref Message reply, object correlationState) { } }@@))) ==Query Service== See Main Article [QueryService|Query Service] The QueryService can be used to perform queries and a number of other Map Related functions for an ArcGIS MapService. ==Geometry Service== See Main Article [GeometryService|Geometry Service] The GeometryService contains utility methods, which provide access to sophisticated and frequently used geometric operations. ==See Also== {incoming}
Meta Keywords:
Meta Description:
Change Comment:
Any Questions or Comments? Email
GIS Framework Development Team
Some of the icons created by
FamFamFam
.