Hi,
Your post helped me - but in unexpected ways. :D
I just added this line:
private static final String PATH = "c:/primes.txt";
and used PATH instead getResourceAsStream() to my existing code and it worked. I guess it was a Java PATH issue. Thanks!On 7/12/06, Rodrigo Ruiz <
[EMAIL PROTECTED]>
Ok, I see some mistakes in the code. My comments inline...
M S wrote:
> Hi,
>
> Well this is my Web Service file:
>
>
> import java.io.*;
>
> public class MyService2 {
>
> public String echo(String password) {
I guess you will fix this signature later ;-D
>
> int ctr = 1;
I've got a few ideas:
1) There is no rule that says your service class must be in an aar. In
can be in another jar or in WEB-INF/classes , for example. The
services.xml defines the ServiceClass, but that class can be anywhere
in a higher classloader. This means all your WAR options, such as
explo
Hi,
Well this is my Web Service file:
import java.io.*;
public class MyService2 {
public String echo(String password) {
int ctr = 1;
FileInputStream fin;
try {
fin =
(FileInputStream)
getClass().getClassLoader().getResourceAs
Hi again, :-)
Mmmmh, I haven't heard anything about this kind of problems with .aar
files. I am afraid I don't use Axis2 myself, so my knowledge is limited :-P
Where are you trying to write the file, and how do you get the path?
Have you tried to write in a fixed absolute path? If you can't creat
Can you provide a pointer for more information related to distributed
cache implementation?
Thanks,
Mike
Rodrigo Ruiz <[EMAIL PROTECTED]> wrote on 07/10/2006 11:22:01 AM:
> Depending on the servlet container you are using, war archives may be
> considered read-only. In this case you will not be
Hi,Thank you for the exhaustive list of alternatives. I just have one small problem: I meant an .aar archive that is used for Axis2 web service deployments in the services directory (I incorrectly wrote .war in the subject of the original email). Do the same concepts apply (some of them, such as DB
Depending on the servlet container you are using, war archives may be
considered read-only. In this case you will not be able to write a file
within the application context.
Some alternatives you have are:
- Deploy your application as an "exploded war" (the exact name will vary
from container to
Your problem seems very similar to mine - It would be great if someone
would point us to the documentation for the rules related to file access
(read/write, path, etc.)
Thanks,
Mike
"M S" <[EMAIL PROTECTED]> wrote on 07/10/2006 10:40:47 AM:
> Hi,
>
> I have a web service that is supposed to g
Hi,I have a web service that is supposed to generate prime numbers. I store the latest generated prime number in a file called prime.txt. So for example, if the program is run and generated 3, 3 will be stored in prime.txt
and next time it will generate 5. If there is no prime.txt, the program wil
10 matches
Mail list logo