Re: content-transfer-encoding: base64
Haven't tried it as an attachment. Of course over the wire you could just convert it to a string: ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... new String(Base64.encode(baos.toByteArray())); And of course wsdl has a base64 type - I recently sent a zip as base64 with wsdl as I needed error handling. HTH, Robert (clearing my iksrazal inbox). http://www.braziloutsource.com/ --- Argo [EMAIL PROTECTED] wrote: Hi all, Is it possible specify to Content-Transfer-Encoding:base64 for ws attachment with Axis 1.3? I have a generated client class with method with DataHandler. DataHandler DataSource is simple ByteArrayDataSource. Bytes are encoded as base64. -- Argo None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: share the context from web services
Could you try and explain your problem again? I'm not understanding your question - application context of what, the Spring framework ? Which tree, treeMap etc - Its just like loading a class anywhere else. Tal vez es mejor hablar en espanol - no comprende su pregunta. Pero, yo hablo português bien mejor que espanol. iksrazal On 1/25/06, Roberto Gil [EMAIL PROTECTED] wrote: Hi, I'm a student spanish that use axis in his project.Excuse me for me english, but i don't speak it very well.I' ve got a Java application. I use jetty how servlet container, and axis how my servlet for my web services. My web services are file .class in the folder .\axis\WEB-INF\classes. With my examples, it works very well. My question is: can i access to the java application's context from my web services ( file .class). For example, if the java application has a tree in memory, can my web service access to this tree?thanks you for your help. Roberto
Re: share the context from web services
Lo quieres: 1) ver a memoria de example.class? 2) O, simplemente tener una referencia de example.class por dentro su web service ? Creo que su pregunta es mas Java que Web Services. Para ver a memoria - un poco como C - puedes usar: sun.misc.unsafe : http://jguru.com/faq/view.jsp?EID=448031 HTH, iksrazal (shade tree spanish speaker) http://www.braziloutsource.com/ On 1/25/06, Roberto Gil [EMAIL PROTECTED] wrote: Yo tengo una aplicación en java. Dentro de esta aplicación está integrado un servidor, que es Jetty, el cual utilizo como contenedor de servlet. El servlet que utilizo es AXIS, donde están incluidos los ficheros con mis servicios web en ficheros .class en el directorio axis\WEB-INF\classes\.En la aplicación java, tengo creado un árbol en memoria, es posible acceder desde un servicio web (axis\WEB-INF\classes\example.class) de alguna manera, a los datos contenidos en el árbol de memoria? Muchas graciasRobertoOn 1/25/06, trebor iksrazal [EMAIL PROTECTED] wrote: Could you try and explain your problem again? I'm not understanding your question - application context of what, the Spring framework ? Which tree, treeMap etc - Its just like loading a class anywhere else. Tal vez es mejor hablar en espanol - no comprende su pregunta. Pero, yo hablo português bien mejor que espanol. iksrazal On 1/25/06, Roberto Gil [EMAIL PROTECTED] wrote: Hi, I'm a student spanish that use axis in his project.Excuse me for me english, but i don't speak it very well.I' ve got a Java application. I use jetty how servlet container, and axis how my servlet for my web services. My web services are file .class in the folder .\axis\WEB-INF\classes. With my examples, it works very well. My question is: can i access to the java application's context from my web services ( file .class). For example, if the java application has a tree in memory, can my web service access to this tree?thanks you for your help. Roberto
Re: [Axis2-0.94] - problem with generated stub
snip Sorry, can't help much with your main problem. Incidentally, I remember a few years back when I was using axis 1, there was a java tool that was very nice for debugging that you could use as a proxy in between the client and the ws endpoint and it would show you the soap headers and payloads that were going back and forth. Does anyone know what I'm talking about and where to get it? thx, aaron tcpmon ? the soap applet AFAIK hasn't been ported to axis2 yet. HTH, iksrazal http://www.braziloutsource.com/ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Axis2-0.94] - problem with generated stub
I started the port a few weeks ago when I really needed it. I got a bit stuck on the handler part. On my todo list, unless someone beats me to it ;-) . iksrazal http://www.braziloutsource.com/ --- Davanum Srinivas [EMAIL PROTECTED] wrote: Hmm, they includes you...the soap monitor applet was originally written by a user :) -- dims [1] http://marc.theaimsgroup.com/?l=axis-devm=103127528227619w=2 On 1/21/06, Aaron Evans [EMAIL PROTECTED] wrote: trebor iksrazal iksrazal at yahoo.com writes: tcpmon ? the soap applet AFAIK hasn't been ported to axis2 yet. Yes, that is the one. Gee, it would be really nice if they did port it to axis2, I remember finding it very useful for debugging. -- Davanum Srinivas : http://wso2.com/blogs/ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [axis2] Programming with skeletons
Hi Grzegorz, IMHO there's not an eleqoent solution yet. My rule of thumb: 1) Jar the generated code every time you run WSDL2Java _except_ the skeleton and callback - don't worry about the callback if not doing asynchronous operations. From my experience, those are the two classes that I need to modify. 2) Copy the skeleton (and maybe the callback) into your environment. Do the formatting and business logic. Import the jar from step 1 into your env also. 3) On updates, just copy and paste the new methods from the new wsdl and generated source from the latest skeleton to the saved copy. Re-import the jar from step 1. This is all obvious I suppose, but that's at least how I go about it. HTH, iksrazal http://www.braziloutsource.com/ --- Grzegorz Chwajol [EMAIL PROTECTED] wrote: Hello, I have made my first test service and a client with Axis2, starting with WSDL and generating code with WSDL2Java tool. And it seems to work :) But the question is related to generating the skeleton. For me (and according to Axis1 userguide) skeleton is a class that sits between the Axis engine and the actual service implementation. However, after generating a skeleton I found a skeleton class with metod signatures, where I found something like: //Todo fill this with the necessary business logic After filling with a code, it worked. But now, when I add another operation to my wsdl and regenerate skeleton, will I need to reimplement again logic part of all methods (including these that were already implemented)? I would expect that implementation is located somewhere else and it would be enough to add only additional code relating to new operations... I will apprieciate any suggestion. Cheers, -- Grzegorz Chwajo³ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
RE: wsdl not necessary?
A couple quick things: 1) Place [axis2] in the subject as your more likely to get a specific response. 2) WSDL is _not_ neccesary to develop axis2 web services, its optional. Some of the user guide samples use wsdl, some don't. 3) From what I gather java2wsdl is comming soon. However, its often suggested that java2wsdl should be just used as a starting point, and then work directly with the wsdl by editing it. I myself don't use java2wsdl . 4) Use the 'free as in beer' soa editor from cape clear to create a wsdl file. Or just find a simple one and then edit it to suit your needs. Its not impossible at all. HTH, iksrazal http://www.braziloutsource.com/ --- [EMAIL PROTECTED] wrote: -- Messaggio Originale -- Reply-To: axis-user@ws.apache.org Subject: RE: wsdl not necessary? Date: Sun, 1 Jan 2006 12:53:44 - From: James Waldrop [EMAIL PROTECTED] To: axis-user@ws.apache.org Well, of course you need the WSDL to initially develop the client. You need something to feed to WSDL2Java, or whatever it is you're going to do to end up with your SOAP layer (model service objects). If you know the URL of a service, you can often get the WSDL by appending ?WSDL to the endpoint. Or, they may publish one. Just as an example, if you're going to integrate with the Salesforce.com SOAP API's, there's a setup page that allows you to generate a couple different WSDLs to use, depending on your requirements. James -Original Message- -- Messaggio Originale -- Reply-To: axis-user@ws.apache.org Subject: RE: wsdl not necessary? Date: Sun, 1 Jan 2006 12:53:44 - From: James Waldrop [EMAIL PROTECTED] To: axis-user@ws.apache.org Well, of course you need the WSDL to initially develop the client. You need something to feed to WSDL2Java, or whatever it is you're going to do to end up with your SOAP layer (model service objects). If you know the URL of a service, you can often get the WSDL by appending ?WSDL to the endpoint. Or, they may publish one. Just as an example, if you're going to integrate with the Salesforce.com SOAP API's, there's a setup page that allows you to generate a couple different WSDLs to use, depending on your requirements. ok you said that wsdl it is necessary to write the client but i don't understand why axis2 examples as MyService.java with ping and echo method don't have it. And i don't understand why in this example the client EchoBlockingClient doesn't need any stub class too. Another important question is that if wsdl file it is necessary why there is not a tool to create it starting from java service interface. In axis (version 1) there is Java2Wsdl tool, why in axis 2 is absent? Can i use that old tool and have my wsdl file or not? You said you created tha file by hand but i think for a newbie it is impossbile. Thanks and excuse me for all these questions. _ TISCALI ADSL WebMail Solo con Tiscali Adsl navighi e telefoni senza canone Telecom a partire da 14,95 Euro/mese. Attivala subito! Per te 500 MB inclusi per navigare, inviare e ricevere messaggi e-mail, foto ed mp3. http://abbonati.tiscali.it/adsl/sa/2wam_tc/ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/
Re: wsdd operation - How do I represent return type of List?
Anne actuallly helped me with 'List of complex type objects' a couple days ago. I've done what you describe alot with 'rpc encoded', but the future is pointing to doc / lit, as you seem to be using anyways : http://marc.theaimsgroup.com/?l=axis-userm=113459148202564w=2 I've got it about 99% working at this point. I might be able to help more code wise should you get stuck. HTH, iksrazal --- Anne Thomas Manes [EMAIL PROTECTED] wrote: Ben, For better interoperability, you should convert your list into an array. See http://www.osmoticweb.com/axis-wsdd/operation.htm for documentation of the WSDD operation definition. name = the name of the Java method qname = the qname of the element that represents the method name in XML returnQName = the qname of the element that represents the return value in XML returnType = the XML type of the element that represents the return value Anne On 12/16/05, Ben Reif [EMAIL PROTECTED] wrote: I'm using Axis 1.3 to create document / literal style services, so as I understand it, I need to be more declarative in my wsdd file and define the operations. I have a method in my service that returns a List of complex type objects. In reading through the documentation I need to set the name, qname, returnQName, and returnType attributes. Something like: operation name=query qname=? returnQName=? returnType=? I also noticed in the WSDDConstants class there were constants defined for returnItemQName, returnItemType, itemQName, and itemType attributes, but there is no mention of them in the documentation. Can anyone explain how to represent a List of complex types as either an input parameter or a return parameter in the operation tag? Also, what's the difference between qname, returnQName and the returnType (which could also be a QName maybe?). Thanks a bunch, Ben None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [axis2] what is Axis2.obj ? Where should it be ?
This is rather confusing as it seemingly writes this file where ever the server is shutdown from. If I start and stop tomcat from different directories, would the 'hibernate' still work? And since you imply that this feature is no longer being used, +1 from me to get rid of it. Thanks for the clarification regardless. iksrazal --- Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Trebor and all; If you are running in a servlet container , when you shout down your tomcat , Axis2 will serialize its context hierarchy for you. public void destroy() { super.destroy(); new AxisEngine(configContext).serialize(); } And when you restart tomcat back all the properties in the context hierarchy will be back. So Axis2 by default serialize the hierarchy into file called Axis2.obj. The context hierarchy serialization gives us hibernate behavior to Axis2 :) We came up with that kind of sterilization to support RM like scenario , but as I know RM no longer going to use this serialization support, so I feel we should get ride of the idea of context serialization, comments .. ? Thanks, Deepal ~Future is Open~ - Original Message - From: trebor iksrazal [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, November 11, 2005 8:00 PM Subject: [axis2] what is Axis2.obj ? Where should it be ? Hi all, Running the axis2.war, when I start tomcat thru a bash alias in linux, I get two files put in the directory where I start tomcat: Axis2.obj axis.log What does Axis2.obj do and where should it be put ? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
[axis2] what is Axis2.obj ? Where should it be ?
Hi all, Running the axis2.war, when I start tomcat thru a bash alias in linux, I get two files put in the directory where I start tomcat: Axis2.obj axis.log What does Axis2.obj do and where should it be put ? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
[axis2] Still can't do a long running asynchronous task
Hi all, I've now tried 'fire and forget' - based of the 'ping' user guide example, and the 'echoNonBlockingDualClient' example. The task starts and runs to completion, however the the client side always throws an exception after 1 minute: [echo] Starting rc 'fire and forget' client... [java] rcFireAndForget, firing... [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:154) [java] at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:100) [java] at org.apache.axis2.clientapi.InOnlyMEPClient.send(InOnlyMEPClient.java:73) [java] at org.apache.axis2.clientapi.MessageSender.send(MessageSender.java:70) [java] at com.siemens.swa.plugins.clients.RCFireAndForgetClient.main(RCFireAndForgetClient.java:25) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java] at org.apache.tools.ant.Task.perform(Task.java:364) [java] at org.apache.tools.ant.Target.execute(Target.java:341) [java] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [java] at org.apache.tools.ant.Main.runBuild(Main.java:673) [java] at org.apache.tools.ant.Main.startAnt(Main.java:188) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) [java] Caused by: org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:204) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:123) [java] ... 23 more [java] Caused by: java.net.SocketTimeoutException: Read timed out [java] at java.net.SocketInputStream.socketRead0(Native Method) [java] at java.net.SocketInputStream.read(SocketInputStream.java:129) [java] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) [java] at java.io.BufferedInputStream.read(BufferedInputStream.java:235) [java] at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77) [java] at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105) [java] at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1110) [java] at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832) [java] at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1592) [java] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995) [java] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) [java] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) [java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) [java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.transportConfigurationPOST(CommonsHTTPTransportSender.java:502) I'm running v.92 . Please note that there seemingly are no long running examples in the user guide. I'm running these examples line by line - just throwing Thread.sleep(10) in to test. Please help - I'm stuck and running out of ideas. iksrazal
Re: [axis2] Nightly builds
Don't know if there are jar'ed nightlies, but you can follow the getting involved link and check out from subversion: http://ws.apache.org/axis2/svn.html HTH, iksrazal --- Kostello, Don [EMAIL PROTECTED] wrote: Where are nightly builds of Axis 2 available at? I want to get a version that has defect Axis2-277 fixed (servlet spec 2.4 incorrectly being required), and it seems that there is code checked in that fixes this. Don Kostello None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
Re: [axis2] asynchronous and timeout question
(CommonsHTTPTransportSender.java:204) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:123) [java] ... 23 more [java] Caused by: java.net.SocketTimeoutException: Read timed out [java] at java.net.SocketInputStream.socketRead0(Native Method) [java] at java.net.SocketInputStream.read(SocketInputStream.java:129) [java] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) [java] at java.io.BufferedInputStream.read(BufferedInputStream.java:235) [java] at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77) [java] at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105) [java] at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1110) [java] at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832) [java] at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1592) [java] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995) [java] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) [java] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) [java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) [java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.transportConfigurationPOST(CommonsHTTPTransportSender.java:502) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:182) [java] ... 24 more BUILD SUCCESSFUL Total time: 1 minute 2 seconds Is this possibly a bug, ie, should I file a JIRA report? Any other ideas I could try ? iksrazal --- trebor iksrazal [EMAIL PROTECTED] wrote: Hi Eran, The web service works fine if I have only a short task.I'm logging a success message in the web service so I know for sure. It gives me a timeout error when I try to execute my long task, but I still get a logged message saying it did get there and it does start executing my long task. The 'swa' reference is for our existing app. I put the needed servlet mappings in our web.xml, as well as axis2.xml in our WEB-INF, etc. Can I do that, ie, could this be my problem? It'd be too dificult to try and put our app in the axis2 war, but I suppose I could try putting my web service there, and putting a Thread.sleep there instead of our app. In the end, we need to continue using our current erp with swa - its a big existing app. Worth a shot, cheers, iksrazal --- Eran Chinthaka [EMAIL PROTECTED] wrote: your epr was http://127.0.0.1:8080/swa/services/RCService; In Axis2 the EPR should contain protocol://ip:port/axis2/services/serviceName but I can see your EPR contains swa, without axis2. Did you change the mapping in Struts ? Or can this be the problem. Change it to axis2 and check. trebor iksrazal wrote: Hi Eran, The server is Axis2 - its an existing spring/hibernate/struts app with Axis2 v.92 added in. Here's the stacktrace - I run the client via the commandline with ant: [echo] Starting rc client... [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.clientapi.InOutMEPClient.invokeNonBlocking(InOutMEPClient.java:255) [java] at org.apache.axis2.clientapi.Call.invokeNonBlocking(Call.java:136) [java] at com.siemens.swa.plugins.clients.RCServiceClient.main(RCServiceClient.java:61) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193) [java
Re: [axis2] asynchronous and timeout question
Hi Eran, thanks for the reply. I think I'm already doing everything you mentioned - my client code is basically the same as the EchoNonBlockingClient example, which I believe has useSeparateListener equal true and passes a callback into invokeNonBlocking. Of course, I'm sure I'm missing something simple. Could you please give a look at the code below? public class RCServiceClient { private static EndpointReference targetEPR = new EndpointReference(http://127.0.0.1:8080/swa/services/RCService;); public static void main(String[] args) { try { OMElement payload = ClientUtil.getEchoOMElement(); Call call = new Call(); call.setTo(targetEPR); // The boolean flag informs the axis2 engine to use two separate transport connection // to retrieve the response. call.engageModule(new QName(Constants.MODULE_ADDRESSING)); call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, true); //Callback to handle the response Callback callback = new Callback() { public void onComplete(AsyncResult result) { try { System.out.println(inside onComplete...); StringWriter writer = new StringWriter(); result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance() .createXMLStreamWriter(writer)); writer.flush(); System.out.println(writer.toString()); } catch (XMLStreamException e) { reportError(e); } } public void reportError(Exception e) { e.printStackTrace(); } }; //Non-Blocking Invocation call.invokeNonBlocking(rcExecute, payload, callback); //Wait till the callback receives the response. System.out.println(RC Service executed, sleeping until completion...); while (!callback.isComplete()) { Thread.sleep(1000); } //Need to close the Client Side Listener. call.close(); System.out.println(RC Service completed); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); } } } public class ClientUtil { public static OMElement getEchoOMElement() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://example1.org/example1;, example1); OMElement method = fac.createOMElement(rcExecute, omNs); OMElement value = fac.createOMElement(Text, omNs); value.addChild(fac.createText(value, Axis2 Echo String )); method.addChild(value); return method; } } Thanks a lot, trebor iksrazal --- Eran Chinthaka [EMAIL PROTECTED] wrote: Hi Trebor, trebor iksrazal wrote: Hi all, I've succesfully wrote a web service based off of the EchoNonBlockingClient example in the user guide. I'm using spring on the server side, if anyone needs help. Excellent, thanks for offering to help. I saw there are some people struggling to do the samething. If you have time, just explain what you did and how you did as a small tutorial and mail it here. If its good, we can put it in our Axis2 site. However, the task I execute on the web service side can take between 6 and 20 minutes. Its why I choosed axis2, so I can execute it asynchronously. Yet it gives me: java.net.SocketTimeoutException: Read timed out The reason for this is that the socket which you used to invoke server has timed out. What you can do is to use a separate listener and a pass a Callback, as Srinath has stated. You can do this by, call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, *true*); The last argument of setTransportInfo method is whether to use the same transport for sending and receiving, or to use different transports instances for the invocation. and then call invokeNonBlocking passing a callback object for you to get the result. call.invokeNonBlocking(axisOperation, payload, callback); This is the real async invocation, which can take days to complete. My questions are: 1) Given my transport is HTTP and my long execution times, can I expect to be able to get a return value? Really I just need to know the web service completed. The answer to the question of whether you get the response back or not depends on the MEP you used. It doesn't in any means depends on the transport you used. So if your service is an INOUT one, you
Re: [axis2] asynchronous and timeout question
] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) [java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.transportConfigurationPOST(CommonsHTTPTransportSender.java:502) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:182) [java] ... 24 more BUILD SUCCESSFUL Total time: 1 minute 7 seconds As stated, I'm probably doing something wrong or weird, somewhere ;-) . Please let me know if there is any more info I can provide or any hints on what else I can try. I'll be looking at EchoRawXMLOnTwoChannelsTest.testEchoXMLCompleteASync(). after this emial, thanks for the tip. Thanks! iksrazal --- Eran Chinthaka [EMAIL PROTECTED] wrote: Can you please send me the stacktrace too ? And are u calling a service hosted in a non-Axis2 server ? Seems so, as your target epr seems its not in an Axis2 server. But since it seems you have done the code well, its a rare chance that the epr u set it wrong. BTW, did you look at the code in EchoRawXMLOnTwoChannelsTest.testEchoXMLCompleteASync(). It has the same code as what you are trying to do. Chinthaka trebor iksrazal wrote: Hi Eran, thanks for the reply. I think I'm already doing everything you mentioned - my client code is basically the same as the EchoNonBlockingClient example, which I believe has useSeparateListener equal true and passes a callback into invokeNonBlocking. Of course, I'm sure I'm missing something simple. Could you please give a look at the code below? public class RCServiceClient { private static EndpointReference targetEPR = new EndpointReference(http://127.0.0.1:8080/swa/services/RCService;); public static void main(String[] args) { try { OMElement payload = ClientUtil.getEchoOMElement(); Call call = new Call(); call.setTo(targetEPR); // The boolean flag informs the axis2 engine to use two separate transport connection // to retrieve the response. call.engageModule(new QName(Constants.MODULE_ADDRESSING)); call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, true); //Callback to handle the response Callback callback = new Callback() { public void onComplete(AsyncResult result) { try { System.out.println(inside onComplete...); StringWriter writer = new StringWriter(); result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance() .createXMLStreamWriter(writer)); writer.flush(); System.out.println(writer.toString()); } catch (XMLStreamException e) { reportError(e); } } public void reportError(Exception e) { e.printStackTrace(); } }; //Non-Blocking Invocation call.invokeNonBlocking(rcExecute, payload, callback); //Wait till the callback receives the response. System.out.println(RC Service executed, sleeping until completion...); while (!callback.isComplete()) { Thread.sleep(1000); } //Need to close the Client Side Listener. call.close(); System.out.println(RC Service completed); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); } } } public class ClientUtil { public static OMElement getEchoOMElement() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://example1.org/example1;, example1); OMElement method = fac.createOMElement(rcExecute, omNs); OMElement value = fac.createOMElement(Text, omNs); value.addChild(fac.createText(value, Axis2 Echo String )); method.addChild(value); return method; } } Thanks a lot, trebor iksrazal --- Eran Chinthaka [EMAIL PROTECTED] wrote: Hi Trebor, trebor iksrazal wrote: Hi all, I've succesfully wrote a web service based off of the EchoNonBlockingClient example in the user guide. I'm using spring on the server side, if anyone needs help. Excellent, thanks for offering to help. I saw there are some people struggling to do the samething. If you have
Re: [axis2] asynchronous and timeout question
Hi Eran, The web service works fine if I have only a short task.I'm logging a success message in the web service so I know for sure. It gives me a timeout error when I try to execute my long task, but I still get a logged message saying it did get there and it does start executing my long task. The 'swa' reference is for our existing app. I put the needed servlet mappings in our web.xml, as well as axis2.xml in our WEB-INF, etc. Can I do that, ie, could this be my problem? It'd be too dificult to try and put our app in the axis2 war, but I suppose I could try putting my web service there, and putting a Thread.sleep there instead of our app. In the end, we need to continue using our current erp with swa - its a big existing app. Worth a shot, cheers, iksrazal --- Eran Chinthaka [EMAIL PROTECTED] wrote: your epr was http://127.0.0.1:8080/swa/services/RCService; In Axis2 the EPR should contain protocol://ip:port/axis2/services/serviceName but I can see your EPR contains swa, without axis2. Did you change the mapping in Struts ? Or can this be the problem. Change it to axis2 and check. trebor iksrazal wrote: Hi Eran, The server is Axis2 - its an existing spring/hibernate/struts app with Axis2 v.92 added in. Here's the stacktrace - I run the client via the commandline with ant: [echo] Starting rc client... [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.clientapi.InOutMEPClient.invokeNonBlocking(InOutMEPClient.java:255) [java] at org.apache.axis2.clientapi.Call.invokeNonBlocking(Call.java:136) [java] at com.siemens.swa.plugins.clients.RCServiceClient.main(RCServiceClient.java:61) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java] at org.apache.tools.ant.Task.perform(Task.java:364) [java] at org.apache.tools.ant.Target.execute(Target.java:341) [java] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [java] at org.apache.tools.ant.Main.runBuild(Main.java:673) [java] at org.apache.tools.ant.Main.startAnt(Main.java:188) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) [java] Caused by: org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out; nested exception is: [java] org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:154) [java] at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:100) [java] at org.apache.axis2.clientapi.InOutMEPClient.invokeNonBlocking(InOutMEPClient.java:245) [java] ... 21 more [java] Caused by: org.apache.axis2.AxisFault: Read timed out; nested exception is: [java] java.net.SocketTimeoutException: Read timed out [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:204) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:123) [java
[axis2] asynchronous and timeout question
Hi all, I've succesfully wrote a web service based off of the EchoNonBlockingClient example in the user guide. I'm using spring on the server side, if anyone needs help. However, the task I execute on the web service side can take between 6 and 20 minutes. Its why I choosed axis2, so I can execute it asynchronously. Yet it gives me: java.net.SocketTimeoutException: Read timed out My questions are: 1) Given my transport is HTTP and my long execution times, can I expect to be able to get a return value? Really I just need to know the web service completed. 2) Is my only option InOnly, ie 'fire and forget' ? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
[AXIS2] Building custom receiver in with maven
Hi all, I'm trying to build a web service using spring, based off of Paul Fremantle's work: http://marc.theaimsgroup.com/?l=axis-devm=112866697704950w=2 However, I'm getting this error: org.apache.axis2.deployment.DeploymentException: ClassNotFoundException Error in loading message receivers org.apache.axis2.receivers.SpringInOutMessageReceiver; nested exception is: The jar with the above class is in WEB-INF/lib (tomcat). What I'm now trying to do is incoporate Paul's org.apache.axis2.receivers.SpringInOutMessageReceiver into my download of the latest subversion trunk. However, it wants the spring jars. I realize this might be more of a maven question, but how might one build a custom receiver - with its dependencies such as spring - into an axis2.jar ? I have my web service working with RawXMLINOutMessageReceiver - now I need to somehow use SpringInOutMessageReceiver. iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: Log outgoing/incoming messages w/ Client Handler
You can put a client-side handler in with the HandlerRegistry programmatically - without an wsdd. This question comes up frequently so try googling or searching the list - iksrazal HandlerRegistry may help as I believe we had the discussion recently. HTH, iksrazal --- Dowell, Darrin [EMAIL PROTECTED] wrote: I have the Axis generated client code (using WSDL2Java) and I'd like to use an Axis handler to intercept request/response messages to log them. Static void main(String[] args){ MyServiceLocator serviceLocator = new MyServiceLocator(); serviceLocator.setServiceSoapEndpointAddress(http://myservice.com/;); port = serviceLocator.getMyServiceSoap(); String response = getPort().getLeadList(request); } Is there a way to extend one of the Axis classes to log my messages? I don't have the option of doing JaxRPC or using the WSDD file option. I'm looking for how to code the handler to log the message and how to tie the handler into my calling of the service above. Thanks in advance Darrin Dowell None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: Log outgoing/incoming messages w/ Client Handler
Programatically it would look like: java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); Should help googling. iksrazal --- Dowell, Darrin [EMAIL PROTECTED] wrote: I have the Axis generated client code (using WSDL2Java) and I'd like to use an Axis handler to intercept request/response messages to log them. Static void main(String[] args){ MyServiceLocator serviceLocator = new MyServiceLocator(); serviceLocator.setServiceSoapEndpointAddress(http://myservice.com/;); port = serviceLocator.getMyServiceSoap(); String response = getPort().getLeadList(request); } Is there a way to extend one of the Axis classes to log my messages? I don't have the option of doing JaxRPC or using the WSDD file option. I'm looking for how to code the handler to log the message and how to tie the handler into my calling of the service above. Thanks in advance Darrin Dowell None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: [AXIS2] Anyone using spring with axis2 ?
Thanks for the reply Saminda - this is what I need and I'm going to try and use it. However, this code does not seem to be in the current subversion trunk. Anyone know why? iksrazal --- Saminda Abeyruwan [EMAIL PROTECTED] wrote: Hi Iksrazal, Paul Fremantle has done a greate work in integrating Spring framework to Axis2. You can find more info in http://marc.theaimsgroup.com/?l=axis-devm=112866697704950w=2 Saminda trebor iksrazal wrote: Hi all, We have an app that uses the Spring framework. We now need to have web services with axis2 v .92 - particularly based off of the EchoNonBlockingDualClient example in the axis2 user guide. Question: Can anyone point me to examples or documentation using Axis2 with Spring? Googling didn't turn up much. iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
[AXIS2] Anyone using spring with axis2 ?
Hi all, We have an app that uses the Spring framework. We now need to have web services with axis2 v .92 - particularly based off of the EchoNonBlockingDualClient example in the axis2 user guide. Question: Can anyone point me to examples or documentation using Axis2 with Spring? Googling didn't turn up much. iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: Need Design help for ComplextTypes to ActionForms please...anyone?
You don't control the wsdl, the web services are seemingly in cobol, and you have struts ActionForms using them. And you're wondering why no one is helping you ? ;-) I'd try and look at this from an OO and design patterns standpoint instead. There's essentially nothing you can do with the generated code if you don't control the wsdl, but what you can do if be creative on how you use the objects and methods created by the wsdl. Off the top of my head: 1) Use the adapter pattern - does the right thing with the wrong interface. 2) Use delegates - an alternative to 'extends' . 3) You want to favor composition over inheritance anyways, so you can create new objects which contain your complex objects. 4) Think about applying the bridge pattern - extending an existing product without changing it. HTH, iksrazal --- Mick Knutson [EMAIL PROTECTED] wrote: I don't control the wsdl. I also do not like the ComplexTypes that are generated. They exist because of Cobol requires certain structure, and I need the structures more flattened. So, if there was a way to make the generated files extend or implement an Abstract Class or Interface? If I use an Abstract Class I can have a utility method that will convert the Complex SubType into data members on my DTO's/ActionForms. I am just trying to solve this: This works fine: EnrollType.commonEnrollmentId == Consumer.commonEnrollmentId With this: BeanUtils.copyProperties(EnrollType, Consumer); Then when the wsdl changes to this: EnrollType.customerReferenceNumber != Consumer.commonEnrollmentId This does NOT work: BeanUtils.copyProperties(EnrollType, Consumer); So without a way to have an extends or interface break at compile time, many changes like this go unoticed for some time, and dismissed as bad data in the DB. Thank You Mick Knutson Sr. Java/J2EE Consultant BASE logic, inc. (415) 648-1804 (S.F., CA) http://www.BASELogic.com HP Consulting Services (Walnut Creek, CA) From: trebor iksrazal [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: Need Design help for ComplextTypes to ActionForms please...anyone? Date: Wed, 19 Oct 2005 12:56:31 -0700 (PDT) Try seperating the Struts issues out of your question and make it more of a wsdl and complex types question. Maybe you have a front end to these web services but thats not really a web services question, unless its a special case. Furthermore, I don't really understand the question. With 'extension base' an WSDL can have super and sub-types, and it is common simply to have a delegate that mirrors the web service, doing the transactions and so forth. Beyond that, if your passing objects I don't understand why its burdensome to change the wsdl on those objects. Try to focus your question down a bit and maybe I can help. iksrazal --- Mick Knutson [EMAIL PROTECTED] wrote: Ok, I have sent many emails about an issue I an having designing a solution for my wsdl2java files. I would really hope someone will respond to this issue as nobody has done so before! I have a wsdl that is managed and generated by a different group than mine. This wsdl has many complex types within complex types for each service. Thus I get composite objects being generated, and we use a flattened version of these objects in our Struts UI. But Currently, we create an ActionForm and an interface that Mirrors the ComplextType that was generated, but has additional fields for the fields. Like I have a micrType that is an RTN and BankAccount, and my Action form just has RTN and BankAccount instead of micrType So, if I can't have the wsdl define Parent Abstract Classes for these types, What am I suppose to do to keep some type of interface between my ActionForms and my ComplextTypes? Besides going through by hand each time there is an update and making changes by hand, then having to verify by hand that the changes get reflected in my ActionForms? I find it hard to believe I am the only person with this issue, yet I feel this way as I have sent 4-6 messages over the past 1.5 months and have gotten zero response. Thank You Mick Knutson Sr. Java/J2EE Consultant BASE logic, inc. (415) 648-1804 (S.F., CA) http://www.BASELogic.com HP Consulting Services (Walnut Creek, CA) None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
Re: Axis 1.2 handlers
The Handler interface requires that you implement handleRequest and handleResponse, plus a few others, but you can leave the implementation blank on either if not desired. HTH, iksrazal --- Johan Walters [EMAIL PROTECTED] wrote: About these programmatically created handlers -- do they appear in both the request and response flow? Would it also be possible to add a handler to just the request or reponse flow? Johan 2005/10/18, trebor iksrazal [EMAIL PROTECTED]: Don't At least one other way is via the HandlerRegistry, like so: //add ClientHandler to chain of events java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); ClientHandler in this case simply implements Handler . On the client side no wsdd necessary. HTH, iksrazal --- Flores, Raul [EMAIL PROTECTED] wrote: I found the following in this article: http://www.fawcette.com/javapro/2003_04/online/wsdl_kjones_04_29_03/defa ult_pf.aspx From above article: To create an Axis client that uses simple sessions, you need to configure the Axis client-side framework to use the handler. The procedure is similar to that for the server, but instead of deploying to the server, the config file is created locally. You do this by running the org.apache.axis.utils.Admin application. You run the code like this: org.apache.axis.utils.Admin client deploy.wsdd Once you have a client-config.wsdd, you can configure the handler section same as for the server side. Raul -Original Message- From: Coyne, Jimmy [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 11:45 AM To: 'axis-user@ws.apache.org' Subject: Axis 1.2 handlers Hi all, Could any body show me some information on how to configure handlers on the axis client side ? Did a search on google , but came up with nothing . Thanks Jimmy None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
Re: [AXIS2] NonBlockingDualClient hangs forever - RESOLVED
That was quick - but I'm not sure it should work this way: I had an outdated aar - the signature name of the web service did not match the name in services.xml . After: call.invokeNonBlocking(rcExecute, payload, callback); it then hangs forever here: while (!callback.isComplete()) { Thread.sleep(1000); } Seems that if the first arg to invokeNonBlocking does not exist, it hangs. Hope that helps someone, iksrazal --- trebor iksrazal [EMAIL PROTECTED] wrote: Hi all, I'm trying to write a NonBlockingDual transport web service based off of the userguide/example1/MyService example. I can execute this example fine using tomcat. When excecuting my NonBlockingDual client - only changing the name and using my own aar, it hangs forever. Setting DEBUG mode, the axis.log produces one clue: 52892 INFO [http-8080-Processor25] (DeploymentEngine.java:608) - Deployment WS Name RCService.aar 53320 INFO [http-8080-Processor25] (ConfigurationContextFactory.java:67) - writing aborted; java.io.NotSerializableException: org.apache.axis2.soap.impl.llom.SOAPEnvelopeImpl However, the happy axis page shows my web service. Below is my config, please help: /RCService.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml ./com ./com/whitezone ./com/whitezone/RCService.class services.xml : service name=RCService description Execute Radio Commander asynchronsouly by demand /description parameter name=ServiceClass locked=falsecom.whitezone.RCService/parameter operation name=rcExecute messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation /service ackage com.whitezone; import org.apache.axis2.AxisFault; import org.apache.axis2.om.OMElement; import javax.xml.stream.XMLStreamException; public class RCService { public OMElement rcExecute(OMElement element) throws XMLStreamException { //Preparing the OMElement so that it can be attached to another OM Tree. //First the OMElement should be completely build in case it is not fully built and still //some of the xml is in the stream. element.build(); System.out.println(AXIS2 Rocks!); //Secondly the OMElement should be detached from the current OMTree so that it can be attached //some other OM Tree. Once detached the OmTree will remove its connections to this OMElement. element.detach(); return element; } } package com.whitezone; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.clientapi.AsyncResult; import org.apache.axis2.clientapi.Call; import org.apache.axis2.clientapi.Callback; import org.apache.axis2.om.OMElement; import javax.xml.namespace.QName; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import java.io.StringWriter; /** * Sample for asynchronous dual channel non-blocking service invocation. * Message Exchage Pattern IN-OUT * Ulitmate asynchronous service invocation sample. */ public class RCServiceClient { private static EndpointReference targetEPR = new EndpointReference(http://127.0.0.1:8080/axis2/services/RCService;); public static void main(String[] args) { try { OMElement payload = ClientUtil.getEchoOMElement(); Call call = new Call(); call.setTo(targetEPR); //The boolean flag informs the axis2 engine to use two separate transport connection //to retrieve the response. call.engageModule(new QName(Constants.MODULE_ADDRESSING)); call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, true); //Callback to handle the response Callback callback = new Callback() { public void onComplete(AsyncResult result) { try { System.out.println(inside onComplete...); StringWriter writer = new StringWriter(); result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance() .createXMLStreamWriter(writer)); writer.flush(); System.out.println(writer.toString()); } catch (XMLStreamException e) { reportError(e); } } public void reportError(Exception e) { e.printStackTrace(); } }; //Non-Blocking Invocation call.invokeNonBlocking(rcExecute, payload, callback); //Wait till the callback receives the response. System.out.println
RE: Axis 1.2 handlers
Try putting activation.jar and mail.jar in your servlet container. --- JR Ruggentaler [EMAIL PROTECTED] wrote: I modifier DynamicInvoker public HashMap invokeMethod( String operationName, String portName, String[] args) throws Exception { String serviceNS = null; String serviceName = null; String operationQName = null; System.out.println(Preparing Axis dynamic invocation); Service service = selectService(serviceNS, serviceName); Operation operation = null; org.apache.axis.client.Service dpf = new org.apache.axis.client.Service(wsdlParser, service.getQName()); Vector inputs = new Vector(); Port port = selectPort(service.getPorts(), portName); if (portName == null) { portName = port.getName(); } // Add handler HandlerRegistry hr = dpf.getHandlerRegistry(); List handlers = hr.getHandlerChain(QName.valueOf(portName)); handlers.add(new HandlerInfo(SimpleSessionHandler.class, new HashMap(), null)); to add the SimpleSessionHandler but this caused the following exception: Reading WSDL document from 'http://localhost:/cgi-bin/WebObjects/MohawkWebService.woa/ws/.MohawkWS?wsdl' - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. Preparing Axis dynamic invocation Executing operation getFilters with parameters: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.handlers.HandlerChainImpl.newHandler(HandlerChainImpl.java:247) at org.apache.axis.handlers.HandlerChainImpl.lt;initgt;(HandlerChainImpl.java:77) at org.apache.axis.handlers.HandlerInfoChainFactory.createHandlerChain(HandlerInfoChainFactory.java:42) at org.apache.axis.client.AxisClient.getJAXRPChandlerChain(AxisClient.java:274) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:140) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java:104) {http://xml.apache.org/axis/}hostname:stpauligirl javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java:104) Caused by: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.handlers.HandlerChainImpl.newHandler(HandlerChainImpl.java:247) at org.apache.axis.handlers.HandlerChainImpl.init(HandlerChainImpl.java:77) at org.apache.axis.handlers.HandlerInfoChainFactory.createHandlerChain(HandlerInfoChainFactory.java:42) at org.apache.axis.client.AxisClient.getJAXRPChandlerChain(AxisClient.java:274) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:140) ... 7 more Exception in thread main Any idea why? Thanks! J.R. -Original Message- From: trebor iksrazal [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 2:25 PM To: axis-user@ws.apache.org Subject: RE: Axis 1.2 handlers Don't At least one other way is via the HandlerRegistry, like so: //add ClientHandler to chain of events java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); ClientHandler in this case simply implements Handler . On the client side no wsdd necessary. HTH, iksrazal --- Flores, Raul [EMAIL PROTECTED] wrote
RE: Axis 1.2 handlers
Try putting activation.jar and mail.jar in your servlet container. --- JR Ruggentaler [EMAIL PROTECTED] wrote: I modifier DynamicInvoker public HashMap invokeMethod( String operationName, String portName, String[] args) throws Exception { String serviceNS = null; String serviceName = null; String operationQName = null; System.out.println(Preparing Axis dynamic invocation); Service service = selectService(serviceNS, serviceName); Operation operation = null; org.apache.axis.client.Service dpf = new org.apache.axis.client.Service(wsdlParser, service.getQName()); Vector inputs = new Vector(); Port port = selectPort(service.getPorts(), portName); if (portName == null) { portName = port.getName(); } // Add handler HandlerRegistry hr = dpf.getHandlerRegistry(); List handlers = hr.getHandlerChain(QName.valueOf(portName)); handlers.add(new HandlerInfo(SimpleSessionHandler.class, new HashMap(), null)); to add the SimpleSessionHandler but this caused the following exception: Reading WSDL document from 'http://localhost:/cgi-bin/WebObjects/MohawkWebService.woa/ws/.MohawkWS?wsdl' - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. Preparing Axis dynamic invocation Executing operation getFilters with parameters: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.handlers.HandlerChainImpl.newHandler(HandlerChainImpl.java:247) at org.apache.axis.handlers.HandlerChainImpl.lt;initgt;(HandlerChainImpl.java:77) at org.apache.axis.handlers.HandlerInfoChainFactory.createHandlerChain(HandlerInfoChainFactory.java:42) at org.apache.axis.client.AxisClient.getJAXRPChandlerChain(AxisClient.java:274) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:140) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java:104) {http://xml.apache.org/axis/}hostname:stpauligirl javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java:104) Caused by: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.handlers.HandlerChainImpl.newHandler(HandlerChainImpl.java:247) at org.apache.axis.handlers.HandlerChainImpl.init(HandlerChainImpl.java:77) at org.apache.axis.handlers.HandlerInfoChainFactory.createHandlerChain(HandlerInfoChainFactory.java:42) at org.apache.axis.client.AxisClient.getJAXRPChandlerChain(AxisClient.java:274) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:140) ... 7 more Exception in thread main Any idea why? Thanks! J.R. -Original Message- From: trebor iksrazal [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 2:25 PM To: axis-user@ws.apache.org Subject: RE: Axis 1.2 handlers Don't At least one other way is via the HandlerRegistry, like so: //add ClientHandler to chain of events java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); ClientHandler in this case simply implements Handler . On the client side no wsdd necessary. HTH, iksrazal --- Flores, Raul [EMAIL PROTECTED] wrote
RE: Axis 1.2 handlers
Try googling on this error - its a common one that has nothing to do with handlers. My guess is that its really not in your client classpath. If you're able try executing the client with ant, which does a good job of resolving this type of stuff. Otherwise i'd double check your classpath very carefully. --- JR Ruggentaler [EMAIL PROTECTED] wrote: The server side is a Apple WebObjects application so I added activation.jar and mail.jar to the classpath and restarted the server. I also added activation.jar and mail.jar to the client classpath. I reran the client and it threw the same exception. The exception is actually from the client. The client works fine without the changes to add the SimpleSessionHandler but throws the previously posted exception when I add the SimpleSessionHandler. My real goal it to add a custom handler to manage sessions in a WebObjects compatible manner. WebObjects uses several cookies in the HTTP headers to communicate session info for state management. J.R. -Original Message- From: trebor iksrazal [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 19, 2005 11:15 AM To: axis-user@ws.apache.org Subject: RE: Axis 1.2 handlers Try putting activation.jar and mail.jar in your servlet container. --- JR Ruggentaler [EMAIL PROTECTED] wrote: I modifier DynamicInvoker public HashMap invokeMethod( String operationName, String portName, String[] args) throws Exception { String serviceNS = null; String serviceName = null; String operationQName = null; System.out.println(Preparing Axis dynamic invocation); Service service = selectService(serviceNS, serviceName); Operation operation = null; org.apache.axis.client.Service dpf = new org.apache.axis.client.Service(wsdlParser, service.getQName()); Vector inputs = new Vector(); Port port = selectPort(service.getPorts(), portName); if (portName == null) { portName = port.getName(); } // Add handler HandlerRegistry hr = dpf.getHandlerRegistry(); List handlers = hr.getHandlerChain(QName.valueOf(portName)); handlers.add(new HandlerInfo(SimpleSessionHandler.class, new HashMap(), null)); to add the SimpleSessionHandler but this caused the following exception: Reading WSDL document from 'http://localhost:/cgi-bin/WebObjects/MohawkWebService.woa/ws/.MohawkWS?wsdl' - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. Preparing Axis dynamic invocation Executing operation getFilters with parameters: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.handlers.HandlerChainImpl.newHandler(HandlerChainImpl.java:247) at org.apache.axis.handlers.HandlerChainImpl.lt;initgt;(HandlerChainImpl.java:77) at org.apache.axis.handlers.HandlerInfoChainFactory.createHandlerChain(HandlerInfoChainFactory.java:42) at org.apache.axis.client.AxisClient.getJAXRPChandlerChain(AxisClient.java:274) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:140) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java:104) {http://xml.apache.org/axis/}hostname:stpauligirl javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.mpv.wsclient.Mohawk.DynamicInvoker.invokeMethod(DynamicInvoker.java:239) at com.mpv.wsclient.Mohawk.DynamicInvoker.main(DynamicInvoker.java
RE: Axis 1.2 handlers
; } catch (Exception ex) { String messageText = Messages.getMessage(NoJAXRPCHandler00, handlerInfo.getHandlerClass().toString()); throw new JAXRPCException(messageText, ex); } } The call to neInstance() above casts the result to javax.xml.rpc.handler.Handler but SimpleSessionHandler does not implement javax.xml.rpc.handler.Handler interface. It implements org.apache.axis.Handler and is a subclass of org.apache.axis.handlers.BasicHandler. I must be installing the handler in the wrong object. Any idea how I can install the SimpleSessionHandler using the code from DynamicInvoker class in the axis examples via code? Debugger info: System.getProperty(java.class.path) C:\eclipse3\utilities\MohawkWebClient\bin;C:\eclipse3\utilities\MohawkWebClient\lib\axis.jar;C:\eclipse3\utilities\MohawkWebClient\lib\axis-ant.jar;C:\eclipse3\utilities\MohawkWebClient\lib\commons-discovery-0.2.jar;C:\eclipse3\utilities\MohawkWebClient\lib\commons-logging-1.0.4.jar;C:\eclipse3\utilities\MohawkWebClient\lib\jaxrpc.jar;C:\eclipse3\utilities\MohawkWebClient\lib\log4j-1.2.8.jar;C:\eclipse3\utilities\MohawkWebClient\lib\saaj.jar;C:\eclipse3\utilities\MohawkWebClient\lib\wsdl4j-1.5.1.jar;C:\eclipse3\utilities\MohawkWebClient\lib\activation.jar;C:\eclipse3\utilities\MohawkWebClient\lib\mail.jar J.R. -Original Message- From: trebor iksrazal [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 19, 2005 12:13 PM To: axis-user@ws.apache.org Subject: RE: Axis 1.2 handlers Try googling on this error - its a common one that has nothing to do with handlers. My guess is that its really not in your client classpath. If you're able try executing the client with ant, which does a good job of resolving this type of stuff. Otherwise i'd double check your classpath very carefully. --- JR Ruggentaler [EMAIL PROTECTED] wrote: The server side is a Apple WebObjects application so I added activation.jar and mail.jar to the classpath and restarted the server. I also added activation.jar and mail.jar to the client classpath. I reran the client and it threw the same exception. The exception is actually from the client. The client works fine without the changes to add the SimpleSessionHandler but throws the previously posted exception when I add the SimpleSessionHandler. My real goal it to add a custom handler to manage sessions in a WebObjects compatible manner. WebObjects uses several cookies in the HTTP headers to communicate session info for state management. J.R. -Original Message- From: trebor iksrazal [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 19, 2005 11:15 AM To: axis-user@ws.apache.org Subject: RE: Axis 1.2 handlers Try putting activation.jar and mail.jar in your servlet container. --- JR Ruggentaler [EMAIL PROTECTED] wrote: I modifier DynamicInvoker public HashMap invokeMethod( String operationName, String portName, String[] args) throws Exception { String serviceNS = null; String serviceName = null; String operationQName = null; System.out.println(Preparing Axis dynamic invocation); Service service = selectService(serviceNS, serviceName); Operation operation = null; org.apache.axis.client.Service dpf = new org.apache.axis.client.Service(wsdlParser, service.getQName()); Vector inputs = new Vector(); Port port = selectPort(service.getPorts(), portName); if (portName == null) { portName = port.getName(); } // Add handler HandlerRegistry hr = dpf.getHandlerRegistry(); List handlers = hr.getHandlerChain(QName.valueOf(portName)); handlers.add(new HandlerInfo(SimpleSessionHandler.class, new HashMap(), null)); to add the SimpleSessionHandler but this caused the following exception: Reading WSDL document from 'http://localhost:/cgi-bin/WebObjects/MohawkWebService.woa/ws/.MohawkWS?wsdl' - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. Preparing Axis dynamic invocation Executing operation getFilters with parameters: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Unable to create handler of type class org.apache.axis.handlers.SimpleSessionHandler
Re: Need Design help for ComplextTypes to ActionForms please...anyone?
Try seperating the Struts issues out of your question and make it more of a wsdl and complex types question. Maybe you have a front end to these web services but thats not really a web services question, unless its a special case. Furthermore, I don't really understand the question. With 'extension base' an WSDL can have super and sub-types, and it is common simply to have a delegate that mirrors the web service, doing the transactions and so forth. Beyond that, if your passing objects I don't understand why its burdensome to change the wsdl on those objects. Try to focus your question down a bit and maybe I can help. iksrazal --- Mick Knutson [EMAIL PROTECTED] wrote: Ok, I have sent many emails about an issue I an having designing a solution for my wsdl2java files. I would really hope someone will respond to this issue as nobody has done so before! I have a wsdl that is managed and generated by a different group than mine. This wsdl has many complex types within complex types for each service. Thus I get composite objects being generated, and we use a flattened version of these objects in our Struts UI. But Currently, we create an ActionForm and an interface that Mirrors the ComplextType that was generated, but has additional fields for the fields. Like I have a micrType that is an RTN and BankAccount, and my Action form just has RTN and BankAccount instead of micrType So, if I can't have the wsdl define Parent Abstract Classes for these types, What am I suppose to do to keep some type of interface between my ActionForms and my ComplextTypes? Besides going through by hand each time there is an update and making changes by hand, then having to verify by hand that the changes get reflected in my ActionForms? I find it hard to believe I am the only person with this issue, yet I feel this way as I have sent 4-6 messages over the past 1.5 months and have gotten zero response. Thank You Mick Knutson Sr. Java/J2EE Consultant BASE logic, inc. (415) 648-1804 (S.F., CA) http://www.BASELogic.com HP Consulting Services (Walnut Creek, CA) None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
[AXIS2] WSDL2Java ant task?
Hi all, I'm migrating to Axis 2 and when trying to execute my ant wsdl2java task, I get: taskdef A class needed by class org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found: org/apache/axis/utils/DefaultAuthenticator Googling didn't turn up anything for an ant task for WSDL2Java and AXIS2. Seemingly the axis2 does not come with a new jar for Wsdl2javaAntTask. Any ideas? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
Re: can any one tell me .jar file required org.apache.axis.constans.style
Here's a site for you: http://www.jarhoo.com/ org.apache.axis.constans.style is in the main axis.jar . ArraySoapBindingStub probably is your own. Suggest verifying you have followed the user guide and have the required jars installed. HTH, iksrazal --- aditya mandlekar [EMAIL PROTECTED] wrote: hello freinds, i ahave posted mail before this .. i am trying to develop a web service using deploy.wsdd for client send array of string to service ... service simply returns array of string i am getting client also complied ,but at run time i am getting error: java.lang.NoClassDefFoundError: Array/ws/ArraySoapBindingStub at Array.ws.ArrayServiceLocator.getArray(ArrayServiceLocator.java:55) at Array.ws.ArrayServiceLocator.getArray(ArrayServiceLocator.java:50) at Array.ws.ArrayTester.main(ArrayTester.java:9) Exception in thread main case is that the ArraySoapBindingStub class is not getting compled ... i m also attaching .wsdl and .wsdd genrated..can any one tell me modifcations needed eigther to .wsdd/.wsdl or to ArraySoapBindingStub ArraySoapBindingStub.java:33: package org.apache.axis.constants does not exist oper.setStyle(org.apache.axis.constants.Style.RPC); ^ ArraySoapBindingStub.java:34: package org.apache.axis.constants does not exist oper.setUse(org.apache.axis.constants.Use.ENCODED); ^ ArraySoapBindingStub.java:54: cannot resolve symbol symbol : method setTypeMappingVersion (java.lang.String) location: class org.apache.axis.client.Service ((org.apache.axis.client.Service)super.service).setTypeMappingVersion(1.2); ^ ArraySoapBindingStub.java:66: cannot resolve symbol symbol : class SimpleListSerializerFactory location: package ser java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; ^ ArraySoapBindingStub.java:67: cannot resolve symbol symbol : class SimpleListDeserializerFactory location: package ser java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; ^ ArraySoapBindingStub.java:74: cannot resolve symbol symbol : constructor ArraySerializerFactory (javax.xml.namespace.QName,javax.xml.namespace.QName) location: class org.apache.axis.encoding.ser.ArraySerializerFactory cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2)); ^ ArraySoapBindingStub.java:81: cannot resolve symbol symbol : method _createCall () location: class org.apache.axis.client.Stub org.apache.axis.client.Call _call = super._createCall(); ^ 7 errors - Yahoo! Music Unlimited - Access over 1 million songs. Try it free. None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
RE: Axis 1.2 handlers
Don't At least one other way is via the HandlerRegistry, like so: //add ClientHandler to chain of events java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); ClientHandler in this case simply implements Handler . On the client side no wsdd necessary. HTH, iksrazal --- Flores, Raul [EMAIL PROTECTED] wrote: I found the following in this article: http://www.fawcette.com/javapro/2003_04/online/wsdl_kjones_04_29_03/defa ult_pf.aspx From above article: To create an Axis client that uses simple sessions, you need to configure the Axis client-side framework to use the handler. The procedure is similar to that for the server, but instead of deploying to the server, the config file is created locally. You do this by running the org.apache.axis.utils.Admin application. You run the code like this: org.apache.axis.utils.Admin client deploy.wsdd Once you have a client-config.wsdd, you can configure the handler section same as for the server side. Raul -Original Message- From: Coyne, Jimmy [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 11:45 AM To: 'axis-user@ws.apache.org' Subject: Axis 1.2 handlers Hi all, Could any body show me some information on how to configure handlers on the axis client side ? Did a search on google , but came up with nothing . Thanks Jimmy None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
Re: What's the better way to exchange XML?
Oi fabricio, tudo bem? The way I usually do it - rpc wise so I'm a bit dated - is just send and return the xml off as a String: String retXml = (String) call.invoke( new Object[] { myXml } ); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setIgnoringElementContentWhitespace(false); DocumentBuilder builder = factory.newDocumentBuilder(); InputSource isXml = new InputSource (new StringReader(retXml)); Document doc = builder.parse(isXml); HTH (Hope that helps), iksrazal --- [EMAIL PROTECTED] wrote: Hello all again, I need now to pass XML files between Web services. I'm thinking to use DOM Documents, so my web service method would be (Test): public Document mirrorMethod(Document doc){ return doc; } And in my client I'm calling the service: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document documentXML = builder.parse(myXML.xml); System.out.println(documentXML.getChildNodes().getLength()); String urlWS = http://localhost:8080/axis/services/XMLService;; Object[] params = {documentXML}; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(urlWS); call.setOperationName(doFilter); Document saida = (Document) call.invoke(params); System.out.print(saida.getChildNodes().getLength()); If you see my client I should print the same values of getChildNodes().getLength(), but it isn't happening. My service return is always 'null'. Does anyone could identify why this isn't working? Is DOM Document the better way to send and receive a XML file to a web service? Thanks a lot for all help. Fabrício. This message was sent using IMP, the Internet Messaging Program. None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
Inheritance issue with WDSL2Java - ok with wscompile
Hi all, I just finished project using JWSDP and I'm starting a new one using Axis :-) . I know axis well from other projects. I have this WSDL, which I would like to use in my new project: complexType name=ReturnWeb_Base sequence element name=errorMessage type=string/ element name=successErrorCode type=int//sequence/complexType complexType name=ReturnWeb_Login complexContent extension base=tns:ReturnWeb_Base sequence element name=SOAP_Session_id type=string/ element name=web_user_name type=string//sequence/extension/complexContent/complexType The purpose of this is that all web services will have ReturnWeb_Base - and some will return more values. The above returns a few additonal values as shown. This is my constructor as it works with wscompile: return new ReturnWeb_Login ( Messages_Codes.get(successErrorCode), successErrorCode.intValue(), soap_session_id, web_user_name); However, with WDSL2Java, the generated constructor only accepts two strings: public ReturnWeb_Login( java.lang.String SOAP_Session_id, java.lang.String web_user_name) { this.SOAP_Session_id = SOAP_Session_id; this.web_user_name = web_user_name; } The wscompile generated constructor is: public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) { this.errorMessage = errorMessage; this.successErrorCode = successErrorCode; this.SOAP_Session_id = SOAP_Session_id; this.web_user_name = web_user_name; } My ant task is as follows: axis-wsdl2java output=resources verbose=true url=resources/CallCentreWebService.wsdl namespacemappingfile=resources/CallCentreWeb_Mapping.xml mapping namespace=http://com/hostedtelecom/callcentreweb; package=com.hostedtelecom.callcentreweb.endpoint / /axis-wsdl2java Any ideas? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Re: Change the Port that Axis Service runs as
Hi all, I just subscribed to the list, so I'm replying to James. Is the goal running two seperate web services in the same servlet container? It seems you are using the same configuration for both web services. At least one way to solve it - if I understand the problem correctly - is two have seperate .wsdd files, each with a different urn. If that doesn work or is not your problem, try posting each .wsdd file and the exact stackTrace. HTH, iksrazal --- James Wilson [EMAIL PROTECTED] wrote: I haven't been using Axis all that long either. However I don't think Axis itself can run on a port. Thus the application fighting over port 8080 would be your servlet container. Are you starting Tomcat via an Eclipse plugin? hope it helps, james Quoting J H [EMAIL PROTECTED]: Hi Everyone. This is my first time e-mailing this list, because the documentation out there for this project has been fantastic! (Thanks to the Axis and Eclipse participants). I have built a self-contained web application (service) that implements the Axis libraries. I have another webapplication that I would like to be able to run on the same application server that talks to this custom axis service to send messages back and forth to my client. It seems that the two applications are fighting over the default port 8080. I have confirmed this by installing the 2 webservices on different machines, and the solution works great. I know it must be a simple solution, but I can't find out anywhere how to change the port that Axis runs as. Thanks! Jeff None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Inheritance issue with WDSL2Java - ok with wscompile
Yes, I am running Axis 1.2.1 . I will write a simple test case and submit via JIRA today. Regards, iksrazal --- Davanum Srinivas [EMAIL PROTECTED] wrote: Please log a bug and upload your wsdl. Are u using Axis 1.2.1? thanks, dims On 8/4/05, trebor iksrazal [EMAIL PROTECTED] wrote: Hi all, I just finished project using JWSDP and I'm starting a new one using Axis :-) . I know axis well from other projects. I have this WSDL, which I would like to use in my new project: complexType name=ReturnWeb_Base sequence element name=errorMessage type=string/ element name=successErrorCode type=int//sequence/complexType complexType name=ReturnWeb_Login complexContent extension base=tns:ReturnWeb_Base sequence element name=SOAP_Session_id type=string/ element name=web_user_name type=string//sequence/extension/complexContent/complexType The purpose of this is that all web services will have ReturnWeb_Base - and some will return more values. The above returns a few additonal values as shown. This is my constructor as it works with wscompile: return new ReturnWeb_Login ( Messages_Codes.get(successErrorCode), successErrorCode.intValue(), soap_session_id, web_user_name); However, with WDSL2Java, the generated constructor only accepts two strings: public ReturnWeb_Login( java.lang.String SOAP_Session_id, java.lang.String web_user_name) { this.SOAP_Session_id = SOAP_Session_id; this.web_user_name = web_user_name; } The wscompile generated constructor is: public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) { this.errorMessage = errorMessage; this.successErrorCode = successErrorCode; this.SOAP_Session_id = SOAP_Session_id; this.web_user_name = web_user_name; } My ant task is as follows: axis-wsdl2java output=resources verbose=true url=resources/CallCentreWebService.wsdl namespacemappingfile=resources/CallCentreWeb_Mapping.xml mapping namespace=http://com/hostedtelecom/callcentreweb; package=com.hostedtelecom.callcentreweb.endpoint / /axis-wsdl2java Any ideas? iksrazal None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs -- Davanum Srinivas -http://blogs.cocoondev.org/dims/ None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs