Re: Best IDE to use for Axis
I haven't seen much on this topic. If it was discussed well, I must have missed it. The one reference I found to using Axis with NetBeans was http://cropcrusher.web.infoseek.co.jp/shufujava/wserv/axisnb4_en.html which I didn't find particularly helpful -- probably because something was lost in translation. In the best of all possible worlds, it would be possible flawlessly to integrate Axis with any IDE. In the real world it seems to me that the NetBeans community is ignoring Axis as a viable alternative to the Sun server and that the Axis community has little use for NetBeans. I have been working with NetBeans 4.0 [for various reasons 4.1 is not currently an option] and Axis for about a month and have found it possible to get them to play together reasonably well but it wasn't easy. The steps I followed were: Setting up the Axis jars as a NetBeans Library resolves classpath issues; Changing the default version of Ant to be the one that comes with Axis provides useful tasks; Creating a separate axis.properties file under nbproject; Adding task definitions to build.xml; taskdef name=axis-admin classname=org.apache.axis.tools.ant.axis.AdminClientTask classpathref=axis.classpath / taskdef name=axis-java2wsdl classname=org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask classpathref=axis.classpath/ taskdef name=axis-wsdl2java classname=org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask classpathref=axis.classpath/ Adding tasks to build.xml to use the task defs as needed. I'm still undecided about whether to use the JWSDP or Axis. Having gotten Axis working, I'm not currently inclined to delve into JWSDP until I feel more comfortable with Web Services in general. On 6/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This question has discussed in the past,and you can travel history maillists.Best Regards, Robert ZhangEmail:[EMAIL PROTECTED]Tel:86-010-62014411-2437- 原邮件 -从: Sammo [EMAIL PROTECTED] 日期: 星期四, 六月 23日, 2005 下午1:10主题: Best IDE to use for Axis I'm currently using NetBeans 4.1 as my Java IDE, but I have no idea how to use it with Axis. Are there any instructions on how to do this, or should I use another preferred IDE to develop web services?-- It used to be that machines automated work, giving us moretime to do other things. But now machines automate theproduction of attention-consuming information, which takesour time. For example, if one person sends the same e-mailmessage to 10 people, then 10 people have to respond.Esther Dyson
Re: Post or get
Admittedly this is getting OT but... Why that particular progression -- 128, 384, 8192? dga Jeff said (on or about) 06/05/2005 05:17: Try telling Tomcat to use more memory, Omar! Open the Tomcat configuration panel (e.g. 'Configure Tomcat' from the Start menu if running on Windows) and stop Tomcat. On the Java tab, enter values for Initial memory pool, Maximum memory pool and Thread stack size. You could try 128, 384, 8192 respectively. Start Tomcat and test. Jeff - Original Message - From: Omar Bennani [EMAIL PROTECTED] To: axis-user@ws.apache.org; Anne Thomas Manes [EMAIL PROTECTED] Sent: Sunday, June 05, 2005 5:06 AM Subject: Re: Post or get Hi I create my client with WSDL2java, my client send 2 cmoplex array of 100 and 4800 elements and not all the element are full, when I send them my service is overloaded(I don't understand why) dso I think that the amount of xml cause this problem so i won't to send empty array's element. So should I modify the wsdl and re-execute wsdl2java ? thanks If you want to send a SOAP request message, you must use POST. In Axis, the GET method is only supported when using SOAP 1.2, and only for RESTful web services. Why don't you want your client to send empty nodes? Anne On 6/4/05, Omar Bennani [EMAIL PROTECTED] wrote: hi I'm using soap and i would like to know which is better to sue for http : post or get? and how can I choose between them? How can I configure my java client to dont send empty nodes? thanx _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
Re: Axis Client using HTTPS w/ no authentication how?
As a test, you might try this. It worked for me using xml-rpc when the certificate on the host was not a trusted certificate. Step 1 Create your own Host Verifier that will accept anything mine looks like this: class NullHostnameVerifier implements javax.net.ssl.HostnameVerifier { public boolean verify(String urlHostname, SSLSession session){ return true; } } Step 2 Before using https set your null verifier as the default HttpsURLConnection.setDefaultHostnameVerifier(new NullHostnameVerifier()); When I did this, it would accept any certificate without caring if it was trusted or not. I only needed it for a test implementation -- the live version checks. On 6/1/05, Melean, Calixto (Calixto) [EMAIL PROTECTED] wrote: Folks,Could anybody please help me with the following problem. I am desperate for help as I can't get this to work.I don't know if the problem is server or client. Anybody know how to configure Axis to send HTTPS to servers without using authentication/certificates.The web service is using gsoap. The client is using java apache axis. The client is trying to use SSL(HTTPS).I dont want want any authentication/certificates. I only need encryption. In the server I am doing:soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, NULL, NULL, NULL, NULL, NULL )The error printed by gsoap is:SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL routines:SSL routines:reason(193). SSL_accept () failed in soap_ssl_accept()The error on the Axis side is:javax.net.ssl.SSLHandshakeException: Received fatal alert:handshake_failure-Now, I tried setting the soap context using the included server.pem (though I dont think I need this). And this is what happens:soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, server.pem, password, NULL, NULL, NULL, NULL, NULL )Error on gsoap side: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL routines:SSL routines:reason(1046). SSL_accept() failed in soap_ssl_accept()Error on Axis side:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate foundThe errors are different. Again, the goal is to have encryption with no authentication. Anybody knows how to get this going.I appreciate any help thanks-- It used to be that machines automated work, giving us moretime to do other things. But now machines automate theproduction of attention-consuming information, which takesour time. For example, if one person sends the same e-mailmessage to 10 people, then 10 people have to respond.Esther Dyson
Re: Cannot query database from web service.
I can't say for sure that this is your problem and if my assumption that your service is running on Windows is wrong then it almost certainly isn't but I have had problems with ODBC connections when they are not System connections. If the ODBC connection is defined at user level, the web service may not be able to find it. Another oddity I have encountered has to do with mapped drives. If the Access db is referenced as a mapped drive and the web service container is running as a service, it may not be able to reference the mapped drive. In this case I have used the complete \\server_name\... method of referencing the drive with the db on it successfully. As a test you might try replacing the Access db with MySql, MSDE or other db engine just to see if the service can connect there successfully.On 5/27/05, Martin Gülich [EMAIL PROTECTED] wrote: Hello!I have a tricky problem that I cannot solve on my own. I want to use JDBCfrom within my web service implementation to query an Access 2000 databasevia ODBC (System DSN) and return the answer. That is, the java method implementing the web service uses JDBC. For some reason this doesn't work.The program containing the method runs just fine when executed directly fromthe command prompt, but when it is invoked by calling the web service from an Axis client I get a createSQLException with a trace back toMethod.invoke() among others (see below). I have tried many things and itseems to me that my database cannot be queried from within the Axis-process that is executing the web service. Why is that?Have anybody else encountered a similar problem, and how did you solve it?Please help!PS. How can I open a text file from within a web service and use it? The default path/user.dir property is c:\winnt\system32 from the perspective ofthe running web service so the text file is never found. I have tried to setthe user.dir property to directory ..\axis\WEB-INF\classes without success. DS.Here is the code implementing my web service:public synchronized String getCarsByOwner(String ownerSSN) {String sqlResult;try {String driver = sun.jdbc.odbc.JdbcOdbcDriver;String dbURL = jdbc:odbc:carsdatabase;// Load driver and connect to databaseClass.forName(driver).newInstance();Connection connection =DriverManager.getConnection(dbURL);PreparedStatement stmnt =connection.prepareStatement(SELECT * +FROM Cars +WHERE Owner=3D+ownerSSN);ResultSet res = stmnt.executeQuery();sqlResult = convertQueryResultToString();} catch(Exception e) {StackTraceElement[] ste = e.getStackTrace();StringBuffer buf = new StringBuffer();for(int i=0; iste.length; i++) {buf.append(ste[i].toString()); buf.append(endl);}sqlResult = buf.toString();}return sqlResult;}And here is the error received:sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect (JdbcOdbc.java:3074)sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)java.sql.DriverManager.getConnection(DriverManager.java :512)java.sql.DriverManager.getConnection(DriverManager.java:193)datasources.cars.CarsDBClient$1.run(CarsDBClient.java:117)datasources.cars.CarsDBClient.getCarsByOwner(CarsDBClient.java:138) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI mpl.java:25)java.lang.reflect.Method.invoke(Method.java:324)org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)org.apache.axis.providers.java.RPCProvider.processMessage (RPCProvider.java:304)org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:329)org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)org.apache.axis.SimpleChain.doVisiting (SimpleChain.java:157)org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:517)org.apache.axis.server.AxisServer.invoke(AxisServer.java :324)org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:639)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java :339)Best regardsMartin-- It used to be that machines automated work, giving us moretime to do other things. But now machines automate theproduction of attention-consuming information, which takesour time. For example, if one person sends the same e-mailmessage to 10 people, then 10 people have to respond.Esther Dyson
Re: problem integrating the client in another web application: AxisServlet threw exception
I've been working on integrating Axis with Netbeans and I just finished the trivial case of using a JSP to consume a WebService. -- [EMAIL PROTECTED] contentType=text/html% [EMAIL PROTECTED] pageEncoding=UTF-8% [EMAIL PROTECTED] import=play.*% html headtitleJSP Page/title/head body % String val=earnest; try{ HiSEI hiStub = new HiSEIServiceLocator().getHiSEIPort(); out.println(hiStub.sayHi(Allison)); }catch (Exception ex){}% /body /html The import references the package play which was created by wsdl2java and contains the two classes referenced in the scriptlet. dga On 5/13/05, Srinadh Karumuri [EMAIL PROTECTED] wrote: Does any one have a sample code for calling an Axis Web service from a JSP page? Interesting thing is: Same code when I tried on Tomcat 3 gives me the following exception: Internal Servlet Error: java.lang.IllegalStateException: Response has already beencommittedatjava.lang.Throwable.fillInStackTrace(Native Method)atjava.lang.Throwable.fillInStackTrace(Compiled Code) atjava.lang.Throwable.(Compiled Code)atjava.lang.Exception.(Compiled Code)atjava.lang.RuntimeException.(Compiled Code)atjava.lang.IllegalStateException.(Compiled Code) atorg.apache.tomcat.core.HttpServletResponseFacade.sendError(CompiledCode): : -Sri At 01:05 PM 5/13/2005, you wrote: Michael, I checked the HttpClient and understood what you meant. So, it should be working with my web app on the same Tomcat. As it shows in the RootCouse: root cause java.lang.LinkageError: loader constraints violated when linkingjavax/xml/soap/SOAPMessage classatorg.apache.axis.client.Call.init(Call.java:263)atorg.apache.axis.client.Service.createCall (Service.java:566)I started using a simple JSP page but still my Call.init is failing. -Sri At 10:18 AM 5/13/2005, you wrote: Michael, Thanks for your reply. I just started calling the web service in the .jsp file. Here is my client code from .jsp file: % String endpoint = http://localhost:8080/bserv/services/EmployeeDataService ; String[] args = {getEmployeeLateTSDataArray, 22624, 8524}; String method = args[0]; String arg1 = args[1];; String arg2 = args[2];; Service service = new Service(); Call call = null; QName qname = null; Class cls = null; qname = new QName(EmployeeLateTSArray, EmployeeLateTSBean); TypeMappingRegistry tmr = service.getTypeMappingRegistry(); TypeMapping tmlts = tmr.createTypeMapping(); try { tmlts.register( Class.forName(com.bbn.ws.EmployeeLateTSBean), qname, new org.apache.axis.encoding.ser.BeanSerializerFactory(EmployeeLateTSBean.class,qname), new org.apache.axis.encoding.ser.BeanDeserializerFactory(EmployeeLateTSBean.class,qname)); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } tmr.register(http://schemas.xmlsoap.org/soap/encoding/ , tmlts); qname = new QName(EmployeeLateTSArray, EmployeeLateTSBeanArray); call = (Call) service.createCall(); call.setReturnType (qname); try { call.setTargetEndpointAddress(new java.net.URL(endpoint)); } catch (MalformedURLException e2) { e2.printStackTrace(); } call.setOperationName(method); call.addParameter(admnum, XMLType.XSD_INTEGER, ParameterMode.IN); call.addParameter(mgrnum, XMLType.XSD_INTEGER, ParameterMode.IN); call.setReturnType(qname); System.out.println(Called method: + method + ( + arg1 + , + arg2 + )); EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(new Object[] { new Integer(arg1), new Integer(arg2) }); % %= e[0].toString(); % I will look into using HttpClient as you suggested. Thanks again, Sri At 05:47 PM 5/12/2005, Michael Oliver wrote: Sri, Its hard to tell what you are doing because we don't see any of the source, but I can tell you that I use commons HttpClient to access one servlet from another servlet all day long with no problems so you can at least know that should work. Michael Oliver CTO Alarius Systems LLC 6800 E. Lake Mead Blvd, #1096 Las Vegas, NV 89156 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -- It used to be that machines automated work, giving us moretime to do other things. But now machines automate theproduction of attention-consuming information, which takesour time. For example, if one person sends the same e-mailmessage to 10 people, then 10 people have to respond.Esther Dyson