- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using Intel XDK 3357 version. on Ubuntu 14.04.
My project consumes custom made rest web service. Since last update I'm unable to find my custom made service in Explore Service. Therefore I'm unable to add new binding from application designer.
Custom web services disappeared on all projects
Can someone explain step by step how to integrate custom made service into the service explorer ?
Also, is there any other way to create service method binding, other that using Explorer Service ?
BR
Nikos
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally it worked !
With a little try and fail approach, the correct structure seems to be:
apiconfig.json
{ "XoxPop": { "name": "XoxPop", "description": "XoxPop* API", "dashboardUrl": "http://" }, "compatibleProjectTypes": [ "com.intel.xdk.projecttype.jsapp", "com.intel.xdk.projecttype.webapp" ] }
Now the service and it's methods are visible in the Explore Service
Thank you very much
BR
Nikos
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you should have json files like apiconfig.json and couple others in your project if you had created a custom webservices, look for those.
Here is documentation for creating your own service for data-binding:
https://software.intel.com/en-us/xdk/docs/using-web-services#service_createown
https://software.intel.com/en-us/xdk/docs/using-web-services
Another easy way to create data-binding for a single URL REST API is to use the "API Explorer Sandbox", found under "Explore Services", you can add the web service API URL for GET method and create data-bindings and use in App.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Krishnappa,
Thank you for your answer. It is correct that under normal circumstances this is true. ...But my custom service worked before update.
For example one of my apiconfig.json files has very simple structure:
{
"XoxPop": {
"name": "XoxPop",
"description": "XoxPop* API",
"dashboardUrl": "http://"
}
}
As well as my XoxPop.json & XoxPop.js files.
But service remains invisible under Explore Service.
I underscore that services were visible before last update and invisible after the update.
Maybe some other idea ?
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was just informed that it is a bug introduced in the latest version, it will be fixed in next version.
There is a workaround, you have add this to apiconfig.json:
"compatibleProjectTypes": [ "com.intel.xdk.projecttype.jsapp", "com.intel.xdk.projecttype.webapp" ]
restart xdk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Krishnappa,
Thank you for your answer.
I tried the workaround you proposed, but with the bellow structure of apiconfig.json file I received the following error: Failed to add apis for exploration from user directory /home/xxxxxxxxxx/xxxxxxxx/xdk/services/iodocs: Could not read file because it is larger than 1GB
apiconfig.json
{
"XoxPop": {
"name": "XoxPop",
"description": "XoxPop* API",
"dashboardUrl": "http://"
}, "compatibleProjectTypes": [
"com.intel.xdk.projecttype.jsapp",
"com.intel.xdk.projecttype.webapp"
]
}
Maybe you could propose the proper way to incorporate the compatibleProjectTypes directive ?
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally it worked !
With a little try and fail approach, the correct structure seems to be:
apiconfig.json
{ "XoxPop": { "name": "XoxPop", "description": "XoxPop* API", "dashboardUrl": "http://" }, "compatibleProjectTypes": [ "com.intel.xdk.projecttype.jsapp", "com.intel.xdk.projecttype.webapp" ] }
Now the service and it's methods are visible in the Explore Service
Thank you very much
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The directive compatibleProjectTypes
did the job. Now custom service and its methods are present under the Explore Services.
But this is not the end of the story. While I'm testing my services using [Try It] the response body returns "TypeError: Undefined is not a function" error. The same problem applies to all my custom services. Like on the screenshot bellow:
While 3rd party services are showing different error, same as screenshot bellow :
Is there any workaround in order to resolve this problem ?
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nikos -- did you get the proper API key from Google before you tried that? It requires an API key to work. To test without an API key, try the "Markit OnDemand" web service, it does not require an API key. Here's an example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Paul,
Thank you very much for your response. It seems that, as you said, the Google API key was not correct or there is some other issue with keys. On the other hand the service "Markit OnDeman" works well as you described.
But, I still have issue with my custom services. The strange thing is that exactly the same services in projects established in previous Intel XDK build version are working well.
Do you have some idea what can be wrong, where to search ?
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems, at least with projects made with previous version of Intel XDK, that IDE is not able to update the service-methods.js file. So despite the fact that NEW method bindings added from IDE are looking ok the same methods do not run in debugger/emulator. After manually adding functions to service-methods.js file everything looks ok.
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I copied and pasted apiconfig.json that you said worked, and then changed the appropriate values, but I'm still getting the 1gb error.
Maybe I'm blind, but I also don't see the difference between the one you said worked and the one you said didn't.
Can you help me spot the difference?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry to hear that.
What is your Intel XDK version ? What OS are you using ?
Can you post your apiconfig.json file here ?
BR
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am exactly in the same situation as Mike B.
This is my apiconfig.json, and getting the 1Gb error.
I am not able to use our custom API, which is key for the progress of our project.
{
"eshelvesAPI": {
"name": "eshelves API",
"description": "A great API",
"dashboardUrl": "",
"requiredLibraries": []
}, "compatibleProjectTypes": [
"com.intel.xdk.projecttype.jsapp",
"com.intel.xdk.projecttype.webapp"
]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am exactly in the same situation.
There are new developments on this issue?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For anyone having the problem with custom web services not showing up in the list, update the apiconfig.json file to have these field within the service description object.
{ "name": "Lower Case API", "description": "A great API", "dashboardUrl": "http://developer.example.api", "auth": "key", "requiredLibraries": [ "http://example.api/example-api.js" ], "compatibleProjectTypes": [ "com.intel.xdk.projecttype.jsapp", "com.intel.xdk.projecttype.webapp", "com.intel.xdk.projecttype.iotapp" ], "signature": "apiSecret" }
The codes posted before my post have the field 'compatibleProjectTypes' at the wrong level in the json. Please compare it with what I have posted here. This will be fixed in the next XDK update.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page