API KIT Console in Mule not showing any Output - raml

I tried to look through all the tutorials for RAML and I was pretty excited.
I found most of the online resources available but I could not understand why, when i set up everything and the flows are generated, then i run it locally as a mule application, when i point to localhost:8081/api/console/ i get a huuuuuuuge json response, but not the UI described for example here.

Yes i also faced the same issue with Any Point Studio. It is not at all displaying in the API KIT Console present in Any Point Studio. But to feel good and to see the output i have just tried it with Google Chrome Browser and i got the expected User Interface as i was expecting from API KIT Console. Hope this issue will be fixed from next release onwards.
Here is the URL i used to see it on Browser : http://localhost:8081/remote-vending/api/console/
Here is my output from Google Chrome browser for the API KIT Tutorial

My GUI didn't show in the Anytime studio tab: APIkit Consoles, one way to fix this:
make sure you have started your application
right click for the context menu
select encoding
click auto-select

I have had the same problem and resolved it by removing invalid whitespace. One of the example files I was including had an invalid trailing space.
The way I found out;
Open the Network panel in the Developer Toolbar in your browser
Go to http://localhost:8081/api/console/
Find the response for a request to '/api' with the request header 'Accept:application/raml+yaml'.
This response should contain the fully compiled RAML, where all include files have been included.
Copy this entire content into a new RAML-file in Anypoint Platform API Designer or some other YAML editor with error reporting.
It highlighted the invalid whitespace immediately for me.

It should work Out of the box.
It could be a bug of an earlier version.
Could you check the behaviour in more recent releases?

Changing my default browser from Firefox to Chrome resolved the issue for me.

Related

Many bugs and errors in 2SXC installation

Many bugs and errors in 2SXC installation
Can someone please give me some help?
This is supposed to be trivially easy.
I have spent 7 hours on this and got nowhere.
In deploying the module on new DNN install :
DNN PLATFORM
v. 09.02.01 (533)
Install 2SXC into the DNN - Successful
Deploy Content Module on to empty page: Successful
Click circular icon. Popup appears requiring Auto Configure button to be clicked.
Auto-Configure Content for 2sxc 11
Dialog Text:-
Auto-Configure Content for 2sxc 11? (Yes, I do)
install recommended content package? (Yes, I do)
Popup: Do you want to install these packages? (Yes, I do)
- Default content for 2SXC11
It takes about 10 seconds per package. Don't re-load the page while it is installing.
I click OK
1 second later
Popup: An Error occurred.
An Error Occurred
Spinner rotates ad infinitum
Try the help page: It says:-
"Run Auto-Configure and confirm the "are you sure" question, then wait a few seconds. Once you see the confirmation, everything worked". (Oh, No. It certainly did not!)
Installing default content templates
An error occurred.
Looked up the Wiki
Tried to upload the Content Templates .zip file into a Content Module Admin/App. An Error Occurred on the upload. Instruction says: See below for error. (There was nothing below).
Any advice welcome!
What you describe should be really easy - I agree.
My guess is that something has gone wrong in a way that's hard to spot. Maybe an installation once got interrupted or something like that. It should be easy, so I really suggest one of the following options:
Quickly replay the same scenario with a blank DNN to experience how it should work, and to ensure that your PC isn't doing something funny (for example, the file is downloaded by the DNN server, and if your PCs firewall would prevent the IIS from getting files, this would fail).
If that worked, probably just uninstall 2sxc completely and also uninstall the DB (that doesn't happen automatically, because you may just uninstall and want to keep the data) - use https://azing.org/2sxc/l/Kf5yDYQq/uninstall-2sxc - then try again
Ask a friend to play this through once with you
We just installed 2sxc on our development site, I’m super hopeful about it working - especially its ability to generate a json / json api. But! Today I used the Evoq page settings to delete “Content” instances on a test page - after that the “Add Module” to add a new “Content” instance fails - 2sxc’s javascript fails. Mysterious why just removing then trying to add “Content” instances would break 2sxc.

FireFox Add-on document.querySelectorAll(); not defined

I am working on a add-on project for FireFox using SDK (JPM) and when I run the code in JPM I get "document is not defined"
My index.js file has the following which this error refers to:
var insecure = document.querySelectorAll('[src^="http://"],[href^="http: //"],[img^="http://"]');
Any help would be great as I have tried so many things
Thanks
Add-on SDK uses a CommonJS module system, it means that the index.js is a sandboxed module, and therefore there is no specific document or DOM associated with it.
If you want access to a content document, you probably want to use content scripts. Take a look here: https://developer.mozilla.org/en/Add-ons/SDK/Guides/Two_Types_of_Scripts and here: https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts
Hope it helps.
This issue has now been resolved. I have used content scripts and the "port.emit" port.on" options. Sorry I was late responding.

Xcode 5 Link Document Type

Am following tutorial at
http://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app
To link a document type to my application so that my application is responsible for opening up of that document.
XCode 5 works very different... Under your Target, Info tab is a "Document Types" line... am not sure how to use this, is there a sample for me?
Thanks
I'm sure you've either figured this out or moved on, but a little tip for most of these tutorials: you can often download the completed code from the website. I did so, and loaded it up in Xcode 5.0, and it works fine. Here's a screenshot of the plist entries (that's under Resources/ScaryBugs-Info.plist) for Document and Export:
Another way to change the Document types in Xcode is via the Project Info (select the project in the Navigator, then the target in the projects and targets list, then the info tab). Here's a screenshot of what that stuff looked like for me:
Here's another very helpful link straight from apple support. Watch the screenshot they have under Example and literally replicate everything from this screenshot and just change their custom extension from catinfo to pdf, ttf, xml or whatever you like
NOTE: Make sure you test this on actual iphone / ipad and not on simulator.
https://developer.apple.com/library/ios/qa/qa1587/_index.html

