Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74620 invoked from network); 14 Aug 2007 18:09:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Aug 2007 18:09:36 -0000 Received: (qmail 49667 invoked by uid 500); 14 Aug 2007 18:09:25 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 49653 invoked by uid 500); 14 Aug 2007 18:09:25 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 49642 invoked by uid 99); 14 Aug 2007 18:09:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 11:09:25 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.252.110.185] (HELO web56006.mail.re3.yahoo.com) (216.252.110.185) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 14 Aug 2007 18:09:20 +0000 Received: (qmail 28434 invoked by uid 60001); 14 Aug 2007 18:08:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=5H/K0Y5rvPzvfbmGgOY19sXewJ56Qs8roKbUn+WIay+ECS9RHtYrTRFB9/Lgk6SPU3dMHfH5qd8E1WDeMMp0CDBJ4jD3AHW20HdiP5v3AFBUIktZxVgqQZHQXXeICwINAWp5pstkIHyBOKGV4Yx5Fc8LFRBeq2KWPq1tqHCLFhI=; X-YMail-OSG: yDCbBtcVM1lnpmrAps6d3AqyYX8VmDr4Mt31UNaj8AP7s1B8HbOrjJCFNM9OkTHg7CO6KCxIswno5.LVRSs99FEW0UfVN.fFIsmDoUjWdUFyFtMc.TUycmfUIrPAPZrv Received: from [198.139.150.3] by web56006.mail.re3.yahoo.com via HTTP; Tue, 14 Aug 2007 11:08:58 PDT Date: Tue, 14 Aug 2007 11:08:58 -0700 (PDT) From: renjith kalappurackal Subject: " Accessing a file from service Class " To: axis-user@ws.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-588655860-1187114938=:25728" Content-Transfer-Encoding: 8bit Message-ID: <785232.25728.qm@web56006.mail.re3.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-588655860-1187114938=:25728 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi All, I have a problem facing while try to read a file from a web services that is packaged as aar. My application structure is as follows The server I am using is jboss-3.0.8_tomcat-4.1.24. And I wrote code to access file in my local machine as below in lets say Converter.java. MessageContext ctx = MessageContext.getCurrentMessageContext(); AxisService asrv = ctx.getAxisService(); fin = (FileInputStream) asrv.getClassLoader().getResourceAsStream(xml) Where xml being the name of the file lets say (myconfig.xml) And I placed this file in axis2/WEB-INF/classes. And put converter.java in a jar file in C:\jboss-3.0.8_tomcat-4.1.24\tomcat-4.1.x\shared\lib. And I deployed my services in axis2.war and placed axis2.war in C:\jboss-3.0.8_tomcat-4.1.24\server\default\deploy\webapps. This solution worked fine in local environment. But when I moved the solution to Linux server it failed becuase of NullPointerException in AxisService asrv = ctx.getAxisService(); The structure of server is different being Converter.class in shared/lib directory of /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/shared/lib. but axis2 is deployed as exploded form under /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/ and this erro is happening whenI tried to access my config file that is in /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/axis2/WEB-INF/clasess/myconfig.xml from my service class (let say MyService.class) in AAR that /home/wpape/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/commence/erpsync/axis2/WEB-INF/services/myAAR.aar. This error is happening when MyService.classs after accessing Converter.class in shared/lib try to get the messageContext. I think I did somethign terrible wrong here. Could anyone tell me the best way to access this myconfig.xml in /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/axis2/WEB-INF/clasess/ directory from a class that is placed in a jar in shared/lib that is being called by my service class in AAR. Thanks in advance, Renjith --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. --0-588655860-1187114938=:25728 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi All,
 
I have a problem facing while try to read a file from a web services that is packaged as aar.
My application  structure is as follows
 
The server I am using is jboss-3.0.8_tomcat-4.1.24.
And I wrote code to access file in my local machine as below in lets say Converter.java.
 
MessageContext ctx = MessageContext.getCurrentMessageContext();
AxisService asrv = ctx.getAxisService();
fin = (FileInputStream) asrv.getClassLoader().getResourceAsStream(xml)
 
Where xml being the name of the file lets say (myconfig.xml) And I placed this file in axis2/WEB-INF/classes. And put converter.java in a jar file in C:\jboss-3.0.8_tomcat-4.1.24\tomcat-4.1.x\shared\lib.
And I deployed my services in axis2.war and placed axis2.war in C:\jboss-3.0.8_tomcat-4.1.24\server\default\deploy\webapps.
 
This solution worked fine in local environment.
 
But when I moved the solution to Linux server it failed becuase of NullPointerException in
AxisService asrv = ctx.getAxisService();
 
    The structure of server is different being Converter.class in shared/lib directory of /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/shared/lib. but axis2 is deployed as exploded form under /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/ and this erro is happening whenI tried to access my config file that is in /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/axis2/WEB-INF/clasess/myconfig.xml from my service class (let say MyService.class) in AAR that
/home/wpape/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/commence/erpsync/axis2/WEB-INF/services/myAAR.aar.         
         
 This error is happening when MyService.classs after accessing Converter.class in shared/lib try to get the messageContext.
 
 I think I did somethign terrible wrong here. Could anyone tell me the best way to access this myconfig.xml in /home/jboss-3.0.8_tomcat-4.1.24/tomcat-4.1.x/webapps/mydomain/axis2/WEB-INF/clasess/ directory from a class that is placed in a jar in shared/lib that is being called by my service class in AAR.
 
Thanks in advance,
Renjith


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out. --0-588655860-1187114938=:25728--