Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 76288 invoked from network); 14 Nov 2004 21:58:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Nov 2004 21:58:27 -0000 Received: (qmail 96368 invoked by uid 500); 14 Nov 2004 21:57:57 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 95579 invoked by uid 500); 14 Nov 2004 21:57:50 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 95558 invoked by uid 99); 14 Nov 2004 21:57:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [134.96.188.10] (HELO corp-200.dfki.uni-sb.de) (134.96.188.10) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 14 Nov 2004 13:57:47 -0800 Received: from corp-200.dfki.uni-sb.de (IDENT:root@localhost [127.0.0.1]) by corp-200.dfki.uni-sb.de (8.12.10/8.12.9) with ESMTP id iAELveeH003689 for ; Sun, 14 Nov 2004 22:57:41 +0100 (MET) Received: from cleaver (cleaver.dfki.uni-sb.de [134.96.187.77]) by corp-200.dfki.uni-sb.de (8.12.10/8.12.6) with SMTP id iAELveEn003606 for ; Sun, 14 Nov 2004 22:57:40 +0100 (MET) Message-ID: <014e01c4ca94$f5df7710$4dbb6086@cleaver> From: "feilong" To: "Tomcat Users List" References: <200411142101.iAEL1nEn021689@corp-200.dfki.uni-sb.de> Subject: Re: Soap under Tomcat Date: Sun, 14 Nov 2004 22:57:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hallo, What do you mean that the /soap/rpcrouter is not available? in web.xml ---------------------------------------------------------------------------- ----- rpcrouter Apache-SOAP RPC Router no description org.apache.soap.server.http.RPCRouterServlet faultListener org.apache.soap.server.DOMFaultListener ---------------------------------------------------------------------------- ------ The servlet class is in this package org......RPCRouterServlet. I tried replace with onjava.CalcService but it doesn't work. The current error message is ---------------------------------------------------------------------------- ------------ D:\Programs\jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\classes>java onjava.CalcC lient 98 92 I am called! The call failed: Fault Code = SOAP-ENV:Server.Exception: Fault String = onjava/CalcService (wrong name: CalcService) ---------------------------------------------------------------------------- ----------------- Thanks again Best Feilong ----- Original Message ----- From: "Mark Thomas" To: "'Tomcat Users List'" Sent: Sunday, November 14, 2004 10:00 PM Subject: RE: Soap under Tomcat > To quote from the error message from your original post: > > The requested resource (/soap/rpcrouter) is not available. > > Mark > > > -----Original Message----- > > From: feilong [mailto:feilong@dfki.de] > > Sent: Sunday, November 14, 2004 8:18 PM > > To: Tomcat Users List > > Subject: Re: Soap under Tomcat > > > > Hallo Mark, > > My client is requesting > > http://localhost:8080/soap/servlet/rpcrouter, and > > the servletmapping is exactly same > > > > rpcrouter > > /servlet/rpcrouter > > > > in soap/WEB-INF/web.xml. > > Why do you say that the requesting doesn't match the > > description in web.xml? > > The problem is still there. > > > > Best > > Feilong > > > > The source code for CalcClient.java is following: > > -------------------------------------------------------------- > > -------------- > > --------------- > > package onjava; > > > > import java.io.*; > > import java.net.*; > > import java.util.*; > > import org.apache.soap.*; > > import org.apache.soap.rpc.*; > > > > public class CalcClient { > > > > public static void main(String[] args) throws Exception { > > > > URL url = new URL > > ("http://localhost:8080/soap/servlet/rpcrouter"); > > > > Integer p1 = new Integer(args[0]); > > Integer p2 = new Integer(args[1]); > > > > // Build the call. > > Call call = new Call(); > > call.setTargetObjectURI("urn:onjavaserver"); > > call.setMethodName("subtract"); > > call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); > > Vector params = new Vector(); > > params.addElement(new Parameter("p1", Integer.class, p1, null)); > > params.addElement(new Parameter("p2", Integer.class, p2, null)); > > call.setParams (params); > > > > // make the call: note that the action URI is empty because the > > // XML-SOAP rpc router does not need this. This may change in the > > // future. > > Response resp = call.invoke(url, "" ); > > > > // Check the response. > > if ( resp.generatedFault() ) { > > > > Fault fault = resp.getFault (); > > System.out.println("The call failed: "); > > System.out.println("Fault Code = " + fault.getFaultCode()); > > System.out.println("Fault String = " + fault.getFaultString()); > > } > > else { > > > > Parameter result = resp.getReturnValue(); > > System.out.println(result.getValue()); > > } > > } > > } > > > > --------------------------------------------------------------------- > > > > > > > > > > ----- Original Message ----- > > From: "Mark Thomas" > > To: "'Tomcat Users List'" > > Sent: Sunday, November 14, 2004 12:44 PM > > Subject: RE: Soap under Tomcat > > > > > > > I am not familiar with this particular tutorial but the > > problem appears to > > be > > > that your client is requesting /soap/rpcrouter but the > > servlet mapping in > > > web.xml indicates that the webapp is expcting > > /soap/servlet/rpcrouter. > > What the > > > root cuase of this mismatch might be I do not know. > > > > > > Mark > > > > > > > -----Original Message----- > > > > From: feilong [mailto:feilong@dfki.de] > > > > Sent: Saturday, November 13, 2004 11:45 PM > > > > To: tomcat-user@jakarta.apache.org > > > > Subject: Soap under Tomcat > > > > > > > > Hallo all, > > > > I am a beginner with programming web-service with soap > > > > protocol under Tomcat web server. > > > > I find a link > > > > http://www.onjava.com/pub/a/onjava/2002/02/27/tomcat.html?page=1 > > > > which introduce how to use soap in Tomcat and deploy web > > > > services and a simple client to call this web service > > > > I have followed each step what is showed in this article. All > > > > run succesfully. only the last step > > > > java onjava.CalcClient 96 95. I get the following exceptions, > > > > but unfortunately I can not understand such exceptions, I > > > > hope someone can indicate the reason for me > > > > ----------------------------------------------------------- > > > > Exception in thread "main" [SOAPException: > > > > faultCode=SOAP-ENV:Protocol; msg=Unsu > > > > pported response content type "text/html; > > > > charset=ISO-8859-1", must be > > > > : "text/xml". Response was: > > > > <html><head><title>Apache Tomcat/4.1.30 - > > > > Error report</tit > > > > le><STYLE><!--H1{font-family : > > > > sans-serif,Arial,Tahoma;color : white > > > > ;background-color : #0086b2;} H3{font-family : > > > > sans-serif,Arial,Tahoma;color : w > > > > hite;background-color : #0086b2;} BODY{font-family : > > > > sans-serif,Arial,Tahoma;col > > > > or : black;background-color : white;} B{color : > > > > white;background-color : #0086b2 > > > > ;} HR{color : #0086b2;} --></STYLE> > > > > </head><body><h1> > > > > HTTP Status 404 - /soap/rpcrouter</h1><HR > > > > size="1" noshade> > > > > ;<p><b>type</b> Status > > > > report</p><p><b>messa > > > > ge</b> > > > > > > <u>/soap/rpcrouter</u></p><p><b>descr > > > > iption</b> <u>The requested resource > > > > (/soap/rpcrouter) is not availa > > > > ble.</u></p><HR size="1" > > > > noshade><h3>Apache To > > > > mcat/4.1.30</h3></body></html> > > > > ] > > > > at > > org.apache.soap.rpc.Call.getEnvelopeString(Call.java:208) > > > > at org.apache.soap.rpc.Call.invoke(Call.java:255) > > > > at onjava.CalcClient.main(CalcClient.java:35) > > > > ---------------------------------------------------------- > > > > I put my java servlet classes and source code in > > > > > > D:\Programs\jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\classes\onjava > > > > I can deploy the CalcService servlet in Tomcat Server. > > > > But when I run the CalcClient, get the error messages above. > > > > I guess since I didn't add anything in > > > > \jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\web.xml > > > > descriptor file. This web.xml is automatic generated by > > > > soap.war while I run the Tomcat Server first time. I don't > > > > know how can I edit the > > > > original web.xml(Deployment Descriptor)if I add new servlet > > > > class with package onjava in > > > > webapps\soap\WEB-INF\classes\onjava\. > > > > Another DeploymentDescriptor.xml identifying soap-service > > > > under webapps\soap\WEB-INF\classes\onjava\ runs correctly > > > > since I can deploy this webservice. > > > > The soap\WEB-INF\web.xml looks like following > > > > ------------------------------------------------------------ > > > > > > > > > > > > > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web > > Application 2.2//EN" > > > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> > > > > > > > > > > > > Apache-SOAP > > > > no description > > > > > > > > rpcrouter > > > > Apache-SOAP RPC Router > > > > no description > > > > > > > > org.apache.soap.server.http.RPCRouterServlet > > ervlet-class> > > > > > > > > faultListener > > > > > > > > org.apache.soap.server.DOMFaultListener > > > > > > > > > > > > > > > > > > > > messagerouter > > > > Apache-SOAP Message Router > > > > > > > > org.apache.soap.server.http.MessageRouterServle > > > t > > > > > > > > faultListener > > > > > > > > org.apache.soap.server.DOMFaultListener > > > > > > > > > > > > > > > > > > > > rpcrouter > > > > /servlet/rpcrouter > > > > > > > > > > > > > > > > messagerouter > > > > /servlet/messagerouter > > > > > > > > > > > > ------------------------------------------------------------ > > > > Another reason I guess is that I didn't edit anything in > > > > D:\Programs\jakarta-tomcat-4.1.30\conf\server.xml while new > > > > webapplicatin soap comes. I can't edit such configuration > > > > files. How can I learn to write and edit such Deployment > > > > Descriptor file and server configuration files. > > > > The server.xml looks like: > > > > ----------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > className="org.apache.catalina.mbeans.ServerLifecycleListener" > > > > debug="0"/> > > > > > > > className="org.apache.catalina.mbeans.GlobalResourcesLifecycle > > > > Listener" > > > > debug="0"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > value="30"/> > > > > > > > > > > > > > > > type="org.apache.catalina.UserDatabase" > > > > description="User database that can be updated and saved"> > > > > > > > > > > > > > > > > factory > > > > > > > > org.apache.catalina.users.MemoryUserDatabaseFactory > > > > > > > > > > > > pathname > > > > conf/tomcat-users.xml > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > className="org.apache.coyote.tomcat4.CoyoteConnector" > > > > port="8080" minProcessors="5" maxProcessors="75" > > > > enableLookups="true" redirectPort="8443" > > > > acceptCount="100" debug="0" > > connectionTimeout="20000" > > > > useURIValidationHack="false" > > > > disableUploadTimeout="true" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > className="org.apache.coyote.tomcat4.CoyoteConnector" > > > > port="8009" minProcessors="5" maxProcessors="75" > > > > enableLookups="true" redirectPort="8443" > > > > acceptCount="10" debug="0" connectionTimeout="0" > > > > useURIValidationHack="false" > > > > > > > > protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > prefix="catalina_log." suffix=".txt" > > > > timestamp="true"/> > > > > > > > > > > > > > > > > > > > > > className="org.apache.catalina.realm.UserDatabaseRealm" > > > > debug="0" resourceName="UserDatabase"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > unpackWARs="true" autoDeploy="true"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > directory="logs" prefix="localhost_log." > > > > suffix=".txt" > > > > timestamp="true"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > reloadable="true" crossContext="true"> > > > > > className="org.apache.catalina.logger.FileLogger" > > > > prefix="localhost_examples_log." > > suffix=".txt" > > > > timestamp="true"/> > > > > > > > home="com.wombat.empl.EmployeeRecordHome" > > > > remote="com.wombat.empl.EmployeeRecord"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > type="java.lang.Integer" > > > > value="15"/> > > > > > > > value="context.param.value" > > > > override="false"/> > > > > > > > type="javax.sql.DataSource"/> > > > > > > > > > > > > usernamesa > > > > > > > > password > > > > driverClassName > > > > org.hsql.jdbcDriver > > > > url > > > > > > jdbc:HypersonicSQL:database > > > > > > > > > > > type="javax.mail.Session"/> > > > > > > > > > > > > mail.smtp.host > > > > localhost > > > > > > > > > > > > > > > global="simpleValue" > > > > type="java.lang.Integer"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------- > > > > > > > > Thanks in advance > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org