WkHtmlToXSharp not rendering HTML elements as soon as I change the source HTML

I have downloaded WkHtmlToXSharp (which uses WkHtmlToPdf under the hood) and opened the solution.
When I run the test given with the project - CanConvertFromFile, it gives me a nicely formatted PDF output.
But as soon as I delete even a blank space from the source HTML file ( WkHtmlToXSharp.Tests\Resources\page.xhtml) it renders only text with no HTML structure in place i.e. all text on the page is rendered as a single line.
I am finding the same problem with my dev project using WkHtmlToXSharp.
I suspect this is due to change of character encoding of the source file. Do you know what the character encoding should be? Is this an issue with WkHtmlToPdf as well?
Note: Sorry for the slightly misleading tag (WkHtmlToPdf), the site did not allow me to create tag WkHtmlToXSharp.
Many Thanks!
wkhtmltopdf assumes UTF8 as default, but there's a property (WebSettings.DefaultEncoding) which can be used to override the encoding expected.
However, your problem looks more like you are re-using a disposed instance or something similar. May you describe a bit deeper your use case.. is it an ASP.NET application? a console project? are you running under visual studio's dev web server?
I believe the cause of this is in the issue tracker on Pablo's repo. Issue #7: Only works first time
datimson commented 25 days ago
Also, for the sake of helping anyone else who might have this problem, when debugging with WkHtmlToXSharp in ASP.NET you need to stop the ASP Development server before restarting or rebuilding the application - this is what was causing my text only PDF outputs.

CSS reload on IE7

It looks like IE7 doesn't reload the latest version of my stylesheet each time I upload a new version on the server.
This is annoying as I am debugging my .css file to make it work on IE...
Tried to empty the browser cache but still not working.
Thanks for your help.
Ctrl-F5 - forcible way to reload in IE
Include your version number in the file name. myfile_v1234.css
When testing, every time you do an update you can just wite "stylesheet.css?r=98123"
As long as the query string is different, it'll be downloaded again.
If you need, you can use javascript to append Math.random(), to get the random number. Not required on production though, when updates would be stable.
2 Questions:
Does IE eventually load with the newer stylesheet?
How are you saving the changes to the server (SSH, Web Interface, etc.)?
I ask because I ran into an issue with a web-based file management system a while back where one browser would show the CSS just fine, the other wouldn't, and we noticed the issue of which browser played nicely depended on which browser we used to upload the CSS.
The reason turned out to be that IE gave the CSS file a different MIME type than Firefox. If you continue to notice the issue even when you've cleared the cache, check the MIME type of the file using Firefox by going to Tools > Page Info.
Also, if it is simply a caching issue, consider turning caching off in IE. I believe this should be an Advanced Option under Internet Options.
Also, you may want to try creating a special developer environment for IE (if it comes down to it.) Perhaps have another machine with IE7 and no caching and any other features turned off (A kiosk mode, perhaps), and then previewing the page on that machine.
Thanks to you all!
I did manage to solve my problem with the "stupid" Ctrl+F5, and by changing the Internet Parameters of Windows to reload content every new visit.

Resources