POST
|
Hi Robert, Since I'm using a WCF rest service, how should I go about getting query results that include a reference or link to a parcel? I found this article about Using QueryTask, Query, and FeatureSet that seems helpful for running a query like this from Web AppBuilder, but how would I do it from the WCF rest service? William
... View more
03-03-2017
11:43 AM
|
0
|
15
|
1695
|
POST
|
Hi Robert, I published the WCF rest service to my local machine this morning. Why is leaving the route prefix empty a problem? Thank you for all your help. William
... View more
03-03-2017
09:33 AM
|
0
|
1
|
733
|
POST
|
Hi Robert, This is an error I get in Visual Studio 2010. Type 'ServiceRoute' is not defined. William
... View more
03-02-2017
01:44 PM
|
0
|
3
|
733
|
POST
|
Hi Robert, For some reason, my Global.asax.vb says ServiceRoute is undefined in the following function. Imports System.Web.SessionState
Imports System.Web.Routing
Imports System.ServiceModel.Activation
Public Class Global_asax
Inherits System.Web.HttpApplication
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
RouteTable.Routes.Add(New ServiceRoute("", New WebServiceHostFactory(), GetType(Service1)))
End Sub
...
End Class Any ideas? William
... View more
03-02-2017
01:12 PM
|
0
|
5
|
733
|
POST
|
Hello, I have developed a WCF rest service for a Web AppBuilder widget to use. I developed it in Visual Studio 2010 on my PC using VB.NET. I tested it with Visual Studio's WCF Test Client. I also tested it by right-clicking the service in Solution Explorer and selecting 'View in Browser', then adding the service function name and parameters to the end of the URL that opens in the browser. (example: http://localhost:port#/ServiceName.svc/ServiceFunction?parameter1=parameter1¶meter2=parameter2) Now I need to add it to our Server. How do I go about this? Do I copy the solution and paste it to the server's C:\inetpub\wwwroot\myWAB folder? Do I need to save the project in a different format in Visual Studio first? Do I need to register it with ArcGIS (Server Manager, Portal, Map, etc.)? For some additional context, here is a link to a thread I used to start the rest service: How to query a non-ArcGIS database from WAB? (This thread is sort of a continuation of that one.) Thank you for any assistance you can provide. William
... View more
03-02-2017
08:26 AM
|
0
|
7
|
1460
|
POST
|
Hi Robert, To call a rest service function that takes no parameters, would the following code work? var requestHandle = esriRequest({
url: "serviceUrl/functionWithNoInputParameters",
handleAs: "json",
timeout: 10000
},{useProxy: true, usePost: false, disableIdentityLookup: true});
requestHandle.then(lang.hitch(this, this._listRequestSucceeded), lang.hitch(this, this._listRequestFailed)); Thank you. William
... View more
03-02-2017
06:28 AM
|
0
|
1
|
584
|
POST
|
Hi Robert, Are you suggesting I use this format so I can avoid having to deserialize a JSON? William
... View more
02-21-2017
12:48 PM
|
0
|
1
|
584
|
POST
|
Hi Drew, I asked about JavaScriptSerializer because I was having trouble adding JSON.NET to Visual Studio 2010. It kept telling me to update NuGet before adding JSON.NET, but wouldn't let me update NuGet. That was Friday. Today when I tried, I was prompted that there was an update for NuGet, would I like to install it? Anyway, so far the main function for my rest service looks as follows (in VB.NET). Function RatioQuery(ByVal p_QueryObject As String) Implements IRatioQueryService.RatioQuery
Dim deserializedSearchParameters As SearchParameters
deserializedSearchParameters = JsonConvert.DeserializeObject(p_QueryObject)
//p_QueryObject = {neighborhood: "MyNeighborhood", schoolDistrict: "MySchoolDistrict", useCodeOne: "MyUseCodeOne"}
End Function I have a SearchParameters class with the following basic structure. Public Class SearchParameters
Private m_Neighborhood As String
Private m_SchoolDistrict As String
Private m_UseCode1 As String
Public Property Neighborhood As String
Get
Return m_Neighborhood
End Get
Set(value As String)
m_Neighborhood = value
End Set
End Property
Public Property SchoolDistrict As String
Get
Return m_SchoolDistrict
End Get
Set(value As String)
m_SchoolDistrict = value
End Set
End Property
Public Property UseCode1 As String
Get
Return m_UseCode1
End Get
Set(value As String)
m_UseCode1 = value
End Set
End Property
End Class How do I set up the constructor for SearchParameters to get the proper values from the JSON in the p_QueryObject string assigned to their corresponding counterparts in SearchParameters? Thank you. William
... View more
02-21-2017
12:16 PM
|
0
|
3
|
584
|
POST
|
Hi Robert, So to pass a JSON as a single parameter, would the following work? _onSearch: function(){
...
var queryJson = this._buildQueryJSON();
var requestHandle = esriRequest({
url: "rest service URL",
content: {
ppin: "p_QueryObject",
queryJson: queryJson
},
handleAs: "json",
timeout: 10000
},{useProxy: true, usePost: false, disableIdentityLookup: true});
requestHandle.then(lang.hitch(this, this._requestSucceeded), lang.hitch(this, this._requestFailed));
...
},
_buildQueryJSON: function(){
var queryJson = {
neighborhood: this.m_Neighborhood,
schoolDistrict: this.m_SchoolDistrict,
useCodeOne: this.m_UseCodeOne
}
return queryJson;
}, William
... View more
02-21-2017
10:41 AM
|
0
|
3
|
584
|
POST
|
Hi Robert, If the main function of my rest service has the following format (in VB.NET): Function RatioQuery(ByVal p_QueryObject As String) Implements IRatioQueryService.RatioQuery
End Function Does the following format for the EsriRequest look okay, with ppin set to "p_QueryObject"? var requestHandle = esriRequest({
url: "rest service URL",
content: {
ppin: "p_QueryObject",
neighborhood: this.m_Neighborhood,
schoolDistrict: this.m_SchoolDistrict,
useCodeOne: this.m_UseCodeOne
},
handleAs: "json",
timeout: 10000
},{useProxy: true, usePost: false, disableIdentityLookup: true});
requestHandle.then(lang.hitch(this, this._requestSucceeded), lang.hitch(this, this._requestFailed)); Do I need to have f: 'json' in the content object? Thank you. William
... View more
02-21-2017
10:04 AM
|
0
|
5
|
601
|
POST
|
Hi Drew, So you think JSON.NET would be better than .NET JavaScriptSerializer? William
... View more
02-17-2017
01:33 PM
|
0
|
5
|
584
|
POST
|
Hi Robert, I have a JSON that I want to send to my restful web service. I created it using WCF. I have a class in my service with the same structure as the JSON. How do I have the class constructor read the JSON to create the object so I can use the data? William
... View more
02-17-2017
12:36 PM
|
0
|
15
|
601
|
POST
|
Hi Robert, I shouldn't have had this.list.add = ({...}); I changed it to this.list.add({...}); and it works. How do I get the vertical scroll bar? The content goes off the page and there is no way to view it. William
... View more
02-15-2017
08:47 AM
|
0
|
2
|
1122
|
POST
|
Hi Robert, There are no errors, but the div where the content is supposed to go just has another empty div inside, as shown below. <div data-dojo-type="widgets/RatioQuery/List" data-dojo-attach-point="list" style="width: 100%; clear: both;" id="uniqName_0_0" class="widgets-ratio-query-results" widgetid="uniqName_0_0">
<div></div>
</div> William
... View more
02-15-2017
07:40 AM
|
0
|
4
|
1122
|
Title | Kudos | Posted |
---|---|---|
1 | 11-08-2016 10:16 AM | |
1 | 12-08-2016 08:44 AM | |
1 | 12-28-2016 08:09 AM | |
1 | 12-29-2016 12:38 PM | |
1 | 11-28-2016 08:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|