int values lost
Hi! I updated Axis from 1.2 to 1.4 and now I can't use a couple of web-service that have a int as first argument. The webservice-call doesn't fail but the int-value is always one. I have debugged my code and as far as I can follow it do what it should but the reciving server only recives a 0 (zero). java -cp activation.jar:axis.jar:commons-logging-1.0.4.jar:mailapi.jar:commons-discovery-0.2.jar:wsdl4j-1.5.1.jar:jaxrpc.jar:saaj.jar org.apache.axis.wsdl.WSDL2Java and those libraries are available at the client that uses the stubs. I'm guessing that I have some kind of versioning-problem in the library (.jar) but I have no idea of how to figure out wich one it could be. How to find out what's wrong. Thanks in advance Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: int values lost
Thanks for your answer! Is this something I can set with the WSDL2Java-app or do I have to do this when the stubs?? Best regards Roland Walker, Jeff skrev: Roland, I noticed your using soap encoding in your wsdl. Can you switch to literal? (I'm guessing there will be precious few bug fixes in the soap encoding parts of Axis 1.2/1.4 if this turns out to be an Axis error, which I doubt). It just isn't popular anymore. I can't help much. I don't know 4D and I also don't know how to force the stub to use strings all the time. (I actually don't think you can). The only suggestion I can make is to switch from soap encoding to literal, and also adopt document vs. rpc, then try again. Perhaps one of the Axis developers can help you better than I? Ann? -jeff -----Original Message- From: Roland Carlsson [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 5:57 AM To: axis-user@ws.apache.org Subject: Re: int values lost Hi! I have checked the version and it's 1.4. I have removed some redundat libraries. But it wasn't the way to success. When I change the files generated by WSDL2Java I can get values to the server by changing the datatype from int to String but that seems like a bad solution since I regenerate the stubs on regular basis. Is there a way to generate the stubs that perhaps could be more forgiving? All values as String, untyped etc etc? I append the wsdl that I use to generate the stubs from if there could be anything strange in that? It's from a 4D Server. (http://www.4d.com). Thanks in advance Roland Walker, Jeff skrev: Not sure if this helps, but you can call org.apache.axis.Version.getVersionText() to get the version of Axis you're running. I'm running Axis1.3 and they are the versions of the jars I have. I suggest you undeploy everything, copy 1.4 again, and start again with a clean deployment. -jeff -Original Message- From: Roland Carlsson [mailto:[EMAIL PROTECTED] Sent: Monday, July 02, 2007 4:56 PM To: axis-user@ws.apache.org Subject: int values lost Hi! I updated Axis from 1.2 to 1.4 and now I can't use a couple of web-service that have a int as first argument. The webservice-call doesn't fail but the int-value is always one. I have debugged my code and as far as I can follow it do what it should but the reciving server only recives a 0 (zero). java -cp activation.jar:axis.jar:commons-logging-1.0.4.jar:mailapi.jar:commons-di scovery-0.2.jar:wsdl4j-1.5.1.jar:jaxrpc.jar:saaj.jar org.apache.axis.wsdl.WSDL2Java and those libraries are available at the client that uses the stubs. I'm guessing that I have some kind of versioning-problem in the library (.jar) but I have no idea of how to figure out wich one it could be. How to find out what's wrong. Thanks in advance Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic stubs
Hi! Is it possible with Axis to create stubs "on-the-fly"? My motivation is that I have a (legacy) system that generate statistics that I can access through web-services. The number of web-services and their arguments changes quite often so it is quite inconvinient to have to rebuild the stubs and then rebuild my web-application and then deploy that. Perhaps there is another way to solve this problem with a constanly changing set of webservices that need to be correctly reflected into an application? If so I'm very interested in learning about that. Thank you very much Roland Carlsson
Re: Dynamic stubs
Thanks! It workes very well with the dynamic invocation of the webservices. I made a few alterations of the DynamicInvocation example (to be able to run it without the main-method) and it works like perfectly for our needs. Regards Roland Tom Oinn skrev: Roland Carlsson wrote: Hi! Is it possible with Axis to create stubs "on-the-fly"? You could potentially do this if you're familiar with writing custom classloaders - effectively you can use the WSDL2JAVA tool and then dynamically load the byte code in the generated class files. I don't think this is the best way to do this but it will work (the Triana project in the UK did this to cope with web services in workflows for example). The correct way to do this (in my opinion anyway) is to use the WSDL documents describing the web services directly rather than generating stub classes - it is entirely possible to invoke arbitrary services with complex types etc without having to go through any compilation stage at all, by the sounds of it your requirement is something like 'discover all services, invoke service to gather stats, do analysis' - the first part is up to you as is the analysis but you can do the invocation on the fly. There is a very simple dynamic invocation example in the axis code, the most obvious question you'll have from this example is 'what about complex types?'. In this context a complex type is anything that you would normally have to register a custom serializer for (this is the main thing the stub classes will do for you). If you're not compiling and loading classes on the fly you won't be able to access these types through java classes but that shouldn't really be a problem - soap is all about passing XML documents around so you should be able to intercept the xml representation of the return value and use it directly (this is what we do in our workflow engine when calling complex services). Our rather more complex dynamic invocation system is visible at http://cvs.sourceforge.net/viewcvs.py/taverna/taverna1.0/src/org/embl/ebi/escience/scuflworkers/wsdl/ with the WSDLBasedProcessor responsible for creating and configuring an axis call object from a WSDL document and the WSDLInvocationTask responsible for using this object to call the service. Yes, this is a lot of code for something that should be fairly simple, no, this is not my fault :) HTH, Tom