Java - localhost root folder?
after lots of investigations for calling a web service from silverlight: Calling a Java Web service from silverlight throws an exception
I found out that I should I have to create a clientaccesspolicy.xml file and put it in the root 开发者_JAVA技巧folder of the application. I copied it in the root folder of my ASPX (web page) but it didn't help. I'm guessing the root folder should be the root folder of the server for my Java service. I have apache server on my Win7 x64 system but after stopping it the Java still worked so I'm guessing that the server for Eclipse IDE is different from Apache.
So the main question here is: Where is the root folder of Java Eclipse server? Where should I put that xml file?
Thanks.
If you are using a self-hosted Java webservice with Endpoint.publish(String) then I think it is not possible to add further files for delivery, e.g. a crossdomain.xml
Instead you need to switch from a self-hosted webservice to a server-hosted webservice as described here (the tutorial is using Netbeans, but a similar approach should be possible with Eclipse, too, even if it might be slightly easier to use Netbeans for this example). As Tomcat is used as a server, it is also possible to deliver the corresponding Silverlight project files as well, in which case you do not need a crossdomain.xml
精彩评论