Having trouble with AXIS and Tomcat

2005-10-01 Thread Developer Developer
Hello,

I am new to Web services development. I installed Tomcat, AXIS JAX and all other prereqs, and I think my installations were correct.

I am trying my first web service deployment 
Here is the sample.

I created a file called Calculator.jws in C:\Tomcat 5.5\webapps\axis

public class Calculator { public int add(int i1, int i2) { return i1 + i2;  }
 public int subtract(int i1, int i2) { return i1 - i2; }}
When I try to access it using http://localhost:8080/axis/Calculator.jws?method=add

I get the following error




 ?xml version=1.0 encoding=UTF-8 
? 

-
 soapenv:Envelope xmlns:soapenv
=http://schemas.xmlsoap.org/soap/envelope/
 xmlns:xsd=http://www.w3.org/2001/XMLSchema
 xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance


-
 soapenv:Body


-
 soapenv:Fault


 faultcode
soapenv:Server.userException/
faultcode 

 faultstring
java.io.FileNotFoundException: C:\Tomcat 5.5\webapps\axis\Calculator.jws (Access is denied)
/faultstring 

-
 detail


 ns1:hostname
 xmlns:ns1=http://xml.apache.org/axis/
IBM-900DE7D8334/
ns1:hostname 
 /detail

 /soapenv:Fault

 /soapenv:Body

 /soapenv:Envelope



Re: Having trouble with AXIS and Tomcat

2005-10-01 Thread Soactive Inc
seems like an access privilege issue. Make sure that your .jws file exists and is readable.
On 10/1/05, Developer Developer [EMAIL PROTECTED] wrote:

Hello,

I am new to Web services development. I installed Tomcat, AXIS JAX and all other prereqs, and I think my installations were correct.

I am trying my first web service deployment 
Here is the sample.

I created a file called Calculator.jws in C:\Tomcat 5.5\webapps\axis

public class Calculator { public int add(int i1, int i2) { return i1 + i2;  }
 public int subtract(int i1, int i2) { return i1 - i2; }}
When I try to access it using http://localhost:8080/axis/Calculator.jws?method=add


I get the following error




 ?xml version=1.0 encoding=UTF-8 ? 


- soapenv:Envelope xmlns:soapenv =
http://schemas.xmlsoap.org/soap/envelope/
 xmlns:xsd=
http://www.w3.org/2001/XMLSchema  xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance




- soapenv:Body



- soapenv:Fault


 faultcode 
soapenv:Server.userException/ faultcode
 

 faultstring 
java.io.FileNotFoundException: C:\Tomcat 5.5\webapps\axis\Calculator.jws (Access is denied) /faultstring
 


- detail


 ns1:hostname 
xmlns:ns1=http://xml.apache.org/axis/ 
IBM-900DE7D8334/ ns1:hostname
 
 /detail 

 /soapenv:Fault 

 /soapenv:Body 

 /soapenv:Envelope 



Re: Having trouble with AXIS and Tomcat

2005-10-01 Thread Developer Developer

Hi soactive,

Thank you very much for the reply.


All the files under tomcat are readable, and have full access. The file Calculator.jws does exist

@ C:\Tomcat 5.5\webapps\axis.

I wrote a simple java client and got similar error.




---



- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
Exception in thread main AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode: 
faultString: java.io.FileNotFoundException: C:\Tomcat 5.5\webapps\axis\Calculator.jws (Access is denied)
faultActor: 
faultNode: 
faultDetail: 
{http://xml.apache.org/axis/}hostname:IBM-900DE7D8334
java.io.FileNotFoundException: C:\Tomcat 5.5\webapps\axis\Calculator.jws (Access is denied)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at CalcClient.main(CalcClient.java:50)

--



On 10/1/05, Soactive Inc [EMAIL PROTECTED] wrote:
seems like an access privilege issue. Make sure that your .jws file exists and is readable. 

On 10/1/05, Developer Developer [EMAIL PROTECTED]
 wrote: 

Hello,

I am new to Web services development. I installed Tomcat, AXIS JAX and all other prereqs, and I think my installations were correct.

I am trying my first web service deployment 
Here is the sample.

I created a file called Calculator.jws in C:\Tomcat 5.5\webapps\axis

public class Calculator { public int add(int i1, int i2) { return i1 + i2;  }
 public int subtract(int i1, int i2) { return i1 - i2; }}
When I try to access it using http://localhost:8080/axis/Calculator.jws?method=add 


I get the following error




 ?xml version=1.0 encoding=UTF-8 ? 


- soapenv:Envelope xmlns:soapenv =
 http://schemas.xmlsoap.org/soap/envelope/
  xmlns:xsd=
 http://www.w3.org/2001/XMLSchema  xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance
 



- soapenv:Body



- soapenv:Fault


 faultcode 
soapenv:Server.userException/ faultcode
 

 faultstring 
java.io.FileNotFoundException: C:\Tomcat 5.5\webapps\axis\Calculator.jws (Access is denied) /faultstring 
 


- detail


 ns1:hostname 
xmlns:ns1=http://xml.apache.org/axis/ 
IBM-900DE7D8334/ ns1:hostname
  
 /detail 

 /soapenv:Fault 

 /soapenv:Body 

 /soapenv:Envelope