Hi,
I created a simple soap service for converting the Runtime argument (String) in to Capital letters. The program is working nicely. Suppose if I change the coding of Soap Service, it is not reflecting the new changes made in the Soap Service program. My objective is to bring the output of updated Soap Service with out restarting the Tomcat. Along with this mail I have attached a Sample.zip file which contains all the files which are necessary for running this Soap Service. Along with this mail I attached a Sample.zip which contains all the necessary files for running the Soap Service.
The following details are for your reference:
1. classpath in my system (present in the same order):
C:\Software\jar_file\xerces.jar;C:\Software\jar_file\xercesImpl.jar;C:\Software\jar_file\soap.jar;C:\Software\jar_file\activation.jar;C:\Software\jar_file\mail.jar;C:\Software\J2sdk1.4.0_01\lib\tools.jar;C:\Software\j2sdk1.4.0_01\jre\lib\rt.jar;
2.CATALINA_HOME ---> C:\Software\Tomcat 4.1
3.JAVA_HOME ---> C:\Software\j2sdk1.4.0_01
4. I have included the following contents in the server.xml
<Context path="/soap" docBase="soap" debug="1"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_soap_log." suffix=".txt"
timestamp="true"/>
</Context>
5. Tomcat version: Tomcat 4.1.27 exe
6. JDK version: j2sdk1.4.0_01
7. Soap Service : Sample.java
Soap Client : TestSampleService.java
Deployment Descriptor : DDSample
Batch file for deploying the Soap Service : deploy
Batch file for listing out the deployed Soap Service : list
I have done the following steps:
1. I run the program very first time as usually and got the result successfully.
I commented the first statement
System.out.println("usr_firstMethod ");
and removed the comment in the second statement of Soap Service(Sample.java)
System.out.println("first Change made in usr_firstMethod );
2. Then I compiled the program and I copied the .class file in to the C:\Software\Tomcat 4.1\webapps\soap\WEB-INF\classes directory.
After a few seconds I received the following printed message in the Tomcat Server :
WebappClassLoader: Resource '/WEB-INF/classes/Sample.class' was modified; Date
is now: Wed Jan 28 16:29:12 IST 2004 Was: Wed Jan 28 16:27:33 IST 2004
3. After receiving this message I listed out the deployed services available in the tomcat server. It is listing the "urn:Sample". Then, I executed the Soap Client Program. I am getting the following Error :
Generated Fault :
Fault Code : SOAP-ENV:Server.BadTargetObjectURI
Fault String : Unable to resolve target object: Sample
4. For getting details about this error simply I included the following statement in the Soap Client program
System.out.println("Response : \n"+response+"\n");
5. Without restarting the Tomcat Server I compiled the Soap Client program and I got the following error:
D:\Dev\Java\SOAPSample>java TestSampleService sivababa
Vector Contains :
[[name=value] [type=class java.lang.String] [value=sivababa] [encodingStyleURI=n
ull]]
Response :
[Header=null] [methodName=null] [targetObjectURI=null] [encodingStyleURI=null] [
SOAPContext=[Parts={[cid:null type: text/xml; charset=utf-8 enc: null]}]] [fault
=[Attributes={}] [faultCode=SOAP-ENV:Server.BadTargetObjectURI] [faultString=Una
ble to resolve target object: Sample] [faultActorURI=/soap/servlet/rpcrouter] [D
etailEntries=
[(0)=<stackTrace>java.lang.ClassNotFoundException: Sample
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1444)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1289)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
at org.apache.soap.rpc.SOAPContext.loadClass(SOAPContext.java:564)
at org.apache.soap.server.http.ServerHTTPUtils.getTargetObject(ServerHTT
PUtils.java:275)
at org.apache.soap.providers.RPCJavaProvider.locate(RPCJavaProvider.java
:117)
at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.
java:352)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)
</stackTrace>]
] [FaultEntries=]] [Params={}]
Generated Fault :
Fault Code : SOAP-ENV:Server.BadTargetObjectURI
Fault String : Unable to resolve target object: Sample
For the past 10 days I am facing the above error. Please give me a solution.
- Ramkumar
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.