where to place clientaccesspolicy.xml file into the apache tomcat server deployed in eclipse IDE - web-services

I have a silverlight application and i want to call a apache cxf web service written in java in my eclipse and published on apache tomcat 7.0 through eclipse.
so now when i call this web service from my silverlight application from visual studio 2010 i get follwing error:
An error occurred while trying to make a request to URI 'http://localhost:8080/complesxtypeWebService/services/CompanyServicePort'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services
when i search for this on web i found that i need to place clientaccesspolicy.xml file in the root directory of domain service.
so my problem is where to place this xml file . can it be placed somewhere in eclipse project folder or somewhere in apache tomcat folder. please let me know where to actually place this file.
my all development are done locally and everything is being tested locally.
thanks
vicky

I placed the clientaccesspolicy.xml file in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT and it works for me.
Please note that this is Windows 7 PC and if I remove the file, I get the dreaded cross domain error.

Related

Unable to run deployed application on glassfish server

I have successfully installed Glassfish on a Ubuntu 16.04 instance.
The deployment of my webservice is also succesfull, When I launch the application, I get a page that says
Web Application Links
If the server or listener is not running, the link may not work. In this event, check the status of the server instance. After launching the web application, use the browser's back button to return to this screen.
When I click on a link (both HTTP and HTTPS), I get a 404 error.
I presume that there must be something wrong with my server, but all tutorials about setting up a glassfish server seem to go straight out-of-the-box, so I don't get a clue why it isn't working in my case.
I also can't find where to check the listeners or server instance, and what they should be configured like.
Last thing to mention: I have never used glassfish before, I only need to test if a webservice is working like expected before sending it to a customer who will deploy it himself.
What directory structure do you use in your *.war file? By default static files (like index.html) should be placed in the root folder - not in the WEB-INF. So a typical directory structure would look like this:
myWebApp/
WEB-INF/
web.xml
lib/
MyLib.jar
classes/
mypackage/
MyServlet.class
index.html
index.jsp
I deploy a Web Service using REST and I have the same problem.
My structure is :
MyProject
.idea
lib
out
src
MyApp
Helloworld
web
web.xml
WEB-INF
index.jsp
MyProject.iml
External Librairies
I followed a tuto (https://www.jetbrains.com/help/idea/2017.1/creating-and-running-your-first-restful-web-service-on-glassfish-application-server.html#d76541e113) and I should have a web page on http://localhost:port/appArtefact/helloworld

Railo web.cfm showing IIS 404

I recently did a full 64 bit install of Railo on my Windows 8.1 machine hooking it up to IIS. The code for the site is in a location outside the c:\railo directory and when I boot it up it did put the WEB-INF folder in the application root like it was supposed to. When I start the Railo server from the command prompt I am seeing the correct path to the WEB-INF\railo folder for that web context in the start up. So the code runs and all is good except that I can't get into the admins with IIS throwing a 404. Anybody have any ideas?
Thanks!
Bypass IIS and hit tomcat directly. IE, from the local machine:
http://127.0.0.1:8888/index.cfm
or
http://127.0.0.1:8888/railo-context/admin/server.cfm

ClassNotFoundError even though class is included in lib/ext folder in Jetty 9.2.2

Just want to ask about my problem. I am trying to setup a jetty server and included my own webapp. I put the web application in the webapp folder of jetty server. I also included the necessary libraries needed by the web application in lib/ext folder of jetty, it is not included in the war file. when i run the jetty server and access the webapp, i get the 'NoClassDefFoundError'.
I run the jetty server using the 'java -jar start.jar'. I am also sure that the jar file which contains the class that causes the error is in the classpath.
Did i miss something?
Thank you.

How to deploy the Web service in to tomcat 7 from out side of eclipse juno?

i am very new to web services and i have one problem please suggest me .. i.e i have a WSDL(SOAP) file and with that i created the Web Service-server and web service-Client using Top-Down approach with JAX-WS in eclipse Juno Java EE. i integrated the Tomcat 7 with that Eclipse and from eclipse its working fine.
But my problem is i need to run the Tomcat from out side of the eclipse and i need to deploy the web service in to the tomcat. i don't want to run the Tomcat using eclipse? i just need to run the client from eclipse but i dont want to run the tomcat from eclipse. Please Help me.
File -> Export -> Web -> War (configure where to create it)
Deploying a tomcat application consist of building a war file then deploying it. We call this servlet.
Building the WAR
As you already have your server code, you should now complet the WEB-INF/web.xml file. This file describe the path of your servlet(your server code), on the tomcat server. Depending of your framework you can have some configuration to add in your META-INF/context.xml file.
In an eclipse project, thoses file are generaly under a directory name 'webapp' in your project. (src/main/webapp for a maven project).
First you must use the javaee & javaweb tools of eclipse to build a war file that contains all yours libs, files, class and web.xml
Alternativly you can use a maven build process to get a war, if you use maven.
Deploying the war
After installing tomcat, the deployement is as simple as drop the .war file is deploy directory of the home-directory of tomcat. Then your application is usable on default port 8080.
If you have install also the manager webapp of tomcat, you can see all yours currently deployed application in the manager http://myurl:8080/manager/html.
When you install tomcat, let be sure that your eclipse pseudo server is shutdown, or your tomcat server will have problem to get it's port and startup.

Deploy application on IIS windows server 2008

I have created a webservice and I want to deploy it on my local machine. I am using Windows Server 2008 R2 Enterprise edition. Till now I have done following things:
Copied compiled file to the folder in WWWROOT folder [MyApp]
Shared the folder to all available role in the computer
I have checked in the IIS and I can see the folder here
But when I tried to browse it from IIS I am getting this error:
Please help me.
If you look in your error screen you will see it say to enable directory browsing in your IIS :)
I think this should do the trick.
http://technet.microsoft.com/en-us/library/cc731109%28WS.10%29.aspx
Simple, you forgot to write Service asmx :)
http://localhost/MyApp/Service1.asmx
this should work