Can't find '/cloudfoundryapplication' directory - cloud-foundry

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/vcap/app/dist/cloudfoundryapplication'
Environment: node12
I could not figure out what is the use for '/cloudfoundryapplication' path.
Is that healthcheck for couldfoundry Apps?
Thanks!

These requests are generated by Pivotal/VMware's Apps Manager. When a user navigates to an application in Apps Manager, Apps Manager will probe to see if the application supports this particular endpoint. If it does, then it will expose some additional information in it's UI.
In theory, anyone could implement this interface, but I have only heard about this API being implemented in Spring Boot applications with Actuator support enabled. For non-Java & Spring Boot applications you can simply return a 404, which is usually the default behavior.
See this knowledge base article for reference.

Related

Having RESTful service in RCP application

We have an existing eclipse RCP application that works as a standalone product. At a high level, this product is used to configure a image specification using its UI and we can export a sample Image based on these configuration.
Now we are developing another web application that has several modules and one module of it is to develop something that our eclipse RCP application does.
Just to provide a QUICK integration of the RCP application for demo purpose, I plan to run the RCP application separately in the server machine and expose its static functionality as a RESTful webservice. So the module shall make a RESTful call to the RCP application.
Now just to begin with I tried to embed a jetty server for hosting the REST service during the start of RCP application like below
But the thing is after the Jetty server is started I am not able to access the TestWebService using the path i configured. So I am confused if this is the right approach to have a RESTful service inside a RCP application. Please note that iam able to hit the server with http://localhost:1002, but not the service.
Following is the console log when i hit on http://localhost:1002/hello/test:
It's a really weird architecture you're experimenting with.
I mean to write an RCP-application which listens on a port and offers REST services on it; this could lead to further obstacles.
Instead I would seperate it into two software artifacts: an RCP-app and a web-application (.war).
You could extract a business-logic jar (It can be an OSGi plug-in if necessary) contaning your image manipulation logic.
Then include this plug-in/.jar as a dependency in the webapp and offer out it's functionalities thru a Web-container (Tomcat, GlassFish, etc.)
So your other (third) application will connect to the Web-services offered by this .war file.
opt.1) If you need a single running instance (because of database or other shared resource) then your RCP-app will have to use this REST service too.
opt.2) If not then simple compile the .jar/plug-in containing the business-logic into your RCP-app.

Rest Web Service,

i am approaching the development of Restful web services for the first time. I tried to follow this guide for Netbeans . I am stuck at the testing of the web service.
When i open the
http://localhost:8080/WebServicesTest/test-resbeans.html
page, none of the root resources appears in the left menu. (there should be entities.customer and entities.discountcode)
I really can't find a solution.
Thanks in advance to anyone who likes to give me a hint.
--------------- Edit
If i click on CustomerDB --> Deploy i get an error
In-place deployment at C:\Users\utente\Documents\NetBeansProjects\CustomerDB\build\web
GlassFish Server 4, deploy, null, false
C:\Users\utente\Documents\NetBeansProjects\CustomerDB\nbproject\build-impl.xml:1071:
The module has not been deployed.
See the server log for details.
The line 1071 of build-impl.xml is
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
I checked out the referenced tutorial.
Which exact path did you follow? Did you change anything?
Most likely your CustomerDB application is not deployed correctly (see GlassFish Server output in NetBeans) and thus is not able to expose the web service and thus is not displayed in the test page (nothing visible in the side bar).
I tried the tutorial myself and had that phenomenon when using another database ("test" instead of the sample db, which was not connectable in my installed environment), resulting in a message that "test__pm" resource was not found. I then created a conection pool and a jdbc reosurce for test and then it worked.

Can I generate a wsdl file without binding and service information?

I came across an issue where a customer is able to open a SAP wsdl using net-beans as well as in .Net but not in soap UI.
When i checked the wsdl i found that service as well as binding tags are not defined or no such tags included. wsdl ends with port-type information.
In soap UI i got an error like no content in the file and when i try to open it in eclipse i am able to open it using web explorer window, but service as well binding information fields are empty. I could see ws-policy elements in customers wsdl.
How he might have produced a wsdl without binding and service information ?
What would be the reason he is telling it is working in .Net?
I am not sure about .Net tools.
Is there any web service client tool which can open the operations without endpoint /service information and send request/response ?..
please help
thank you for your time.
I only know a bit about the first question, can't help you with the other ones...
You can request two "flavors" of WSDL from a NW/ABAP system. This is related to the fact that the implementation (programming) of the service is usually performed on a different system and by different people than the configuration of the service.
After the service (or rather a service definition) has been implemented, you can get what's called a "design-time WSDL document". This document does not include the endpoint information - it cannot, because that would require technical information about the target system landscape and its configuration that is simply not available yet.
From the service definition, an administrator can create a configuration. This includes the binding information as well as stuff like base URL, security settings, transport layer settings and so on. With this configuration, you can generate a second WSDL document that contains the actual endpoint configuration.

Is there a way to not expose the content of my play! app routes file

I have a play! app providing web service (set of APIs) to my app running on iPhone. If I access the web service from inside browser by intentionally provide a wrong query, the whole content of the play! app's routes file will be exposed on browser. Is there a way to avoid that?
That only happens when your application is running in Dev mode. When you switch to Prod mode, routes will no longer be exposed like that.
Useful links:
http://www.playframework.org/documentation/1.2.3/guide11#aSettingtheapplicationinPRODmodea
http://www.playframework.org/documentation/1.2.3/main#lifecycle
http://playframework.wordpress.com/2011/03/05/playframework-dev-mode-never-use-in-production/

Is there a way to bind my flex builder to my django application

I am trying to create simple flex application, which uses django as a back-end part. Have a question:
Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="http://127.0.0.1:8000"/>
<allow-access-from domain="127.0.0.1"/>
</cross-domain-policy>
Then tried the application again, I got error in console of my FB Error: Request for resource at http://127.0.0.1:8000/go/active/ by requestor from file:///Users/oleg/Documents/FB3/usersList/bin-debug/usersList.swf is denied due to lack of policy file permissions.
I don't know how to fix the error. But also the question is there a way to configure FB3 to put my swf files to the server directly, so I will not need any crossdomain?
Thanks
Oleg
We struggled with this a lot. The Flex security stuff didn't strike me as well built, but perhaps we just had different approaches in mind than Adobe's developers. The solution that worked for us was to serve both the SWF and the dynamic data from the same host and port.
On our development boxes, we tell Apache to serve the SWF from a directory in the workspace, and the dynamic data from a local copy of the app. When we push to production, SWF and app get pushed simultaneously to the same virtual host.
If that's inconvenient for you, the Apache ProxyPass directive can be used to make Apache front for other servers. I've not used that in production, but it's been very handy for developer setups.
I don't know a way to get FlexBuilder to automatically deploy your changed SWF; you could certainly look into an automation approach (like Maven and Flex-Mojos) to make that happen.
That said, getting rid of that error is usually just a matter of adding a policy file to the server.
The second error is caused because you're trying to fetch http resources from a "file" location. My recommendation is that you change your Flex Builder project so it outputs to a location within the Django web site, rather than to the flex-bin directory. This setting can be changed in the properties dialog of the project. Then, you should be able to have your front-end and back-end share the same protocol and domain.