B
Baba
Hi everyone.
I have a college project dealing with web services, but I'm quite new at
this so I'm trying to learn it from an O'Reilly book "Java Web Services".
I'm having some difficulties because the book suggests using Tomcat
3.2.n. for some examples and I could only find the 3.3 version which has
some major differencies. I have solved some of them (mostly concerning
classes) but there is one problem I have not been able to solve, so I hope
somebody can help me.
The example deals with sending an xml document to the
http://localhost:8080/soap/servlet/messagerouter. It should forward the
PO.xml file (purchase order) to the appropriate PurchaseOrderAcceptor
class, and I should get the xml response that the PO is accepted. Service is
deployed and everything. However, I get the following printout (lower part
of post).
I see that the problem is (again) in the damned classpaths, but I cannot
understand where. I put the soap.jar everywhere I could imagine, but still I
get the same.
I would appreciate any kind of help. Thanks.
C:\work\examples\ch3>java GenericHTTPSoapClient -url
http://localhost:8080/soap/
servlet/messagerouter
_________________________________________________________
Starting GenericHTTPSoapClient:
host url = http://localhost:8080/soap/servlet/messagerouter
data file = ./PO.xml
___________________________________________________________
Sent SOAP Message with Apache HTTP SOAP Client.
Waiting for response....
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org
/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>org.apache.soap.SOAPException</faultstring>
<faultactor>/soap/servlet/messagerouter</faultactor>
<detail>
<stackTrace>java.lang.NoClassDefFoundError: org.apache.soap.SOAPException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.apache.soap.rpc.SOAPContext.loadClass(SOAPContext.java:557)
at
org.apache.soap.server.http.ServerHTTPUtils.getTargetObject(ServerHTT
PUtils.java:273)
at
org.apache.soap.providers.MsgJavaProvider.locate(MsgJavaProvider.java
:113)
at
org.apache.soap.server.http.MessageRouterServlet.doPost(MessageRouter
Servlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
85)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:917)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833
)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:536)
</stackTrace>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
C:\work\examples\ch3>
I have a college project dealing with web services, but I'm quite new at
this so I'm trying to learn it from an O'Reilly book "Java Web Services".
I'm having some difficulties because the book suggests using Tomcat
3.2.n. for some examples and I could only find the 3.3 version which has
some major differencies. I have solved some of them (mostly concerning
classes) but there is one problem I have not been able to solve, so I hope
somebody can help me.
The example deals with sending an xml document to the
http://localhost:8080/soap/servlet/messagerouter. It should forward the
PO.xml file (purchase order) to the appropriate PurchaseOrderAcceptor
class, and I should get the xml response that the PO is accepted. Service is
deployed and everything. However, I get the following printout (lower part
of post).
I see that the problem is (again) in the damned classpaths, but I cannot
understand where. I put the soap.jar everywhere I could imagine, but still I
get the same.
I would appreciate any kind of help. Thanks.
C:\work\examples\ch3>java GenericHTTPSoapClient -url
http://localhost:8080/soap/
servlet/messagerouter
_________________________________________________________
Starting GenericHTTPSoapClient:
host url = http://localhost:8080/soap/servlet/messagerouter
data file = ./PO.xml
___________________________________________________________
Sent SOAP Message with Apache HTTP SOAP Client.
Waiting for response....
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org
/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>org.apache.soap.SOAPException</faultstring>
<faultactor>/soap/servlet/messagerouter</faultactor>
<detail>
<stackTrace>java.lang.NoClassDefFoundError: org.apache.soap.SOAPException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.apache.soap.rpc.SOAPContext.loadClass(SOAPContext.java:557)
at
org.apache.soap.server.http.ServerHTTPUtils.getTargetObject(ServerHTT
PUtils.java:273)
at
org.apache.soap.providers.MsgJavaProvider.locate(MsgJavaProvider.java
:113)
at
org.apache.soap.server.http.MessageRouterServlet.doPost(MessageRouter
Servlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
85)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:917)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833
)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:516)
at java.lang.Thread.run(Thread.java:536)
</stackTrace>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
C:\work\examples\ch3>