speed up build process
hello users, not long ago there was a thread Questions/suggestions on WSDL2C with the idea to have some improvements with building projects from the generated files. at this moment i hadn't a lot of time, but maybe now. i want to pick up these thoughts and discuss a possible process which can help to speed up development with axis2c. it was asked if there is something that generates a main method to test the code and somthing that generates makefiles for server and client. i think nearly everybody here who created a sevice not only once, goes through his personal same steps over and over again, to create a running project - waste of time ? what we have ? nearly nothing :-( the java project has an ant-build script, even when i personally didn't use it, it is helpfull. Dimuthu has an ruby script, that can generate a main method to run the client [1]. i have a skript that can't build makefiles, but vs-studio files [2]. ok, so fare, what i want you to tell me is, want are your personal steps, when you want to implement a service from a wsdl file ? lets take the well known [3] wsdl file my personal steps are : 1. have a batch file that generates client and server code in different folders 2. generate with [2] the vs files 3. create a vs-studio-project for the client by hand and also implement same basic logic for the main by hand k, this is windows specific, but the idea behind my generator could be used for other stuff as well the idea : have a generator that can read an input-file that holds some values needed for output, e.g path variables for include files. the generators logic is nothing more than first traverse the source-folders and gathering information and second to replace some marks in template files with this information - nothing more. i think with the input information and a simple replacement engine any kind of make-files or ide specific files can be done!? i tried to write a makefile for servercode [3], but i failed - i am not very familiar with this ... maybe someone can send me one for nmake ? k, somethink to think about 1. does anybody really needs this kind of generator, is it helpfull or just waste of time when i think of this ? 2. with what kind of languages the genearator should work, so that win and linux users profit ? -- i would prefer java, everyone has cause of wsdl2java 3. what exactly are the requirements, want would we exspect from this kind of tool ? i would be grateful to hear about your thoughts, maybe you can give me an imagination how you work. mfg derMark [1] http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb [2] www.9elements.com/dermark/axis2_vs_gen.zip [3] axis2c-svn\test\resources\wsdl\Calculator.wsdl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: speed up build process
+1 for your ideas. But i'm using a script which create the service and client code and compile both and deploy the service and run the client.But that is for Linux.With the script we only have to give the wsdl file name as a parameter and it does every thing.But it won't work with windows.If we use nmake to build the service and client it would be possible thing to write a shell script in Windows too. Regs Lahiru On Thu, 2008-02-14 at 00:45 +0100, Mark Nüßler wrote: hello users, not long ago there was a thread Questions/suggestions on WSDL2C with the idea to have some improvements with building projects from the generated files. at this moment i hadn't a lot of time, but maybe now. i want to pick up these thoughts and discuss a possible process which can help to speed up development with axis2c. it was asked if there is something that generates a main method to test the code and somthing that generates makefiles for server and client. i think nearly everybody here who created a sevice not only once, goes through his personal same steps over and over again, to create a running project - waste of time ? what we have ? nearly nothing :-( the java project has an ant-build script, even when i personally didn't use it, it is helpfull. Dimuthu has an ruby script, that can generate a main method to run the client [1]. i have a skript that can't build makefiles, but vs-studio files [2]. ok, so fare, what i want you to tell me is, want are your personal steps, when you want to implement a service from a wsdl file ? lets take the well known [3] wsdl file my personal steps are : 1. have a batch file that generates client and server code in different folders 2. generate with [2] the vs files 3. create a vs-studio-project for the client by hand and also implement same basic logic for the main by hand k, this is windows specific, but the idea behind my generator could be used for other stuff as well the idea : have a generator that can read an input-file that holds some values needed for output, e.g path variables for include files. the generators logic is nothing more than first traverse the source-folders and gathering information and second to replace some marks in template files with this information - nothing more. i think with the input information and a simple replacement engine any kind of make-files or ide specific files can be done!? i tried to write a makefile for servercode [3], but i failed - i am not very familiar with this ... maybe someone can send me one for nmake ? k, somethink to think about 1. does anybody really needs this kind of generator, is it helpfull or just waste of time when i think of this ? 2. with what kind of languages the genearator should work, so that win and linux users profit ? -- i would prefer java, everyone has cause of wsdl2java 3. what exactly are the requirements, want would we exspect from this kind of tool ? i would be grateful to hear about your thoughts, maybe you can give me an imagination how you work. mfg derMark [1] http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb [2] www.9elements.com/dermark/axis2_vs_gen.zip [3] axis2c-svn\test\resources\wsdl\Calculator.wsdl - 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]
Re: speed up build process
Hi Mark, Please see my inline comment. On Feb 14, 2008 5:15 AM, Mark Nüßler [EMAIL PROTECTED] wrote: hello users, not long ago there was a thread Questions/suggestions on WSDL2C with the idea to have some improvements with building projects from the generated files. at this moment i hadn't a lot of time, but maybe now. i want to pick up these thoughts and discuss a possible process which can help to speed up development with axis2c. it was asked if there is something that generates a main method to test the code and somthing that generates makefiles for server and client. i think nearly everybody here who created a sevice not only once, goes through his personal same steps over and over again, to create a running project - waste of time ? what we have ? nearly nothing :-( the java project has an ant-build script, even when i personally didn't use it, it is helpfull. Dimuthu has an ruby script, that can generate a main method to run the client [1]. i have a skript that can't build makefiles, but vs-studio files [2]. ok, so fare, what i want you to tell me is, want are your personal steps, when you want to implement a service from a wsdl file ? lets take the well known [3] wsdl file my personal steps are : 1. have a batch file that generates client and server code in different folders 2. generate with [2] the vs files 3. create a vs-studio-project for the client by hand and also implement same basic logic for the main by hand k, this is windows specific, but the idea behind my generator could be used for other stuff as well the idea : have a generator that can read an input-file that holds some values needed for output, e.g path variables for include files. the generators logic is nothing more than first traverse the source-folders and gathering information and second to replace some marks in template files with this information - nothing more. i think with the input information and a simple replacement engine any kind of make-files or ide specific files can be done!? i tried to write a makefile for servercode [3], but i failed - i am not very familiar with this ... maybe someone can send me one for nmake ? k, somethink to think about 1. does anybody really needs this kind of generator, is it helpfull or just waste of time when i think of this ? Yea definitely. we have to provide build scripts for at least both linux and windows. 2. with what kind of languages the genearator should work, so that win and linux users profit ? -- i would prefer java, everyone has cause of wsdl2java I too prefer to integrate this to WSDL2Java tool itself. Unfortunately we right now can't ask for an option to decide the OS. Because WSDL2Java tool dosn't have an interface for C code generation to add it s custom options, and java guys will not like to add a common option that will not relevant to them. So I think the best option is to put in the axis2/c distribution, BUt if it is a Java thing, I don't like to put it in a C distribution. 3. what exactly are the requirements, want would we exspect from this kind of tool ? 1. Generate build Scripts (both in linux and windows) 2. Generate some sample client, i.e. with some demonstration logic 3. Generate server. 4. Generate test case(s) i would be grateful to hear about your thoughts, maybe you can give me an imagination how you work. mfg derMark [1] http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb [2] www.9elements.com/dermark/axis2_vs_gen.zip [3] axis2c-svn\test\resources\wsdl\Calculator.wsdl - 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]
Re: [axis2] axis2 1.3 custom complex type problem
Hi, thanks for looking at this. I just tested it with nightly build and client request looks right now. But the values in server response are truncated. soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body ns:testHashtable2Response xmlns:ns=http://coaching.de; ns:return xmlns:ax21=http://errorhandling.base.de/xsd; xmlns:ax22=http://coaching.de/xsd; xmlns:ax23=http://vo.coaching.de/xsd; xmlns:ax24=http://util.java/xsd; xmlns:ax26=http://io.java/xsd; type=de.coaching.Hashtable ax22:keyValuePairs type=de.coaching.KeyValuePair ax22:keyTestStringKe/ax22:key ax22:valueTestStringVa/ax22:value /ax22:keyValuePairs ax22:keyValuePairs type=de.coaching.KeyValuePair ax22:key / ax22:value / /ax22:keyValuePairs ax22:keyValuePairs type=de.coaching.KeyValuePair ax22:keyStringKayForinte/ax22:key ax22:value / /ax22:keyValuePairs ax22:keyValuePairs type=de.coaching.KeyValuePair ax22:key / ax22:valueStringValueForIntege/ax22:value /ax22:keyValuePairs ax22:keyValuePairs type=de.coaching.KeyValuePair ax22:key / ax22:valueStringValueForIntege/ax22:value /ax22:keyValuePairs /ns:return /ns:testHashtable2Response /soapenv:Body Also on the server side i get javax.activation.DataHandler in my KeyValuePair's instead of the real objects. Ok, this is not really surprising because the complex type only defines anytype and the real type is not transported in soap request. Why isn't the type transported like for integers before the fix? Like this ax21:value type=java.lang.Integer/. Regards Original-Nachricht Datum: Tue, 12 Feb 2008 18:13:12 +0530 Von: Deepal jayasinghe [EMAIL PROTECTED] An: axis-user@ws.apache.org Betreff: Re: [axis2] axis2 1.3 custom complex type problem Hi , When I debug Axis2 with your scenario I found an issue in Axis2 , so I have fixed that and committed the change , you may try with nightly builds or wait for Axis2 1.4 Thanks Deepal Hi all, i have define a new class that has an member which is an array of KeyValuePair. Where KeyValuePair has two member of type object (key and value). WSDL is genereated as follows: xs:complexType name=Hashtable xs:sequence xs:element maxOccurs=unbounded minOccurs=0 name=keyValuePairs nillable=true type=ns2:KeyValuePair/ /xs:sequence /xs:complexType xs:complexType name=KeyValuePair xs:sequence xs:element minOccurs=0 name=key nillable=true type=xs:anyType/ xs:element minOccurs=0 name=value nillable=true type=xs:anyType/ /xs:sequence /xs:complexType Service class method: public Hashtable testHashtable2() { KeyValuePair[] keyValuePairs = new KeyValuePair[] { new KeyValuePair(TestStringKey, TestStringValue), new KeyValuePair(new Integer(1), new Integer(2)), new KeyValuePair(StringKayForinteger, new Integer(2)), new KeyValuePair(new Integer(1), StringValueForInteger), new KeyValuePair(new Integer(1), new String(StringValueForInteger)) }; return new Hashtable(keyValuePairs); } and SOAP Response: soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; soapenv:Body ns:testHashtable2Response xmlns:ns=http://coaching.de; ns:return type=de.coaching.Hashtable xmlns:ax22=http://vo.coaching.de/xsd; xmlns:ax23=http://io.java/xsd; xmlns:ax21=http://coaching.de/xsd; ax21:keyValuePairs type=de.coaching.KeyValuePair ax21:keyTestStringKey/ax21:key ax21:valueTestStringValue/ax21:value /ax21:keyValuePairs ax21:keyValuePairs type=de.coaching.KeyValuePair ax21:key type=java.lang.Integer/ ax21:value type=java.lang.Integer/
Re: Async requests killing network
On 13 Feb 2008, at 00:45, Martin Gainty wrote: I did'nt get an answer so Im reposting.. Is there a way to configure in NIO transport in axis2 *without* enabling the NIO connector in TC server.xml? Martin, if the NIO listener is not enabled in the configuration file you'll need to add it at runtime. Get the ListenerManager from the ConfigurationContext and then add the listener. Michele Thanks Martin- - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, February 11, 2008 8:06 AM Subject: Re: Async requests killing network I should point out you do this by commenting (the normal HTTP transport) and uncommenting (the NIO transport) in axis2.xml. Some users have also tried the Synapse 1.1.1/1.1.2 NIO HTTP transport which has a number of bugs fixed compared to the Axis2 version thereof. You need to grab the JAR file from Synapse and copy the right axis2.xml config from Synapse's axis2.xml. Paul On Feb 11, 2008 12:19 PM, Paul Fremantle [EMAIL PROTECTED] wrote: You might want to try this out using the NIO HTTP transport. It should scale better for this kind of behaviour. Paul On Feb 11, 2008 11:11 AM, Matthias Wermund [EMAIL PROTECTED] wrote: Hi, I'm having problems starting a big amount of async webservice requests via Axis2 client in short time. The requests are all started from the same Thread and should run parallel in only small amount. As you can see below, I start about 1000 * 5 = 5000 requests, but only a max of 2-5 are called parallel. For each dataset, a few information-requests are started parallel, but I ensure that each CallbackHandler has been finished, before requesting the informations for the next dataset. For the first several hundred requests this works fine, but after some time, my network (OS is Windows 2000) goes down, which means that the complete OS looses the connection to the local network. I guess this could be based in opening too much TCP connections or something like this, because if it affects the whole OS and not just my application, it has to be something with the network device or driver. So basically my question is: Is it ensured that the TCP connection is already closed when CallbackHandler.onError or CallbackHandler.onComplete is called? Or must I do this myself in any way? Do you have any other clue what might be the problem here? Thank you! __ A quick mock-overview of how I start the threads: ListDataset datasets;// approx. 500 - 1000 objects ... for (Object data: datasets) { ListCallback callbacks; for (Information info: myRequestsForThisData) {// approx. 2-5 objects // Generating the Request Document Request request = generateRequest(info); // Generating a service Callback instance; the Callback class has an attribute finished Callback myCallback = new Callback(); // remembering the callback callbacks.add(myCallback); // starting the async request stub.startRequest(request,myCallback); } // now wait until all Callbacks are finished (finished is true if onError or onComplete has been called) while (true) { boolean allCompleted = true; for(Callback callback: callbacks) if (callback.isFinished()) { allCompleted = false; break; } if (allCompleted) break; Thread.sleep(25); } } -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - 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]
URL encoding in RESTful service
Hello, My web service client is sending application/x-www-form-urlencoded POST requests to the web service. The problem is that Axis2 is not decoding the POST body name/value pairs. I've tracked this down to XFormURLEncodedBuilder.java, which is decoding the URL but not the body. I could use GET requests but this is not ideal. Is this the way it's supposed to work or is it a bug? Thanks, Steve
Is Apache Axis2 WSDL2Java code generator able to generate real javadoc information from WSDLs?
Hi all, I'm using the Apache Axis2 WSDL2Java code generator but it seems that the WSDL documentation tag, e..g., wsdl:operation name=GetWeather wsdl:documentation xmlns=http://schemas.xmlsoap.org/wsdl/;Get weather report for all major cities around the world./wsdl:documentation wsdl:input message=tns:GetWeatherSoapIn / ... is not evaulated by the code generator. When generating javadoc from the sources or when looking at the generated client sources I cannot find this comment. I always see Auto generated method signature as javadoc for methods. Does anybody know whether Axis2 WSDL2Java code generator is able to generate 'real' javadoc from WSDL documentation tags? Greetings Klaus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Async requests killing network
Martin The NIO transport in axis has nothing to do with the Tomcat NIO connector (yet *). So it should be fine Paul * I say yet, because there has been some discussion about creating an Axis2 transport based on the Tomcat NIO connector. On Feb 13, 2008 12:45 AM, Martin Gainty [EMAIL PROTECTED] wrote: I did'nt get an answer so Im reposting.. Is there a way to configure in NIO transport in axis2 *without* enabling the NIO connector in TC server.xml? Thanks Martin- - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, February 11, 2008 8:06 AM Subject: Re: Async requests killing network I should point out you do this by commenting (the normal HTTP transport) and uncommenting (the NIO transport) in axis2.xml. Some users have also tried the Synapse 1.1.1/1.1.2 NIO HTTP transport which has a number of bugs fixed compared to the Axis2 version thereof. You need to grab the JAR file from Synapse and copy the right axis2.xml config from Synapse's axis2.xml. Paul On Feb 11, 2008 12:19 PM, Paul Fremantle [EMAIL PROTECTED] wrote: You might want to try this out using the NIO HTTP transport. It should scale better for this kind of behaviour. Paul On Feb 11, 2008 11:11 AM, Matthias Wermund [EMAIL PROTECTED] wrote: Hi, I'm having problems starting a big amount of async webservice requests via Axis2 client in short time. The requests are all started from the same Thread and should run parallel in only small amount. As you can see below, I start about 1000 * 5 = 5000 requests, but only a max of 2-5 are called parallel. For each dataset, a few information-requests are started parallel, but I ensure that each CallbackHandler has been finished, before requesting the informations for the next dataset. For the first several hundred requests this works fine, but after some time, my network (OS is Windows 2000) goes down, which means that the complete OS looses the connection to the local network. I guess this could be based in opening too much TCP connections or something like this, because if it affects the whole OS and not just my application, it has to be something with the network device or driver. So basically my question is: Is it ensured that the TCP connection is already closed when CallbackHandler.onError or CallbackHandler.onComplete is called? Or must I do this myself in any way? Do you have any other clue what might be the problem here? Thank you! __ A quick mock-overview of how I start the threads: ListDataset datasets;// approx. 500 - 1000 objects ... for (Object data: datasets) { ListCallback callbacks; for (Information info: myRequestsForThisData) {// approx. 2-5 objects // Generating the Request Document Request request = generateRequest(info); // Generating a service Callback instance; the Callback class has an attribute finished Callback myCallback = new Callback(); // remembering the callback callbacks.add(myCallback); // starting the async request stub.startRequest(request,myCallback); } // now wait until all Callbacks are finished (finished is true if onError or onComplete has been called) while (true) { boolean allCompleted = true; for(Callback callback: callbacks) if (callback.isFinished()) { allCompleted = false; break; } if (allCompleted) break; Thread.sleep(25); } } -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Signature verification failure when the body contains special characters
hello, I use axis 1.4 on both the server side and the client side. My client settings are as follows: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java= http://xml.apache.org/axis/wsdd/providers/java; transport name=http pivot=java: org.apache.axis.transport.http.HTTPSender/ globalConfiguration requestFlow handler name=Addressing type=java:a.b.AddressHandler/ handler name=DoSecuritySender type=java: org.apache.ws.axis.security.WSDoAllSender parameter name=action value=Timestamp Signature/ parameter name=signatureParts value={Element}{ http://schemas.xmlsoap.org/soap/envelope/}Body;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp / parameter name=signatureKeyIdentifier value=DirectReference/ parameter name=user value=security-client/ parameter name=signaturePropFile value=crypto.properties/ parameter name=passwordCallbackClass value=a.b.PWCallbackHandler/ /handler /requestFlow /globalConfiguration /deployment So, I intend to sign the body and Timestamp elements of my message and send it to the server. The setup works fine if the body contains only ascii characters. But if it contains strange UTF-8 characters ( like umlaut - ŭ ) The server side errors out with a Signature verification Failed exception. Since the error occurs only when there are special characters and works fine otherwise, I am not doubting other parts of my setup (like my crypto.properties setting or having strange characters inserted after calculating the signature etc.) Any ideas why this happens?
Re: Signature verification failure when the body contains special characters
Hi! You could be hit by a bug in xmlsec-1.4 : http://santuario.apache.org/ /hans Raghuram Sreenath wrote: hello, I use axis 1.4 on both the server side and the client side. My client settings are as follows: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; transport name=http pivot=java:org.apache.axis.transport.http.HTTPSender/ globalConfiguration requestFlow handler name=Addressing type=java:a.b.AddressHandler/ handler name=DoSecuritySender type=java:org.apache.ws.axis.security.WSDoAllSender parameter name=action value=Timestamp Signature/ parameter name=signatureParts value={Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp http://schemas.xmlsoap.org/soap/envelope/%7DBody;%7BElement%7D%7Bhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd%7DTimestamp/ parameter name=signatureKeyIdentifier value=DirectReference/ parameter name=user value=security-client/ parameter name=signaturePropFile value=crypto.properties/ parameter name=passwordCallbackClass value=a.b.PWCallbackHandler/ /handler /requestFlow /globalConfiguration /deployment So, I intend to sign the body and Timestamp elements of my message and send it to the server. The setup works fine if the body contains only ascii characters. But if it contains strange UTF-8 characters ( like umlaut - ŭ ) The server side errors out with a Signature verification Failed exception. Since the error occurs only when there are special characters and works fine otherwise, I am not doubting other parts of my setup (like my crypto.properties setting or having strange characters inserted after calculating the signature etc.) Any ideas why this happens? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with axis generating faulty WSDL
Hello. I got a problem where my Axis2 (1.3) server is generating wsdl files for services that i cant use to generate clients for the same services, mainly because the WSDL is mallformed. I use eclipse for development, and eclipse do complain on the WSDL-files as well. Here is the output for http://localhost:8080/axis2/services/Version?wsdl http://pastebin.com/f12734e55 And here is the output for '/home/ilon/tomcat/axis2-1.3/bin/./wsdl2java.sh -uri version.wsdl -d adb -s' http://pastebin.com/f129de119 I'm getting similar problems when trying to generate WSDL for my own services. If i could get a hint of where to search for answers in this matter i would be very happy. Ilon Sjögren. -- vuln.se
RE: problem with axis generating faulty WSDL
Though this doesn't address your specific issue, I have previously opened a jira on this topic. We also faced problems with Axis2-generated WSDLs. https://issues.apache.org/jira/browse/AXIS2-3444 Thanks, Nadeem From: Ilon Sjögren [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 12, 2008 8:58 PM To: axis-user@ws.apache.org Subject: problem with axis generating faulty WSDL Hello. I got a problem where my Axis2 (1.3) server is generating wsdl files for services that i cant use to generate clients for the same services, mainly because the WSDL is mallformed. I use eclipse for development, and eclipse do complain on the WSDL-files as well. Here is the output for http://localhost:8080/axis2/services/Version?wsdl http://pastebin.com/f12734e55 And here is the output for '/home/ilon/tomcat/axis2-1.3/bin/./wsdl2java.sh -uri version.wsdl -d adb -s' http://pastebin.com/f129de119 I'm getting similar problems when trying to generate WSDL for my own services. If i could get a hint of where to search for answers in this matter i would be very happy. Ilon Sjögren. -- vuln.se
InvalidCanonicalizerException
Hi, I am trying to use Rampart in Axis 2 v 1.3 using Tomcat 4 and a 1.4 JDK. I'm trying to do a simple UsernameToken authentication. I believe I'm following the tutorials pretty faithfully. The server is giving me the following exception: org.apache.xml.security.c14n.InvalidCanonicalizerException: Unknown canonicalizer. No handler installed for URI http://www.w3.org/TR/2001/REC-xml-c14n-20010315# WithComments at org.apache.xml.security.c14n.Canonicalizer.init(Unknown Source) at org.apache.xml.security.c14n.Canonicalizer.getInstance(Unknown Source) at org.apache.xml.security.utils.XMLUtils.outputDOM(Unknown Source) at org.apache.rampart.util.Axis2Util.getSOAPEnvelopeFromDOMDocument(Axis2Util.java:209) at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:237) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) . The soap fault returned to the client contains: soapenv:Reason soapenv:Text xml:lang=en-UScom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog#xd; at [row,col {unknown-source}]: [2,0]/soapenv:Text /soapenv:Reason Any ideas? To me it sounds like some configuration issue or some incorrect jar file but I cannot track it down. Help appreciated! Jean This email and any files or content transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. The Company and the originator of this email accept no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Warning: Although the Company and the originator have taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
Re: problem with axis generating faulty WSDL
Hi, Are you copying the ?wsdl from the web browser? They don't show the full content. Web browsers omit the namespace definitions. If you are using a web browser, check 'View Source' for full content. There should be namespaces like xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; defined. You can use that full content and save it to a file. Or I think you can give the full URL directly to the wsdl2java.sh like this. /wsdl2java.sh -uri http://localhost:8080/axis2/services/Version?wsdl Hope this helps. Upul On Feb 13, 2008 5:40 PM, Ilon Sjögren [EMAIL PROTECTED] wrote: Hello. I got a problem where my Axis2 (1.3) server is generating wsdl files for services that i cant use to generate clients for the same services, mainly because the WSDL is mallformed. I use eclipse for development, and eclipse do complain on the WSDL-files as well. Here is the output for http://localhost:8080/axis2/services/Version?wsdl http://pastebin.com/f12734e55 And here is the output for '/home/ilon/tomcat/axis2-1.3/bin/./wsdl2java.sh -uri version.wsdl -d adb -s' http://pastebin.com/f129de119 I'm getting similar problems when trying to generate WSDL for my own services. If i could get a hint of where to search for answers in this matter i would be very happy. Ilon Sjögren. -- vuln.se
Re: SAML with Axis2
Hi Nuria, Can you please explain what you meant ? I am sorry, I didn't get what you asked. thanks, /nandana On Feb 12, 2008 3:27 PM, Nuria Rodríguez García [EMAIL PROTECTED] wrote: Hi Nandana, I've a doubt about the STS. Do the service and client limited to deploy the rahas module to use STS or they can use different type of SAML Authority?. If the SAML authority is not STS could our client connect to this SAML authority or is limited to the STS? Thanks, Nuria 2008/2/12, Nandana Mihindukulasooriya [EMAIL PROTECTED]: Hi Nuria, I've some doubts about SAML with axis2. I need to know if the sample05 covers all the the SAML cases. No, it covers only one scenario. For example, this uses SAML token as a supporting token. There is another scenarios where SAML token can be used as a protection token where it will be used to sign and encrypt messages. We first receive the SAML token response then we indicate, in the options the responseToken id I don't know where we are sending to the server the SAML assertion in the soapMessage When the id is set, Rampart message builders add the assertion to the security header according to the security policy. If you monitor the messages exchanged through TCPMon, then you can actually see the SAML assertion in the security header of the SOAP request to the service. Another thing is to know what are the requestSecurityToken parameters. In the client, we set these parameters using RST template. private static OMElement getRSTTemplate() throws Exception { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement elem = fac.createOMElement(SP11Constants.REQUEST_SECURITY_TOKEN_TEMPLATE); TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_02, elem).setText(RahasConstants.TOK_TYPE_SAML_10); TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02, elem, RahasConstants.KEY_TYPE_PUBLIC_KEY); TrustUtil.createKeySizeElement(RahasConstants.VERSION_05_02, elem, 256); return elem; } These parameters are defined in the WS Trust specification [1]. /nandana [1] - specs.xmlsoap.org/ws/2005/02/trust/WS-Trust.pdf http://nandana83.blogspot.com/ http://nandanasm.wordpress.com/ - 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]
newbie question
Hello all, I'm new to this list so if my question is anwered elsewhere and I didn't find it in the archive, my apologies. I have to make some simple calls to a webservice hosted on an IIS server. A valid Login call should look like this, according to the spec: POST /webservices/ExternalRedirectionService.asmx HTTP/1.1 Host: gww-ob.nl Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: http://[someurl.tld]/WebServices/Login; ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body Login xmlns=http://[someurl.tld]/WebServices/; usernamestring/username passwordstring/password /Login /soap:Body /soap:Envelope I wrote this code after studying the tutorial (the localhost: is for tcpmon, which forwards to the actual server on port 80): import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; public class TestClient { public static void main(String [] args) { try { String endpoint = http://localhost:/webservices/ExternalRedirectionService.asmx;; Service service = new Service(); Call call= (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setSOAPActionURI(http://[myurl.tld]/WebServices/Login;); call.addParameter(username, org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter(password, org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); String ret = (String) call.invoke(new QName(http://[myurl.tld]/WebServices/;, Login), new Object[] { [username], [password] } ); System.out.println(Got ' + ret + '); } catch (Exception e) { System.err.println(e.toString()); } } } This yields the following call: POST /webservices/ExternalRedirectionService.asmx HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.2alpha Host: [someurl.tld]: Cache-Control: no-cache Pragma: no-cache SOAPAction: http://www.[someurl.tld]/WebServices/Login; Content-Length: 520 ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body ns1:Login soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://www.[someurl.tld]/WebServices/; username xsi:type=xsd:string[username]/username password xsi:type=xsd:string[password]/password /ns1:Login /soapenv:Body /soapenv:Envelope (I know I'm using an old version of Axis, that's a constraint I have to work with.) The webserver then replies with: System.Web.Services.Protocols.SoapException: Server was unable to process request. --- Csla.DataPortalException: DataPortal.Fetch failed --- Csla.Server.CallMethodException: DataPortal_Fetch method call failed --- System.Data.SqlClient.SqlException: Procedure 'security_login' expects parameter '@st_username', which was not supplied. followed by a long stack trace. My question is, naturally: what am I doing wrong here? Thanks for any insights. regards, -- Reinout van Schouwen http://vanschouwen.info/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 Eclipse Plug-in Generator - parameter not used
Hi all, Looking at the code of a stub generated by the WSDL-to-Java wizard, I noticed that the QName parameter of a generated getOMElement(QName parentQName, OMFactory factory) is not being used. Here is the output generated by the wizard: /** * * @param parentQName * @param factory * @return org.apache.axiom.om.OMElement */ public org.apache.axiom.om.OMElement getOMElement ( final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){ public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWr iter xmlWriter) throws javax.xml.stream.XMLStreamException { AuthenticateClientResponse.this.serialize(MY_QNAME,factory,xmlWriter); } }; return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME,factory,data Source); } As it can be seen the generated code uses MY_QNAME, ignoring parentQName. In this way, it is not possible to specify which OMElement to retrieve the response message if based on this generated method. I modified the generated code for my version here, but I would like to raise this issue. Thanks and regards, Joana M. F. da Trindade Student Intern SAP Research - Security Trust SAP Labs France 805 Avenue du Dr. Maurice Donat 06250 Mougins T +33/492286319 F +33/492286201 mailto:[EMAIL PROTECTED] http://www.inf.ufrgs.br/~jmftrindade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieving MTOM in a client
Hi Adam, It would be helpfull if you post the SOAP message... Thilina On 2/12/08, Etches, Adam (GE Infra, Energy) [EMAIL PROTECTED] wrote: I'm using MTOM in a java client but when I try to retrieve the OMText at the client side i.e.: OMText binaryNode = (OMText) mapImage.getFirstOMChild(); I get a class cast exception, since the response is returning an OMElement and not OMText anyone come across this before? I've checked the soap message and it does actually include the binary data. Thanks in advance Adam -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JIRA solved for Axis2 1.4 release
Hello! In september 2007 I sent a JIRA about a problem with windows newline \r\n and unix/linux newline \n. https://issues.apache.org/jira/browse/WSCOMMONS-243 I was told to report to the WSCOMMONS project. Does anyone here work with WSCOMMONS project and knows if the issue is about to be solved? It would be nice if it is solved for the Axis2 1.4 release. /Pär Malmqvist _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
RE: retrieving MTOM in a client
Thanks Thilina, the SOAP message is below: I'm sure the client worked once but then stopped? The client code extract is: OMText binaryNode = (OMText) mapImage.getFirstOMChild(); DataHandler actualDH = (DataHandler) binaryNode.getDataHandler(); soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; soapenv:Body ns:mapResponse xmlns:ns=http://samples.webservice.gss/xsd; ns:return ns:map ns:map_return_type ns:display_style_nameRegion/ns:display_style_name ns:crsuk_british_national_grid_mm/ns:crs ns:centre546307392.00,258873636.00/ns:centre ns:image_layers{sw_map=com.gesmallworld.gss.services.map.MapLayerRespo [EMAIL PROTECTED]/ns:image_layers ns:unitsmm/ns:units ns:style_groupdefault/ns:style_group ns:options{}/ns:options ns:view_scale127020.02565384615/ns:view_scale ns:rotation0.0/ns:rotation ns:map_element_keyswrefVdisplay_styleVidZ0Q6/ns:map_element_key ns:worldswrefVworldVdatasetZgisVuniverseZ0VworldZ0/ns:world ns:ace_namedefault/ns:ace_name ns:nametest/ns:name ns:map_image xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include/ /ns:map_image /ns:map_return_type /ns:map /ns:return /ns:mapResponse /soapenv:Body /soapenv:Envelope -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 13 February 2008 14:48 To: axis-user@ws.apache.org Subject: Re: retrieving MTOM in a client Hi Adam, It would be helpfull if you post the SOAP message... Thilina On 2/12/08, Etches, Adam (GE Infra, Energy) [EMAIL PROTECTED] wrote: I'm using MTOM in a java client but when I try to retrieve the OMText at the client side i.e.: OMText binaryNode = (OMText) mapImage.getFirstOMChild(); I get a class cast exception, since the response is returning an OMElement and not OMText anyone come across this before? I've checked the soap message and it does actually include the binary data. Thanks in advance Adam -- Thilina Gunarathne - http://thilinag.blogspot.com - 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]
RE: encoding of SOAP responses
Hello Rushikesh and Paul, thank you very much for your answers. Unfortunately my question was not precise enough. I am not consuming a web service, but offering it. Can I determine the encoding of the SOAP responses my server delivers at runtime depending on a parameter transmitted in the SOAP Header of the request also? Thanks for your help, Jan
Re: encoding of SOAP responses
Do you mean you need to use the same encoding as the client sent? Paul On Feb 13, 2008 5:35 PM, Jan Philipp Seng [EMAIL PROTECTED] wrote: Hello Rushikesh and Paul, thank you very much for your answers. Unfortunately my question was not precise enough. I am not consuming a web service, but offering it. Can I determine the encoding of the SOAP responses my server delivers at runtime depending on a parameter transmitted in the SOAP Header of the request also? Thanks for your help, Jan -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Timeout error during web service call
Hello All, The web service call errors out with timeout message. We are using axis2. I am able to see the wsdl on the browser using the same url: http://servername/webapp/services/ServiceName?wsdl Here is the code section where it times out: RPCServiceClient serviceClient = new RPCServiceClient(); serviceClient.getOptions().setTo( new EndpointReference( getServerAddress() ) ); QName saveFile = new QName( http://servername/;, saveFile ); Object[] response = serviceClient.invokeBlocking( saveFile, new Object[] {token}, new Class[] {Integer.class} ); Any ideas? Thanks in advance, Raj == Here is the stack trace for the: Timed out: http://servername/webapp/services/ServiceName?wsdl org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:235) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191) ... 30 more Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Timeout error during web service call
Raj, Try setting serviceClient.getOptions().setTimeOutInMilliSeconds(timeoutInMilliSecond s); Thanks Raghu -Original Message- From: Raj [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 1:24 PM To: axis-user@ws.apache.org Subject: Timeout error during web service call Hello All, The web service call errors out with timeout message. We are using axis2. I am able to see the wsdl on the browser using the same url: http://servername/webapp/services/ServiceName?wsdl Here is the code section where it times out: RPCServiceClient serviceClient = new RPCServiceClient(); serviceClient.getOptions().setTo( new EndpointReference( getServerAddress() ) ); QName saveFile = new QName( http://servername/;, saveFile ); Object[] response = serviceClient.invokeBlocking( saveFile, new Object[] {token}, new Class[] {Integer.class} ); Any ideas? Thanks in advance, Raj == Here is the stack trace for the: Timed out: http://servername/webapp/services/ServiceName?wsdl org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 95) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:235) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav a:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon nectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa se.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase .java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java :1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe thodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho dDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 97) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 46) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac tHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 91) ... 30 more Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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]
RE: Timeout error during web service call
Tried setting the timeout to 10 minutes without any success. (10*60*1000) Thanks, Raj --- Raghu Upadhyayula [EMAIL PROTECTED] wrote: Raj, Try setting serviceClient.getOptions().setTimeOutInMilliSeconds(timeoutInMilliSecond s); Thanks Raghu -Original Message- From: Raj [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 1:24 PM To: axis-user@ws.apache.org Subject: Timeout error during web service call Hello All, The web service call errors out with timeout message. We are using axis2. I am able to see the wsdl on the browser using the same url: http://servername/webapp/services/ServiceName?wsdl Here is the code section where it times out: RPCServiceClient serviceClient = new RPCServiceClient(); serviceClient.getOptions().setTo( new EndpointReference( getServerAddress() ) ); QName saveFile = new QName( http://servername/;, saveFile ); Object[] response = serviceClient.invokeBlocking( saveFile, new Object[] {token}, new Class[] {Integer.class} ); Any ideas? Thanks in advance, Raj == Here is the stack trace for the: Timed out: http://servername/webapp/services/ServiceName?wsdl org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 95) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:235) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav a:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon nectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa se.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase .java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java :1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe thodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho dDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 97) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 46) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac tHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 91) ... 30 more Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wsdl2java -ss (server-side) classes required for complex object serialization?
Currently our web service generates server-side logic automatically using wsdl2java with the -ss parameter. The resulting classes handle the serialization of complex objects, created on the server-side, to xml to be transported back to the client (and vice-versa). My question is: Is this the required approach? Can the Axis2 core (provided in the binary distribution) also provide serialization, if the targeted complex objects (used as API parameters, and return objects) adhere to JavaBean requirements? Or must the web service developer provide serialization/deserialization for all complex objects introduced into a web service API? Thanks, Dave
Re: Run Java2WSDL on Class in Jar File?
./java2wsdl.sh -cn test.Service -cp /path/classes.jar:/path/others.jar cn is the class name. cp is normal Java classpath. sn for generated service name. Type ./java2wsdl.sh to see all the options. Hope this helps Upul On Feb 13, 2008 2:59 AM, Murphy Steve [EMAIL PROTECTED] wrote: I need to run Java2WSDL on a class that is in a jar file because all the dependencies (imported classes) are also in the jar file. Is this possible to do? If so, can anyone show me the syntax? Thanks, Steve
Re: Is Apache Axis2 WSDL2Java code generator able to generate real javadoc information from WSDLs?
What is the version you use? Please check with a nighly build. thanks, Amila. On Feb 13, 2008 3:46 PM, Berg, Klaus-Peter [EMAIL PROTECTED] wrote: Hi all, I'm using the Apache Axis2 WSDL2Java code generator but it seems that the WSDL documentation tag, e..g., wsdl:operation name=GetWeather wsdl:documentation xmlns=http://schemas.xmlsoap.org/wsdl/;Get weather report for all major cities around the world./wsdl:documentation wsdl:input message=tns:GetWeatherSoapIn / ... is not evaulated by the code generator. When generating javadoc from the sources or when looking at the generated client sources I cannot find this comment. I always see Auto generated method signature as javadoc for methods. Does anybody know whether Axis2 WSDL2Java code generator is able to generate 'real' javadoc from WSDL documentation tags? Greetings Klaus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: [Axis2] Call service with UTF-8 Stream
set the character encoding to serviceClient.getOptions().setProperty( Constants.Configuration.CHARACTER_SET_ENCODING,ISO-8859-1); Amila. On Feb 12, 2008 1:10 PM, Oliver Hirschi [EMAIL PROTECTED] wrote: Hi Andreas That's it! Many thanks for your efforts! Oliver Hirschi Andreas Veithen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi Oliver! The code you use to read the content of the file is incorrect. The size of the char array you are allocating equals the file size, which is calculated in number of bytes. For UTF-8, if special characters appear in the file, the number of characters is less than the number of bytes. Therefore you will indeed have null characters at the end of your array. I suggest to use one of the IOUtils.toString methods from Commons IO to read the file content as a string. Andreas On 11 Feb 2008, at 16:01, Oliver Hirschi wrote: Hi I try to call a soap-service on an axis2 1.3 server with only one string argument. The value of the string argument I get from a file which is utf-8 encoded and contains special characters like äöü. I read the file as followed: Reader in = new InputStreamReader(new FileInputStream(m_sUploadFile), UTF-8); char[] chr = new char[(int)new File(m_sUploadFile).length()]; in.read(chr); in.close(); String sArgument = new String(chr); ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: Unable to sendViaPost to url
use tcpmon[1] to observe the request you get from the server. this may help you to locate the problem. [1]http://ws.apache.org/commons/tcpmon/ On Feb 12, 2008 12:12 PM, Srikanth Muthyala [EMAIL PROTECTED] wrote: Hello All, I am having problem with web service. This was working ok till yeasterday and I am getting this error today. Some java classes changed but no service classes are modified. I am using Axis2 1.3, Eclipse, Tomcat. If I try to use service using url on browser it works - only the call by code doesnt, Please help. I tried things like comparing files from latest project code to the one last checked in, googled, reinstalled tomcat.. 2008-02-12 17:37:40,175 [INFO] org.apache.axis2.transport.http.HTTPSender- Unable to sendViaPost to url[ http://localhost:8080/RTB/services/RTBprovisioning] org.apache.axis2.AxisFault: Transport error: 404 Error: Not found at org.apache.axis2.transport.http.HTTPSender.handleResponse( *HTTPSender.java:298*) at org.apache.axis2.transport.http.HTTPSender.sendViaPost( *HTTPSender.java:192*) at org.apache.axis2.transport.http.HTTPSender.send( *HTTPSender.java:77*) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons ( *CommonsHTTPTransportSender.java:327*) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( *CommonsHTTPTransportSender.java:206*) at org.apache.axis2.engine.AxisEngine.send( *AxisEngine.java:396*) at org.apache.axis2.description.OutInAxisOperationClient.send( *OutInAxisOperation.java:374*) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( *OutInAxisOperation.java:211*) at org.apache.axis2.client.OperationClient.execute( *OperationClient.java:163*) at com.didata.rtb.provisioning.service.RTBprovisioningStub.Ping( *RTBprovisioningStub.java:2853*) at com.didata.rtb.admin.RTBAdminRunner.testProvisioningSrvc( *RTBAdminRunner.java:137*) at com.didata.rtb.admin.RTBAdminRunner.run( *RTBAdminRunner.java:80*) at java.lang.Thread.run( *Thread.java:595*) Regards, Srikanth -- Amila Suriarachchi, WSO2 Inc.
Re: WSDL / SOAP reply namespaces problem.
According to your wsdl, the following elements under the complex type User belongs to http://ws.apache.org/axis1/xsd namespace. element name=daysValid nillable=true type=xsd:string/ element name=lastUserUpdate nillable=true type=xsd:string/ element name=resumeDate nillable=true type=xsd:string/ element name=suspendFlag nillable=true type=xsd:string/ element name=userFirstName nillable=true type=xsd:string/ element name=userInitials nillable=true type=xsd:string/ element name=userLastName nillable=true type=xsd:string/ element name=userName nillable=true type=xsd:string/ element name=vaxID nillable=true type=xsd:string/ But According to the response they belongs to a different namesapce. So the response is invalid. thanks, Amila. On Feb 12, 2008 12:26 AM, [EMAIL PROTECTED] wrote: Paul, Thanks for the reply I get this wsdl from the server i am suppused to connect to. How does the http://ws.apache.org/axis1/xsd namespace come to play? schema targetNamespace=*http://ws.apache.org/axis1/xsd*; xmlns=http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified My generated client code is trying to locate the reply elements in this namespace. ( ireformatted the generated code for better readability ) if (reader.isStartElement() new javax.xml.namespace.QName(* http://ws.apache.org/axis1/xsd,daysValid*).equals(reader.getName())) { nillableValue = reader.getAttributeValue( http://www.w3.org/2001/XMLSchema-instance,nil;); if (!true.equals(nillableValue) !1.equals(nillableValue)) { java.lang.String content = reader.getElementText(); object.setDaysValid( org.apache.axis2.databinding.utils.ConverterUtil.convertToString (content)); } else { reader.getElementText(); // throw away text nodes if any. } reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException(Unexpected subelement + reader.getLocalName()); } thanks LF -- *Leonid Flom · *The Bank of New York Mellon Treasury Systems - CA$H-Register Plus* ·* Tel 212.815.7023* ·* Fax 212.815.8200* ·* [EMAIL PROTECTED] [EMAIL PROTECTED]* * *Paul Fremantle [EMAIL PROTECTED]* 02/11/2008 01:46 PM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: WSDL / SOAP reply namespaces problem. Leonid The response element is defined in the second schema which has the schema targetNamespace=http://server.ws.te0.com; So the response matches the WSDL as far as I can see. To be honest its a really strange WSDL! Wouldn't it make sense to clean it up? Paul On Feb 11, 2008 6:15 PM, [EMAIL PROTECTED] wrote: hello, everybody Can anybody tell me if this SOAP reply message is valid for the given wsdl? I am using Axis2 to generate the client stub and when running the client I get the org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement exception. WSDL is generated by Axis1. It seems that the problem is the namespace of the nested elements of the getUserReturn. In wsdl they are defined to be in the http://ws.apache.org/axis1/xsd; namespace, but the reply has them in the http://server.ws.te0.com;. I traced the generated source code it is exactly where it is failing. Thanks LF SOAP reply: soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body getUserResponse xmlns=http://server.ws.te0.com; getUserReturn daysValid39 /daysValid lastUserUpdate20080211084047 /lastUserUpdate resumeDate1-01-01 /resumeDate suspendFlagN /suspendFlag userFirstNameMASTER /userFirstName userInitials/ userLastNameSECURITY /userLastName userNameMAS /userName vaxID12027 /vaxID /getUserReturn /getUserResponse /soapenv:Body /soapenv:Envelope WSDL: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace= https://www-nr.qa.thebank.com/services/EntitlementWebServices; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:impl= https://www-nr.qa.thebank.com/services/EntitlementWebServices; xmlns:intf= https://www-nr.qa.thebank.com/services/EntitlementWebServices; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns1=http://ws.apache.org/axis1/xsd; xmlns:tns2=http://server.ws.te0.com; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema;
Re: [AXIS2] ADB Parse error when using MTOM in response
What is the Axis2 version you use? Amila. On Feb 10, 2008 6:45 AM, Florian Georg [EMAIL PROTECTED] wrote: Hi, I'm suddenly getting problems with the unmarshalling of by messages, after using MTOM to transfer binary data. My Client looks like this: [...] clientStub._getServiceClient().getOptions().setProperty( Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); clientStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10); clientStub._getServiceClient().getOptions().setManageSession(true); [...] RetrieveDataRequest retrieveRequest = new RetrieveDataRequest(); retrieveRequest.setJobID(response.getJobID()); retrieveRequest.setOutPort(0); RetrieveDataResponse retrieveResponse = clientStub.retrieveData(retrieveRequest); // --- ERROR Everything looks fine, except on the client side I get an error like this: org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement Include at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.knime.soda.services.client.ExecuteWorkflowStub.fromOM( ExecuteWorkflowStub.java:1318) at org.knime.soda.services.client.ExecuteWorkflowStub.retrieveData( ExecuteWorkflowStub.java:886) at org.knime.soda.server.test.services.ExecuteWorkflowAsyncTest.testProgressPolling (ExecuteWorkflowAsyncTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at org.springframework.test.ConditionalTestCase.runBare( ConditionalTestCase.java:69) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java :76) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java :38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196) Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement Include at org.knime.soda.services.TableContainer$Factory.parse(TableContainer.java :529) at org.knime.soda.services.RetrieveDataResponse$Factory.parse( RetrieveDataResponse.java:447) at org.knime.soda.services.client.ExecuteWorkflowStub.fromOM( ExecuteWorkflowStub.java:1295) ... 24 more Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement Include at org.knime.soda.services.TableContainer$Factory.parse(TableContainer.java :525) ... 26 more I suppose that the Include element mentioned is the xop:include that was sent with the response. The response looks like this: ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/addressing; soapenv:Header wsa:ReplyTo wsa:Addresshttp://www.w3.org/2005/08/addressing/none/wsa:Address wsa:ReferenceParameters axis2:ServiceGroupId xmlns:axis2=http://ws.apache.org/namespaces/axis2 urn:uuid:6BD67F48DCEE91861B1202692300817/axis2:ServiceGroupId /wsa:ReferenceParameters /wsa:ReplyTo wsa:MessageIDurn:uuid:6BD67F48DCEE91861B1202692306472/wsa:MessageID wsa:Actionurn:retrieveDataResponse/wsa:Action wsa:RelatesTourn:uuid:6BD67F48DCEE91861B1202692306419/wsa:RelatesTo /soapenv:Header soapenv:Body ns1:retrieveDataResponse xmlns:ns1=http://knime.org/soda/services; outData binary=true binaryData xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; / /binaryData /outData
Re-format the style of double value
Hi All, I am developing the SOAP server with Java by implementing it with Axis2 engine. Now I have got a problem that when the data in double attribute is greater than 10,000,000 , the number will convert to science notation format like '2.022E9' automatically. So could any one tell me how can I get the data in the normal format like '202200'. I used ADB as data binding when creating the class from WSDL. Thank you for any help in advance. Cheers, - Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Re: Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY
XML Schema defines that the elements should be in that order with that complextype definition in the WSDL. I think, if it is not, then it is an error even if some tools do not care. Upul On Feb 13, 2008 6:29 AM, Ram Thakkalapalli (rthakkal) [EMAIL PROTECTED] wrote: Should the client ensure the order of the elements inside the Soap envelope? Ram -- *From:* Ram Thakkalapalli (rthakkal) *Sent:* Tuesday, February 12, 2008 2:29 AM *To:* axis-user@ws.apache.org *Subject:* Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY Hello, Here is a Java API and generated WSDL snippet. Does the order of the elements in WSDL is mandatory when constructing the SOAP envelope? In my test setup, I have encountered that the order of the elements seems to be mandatory? If Yes, Can we make the order optional and read the values from element name instead of element index? Java Class Snippet: *public stats[] retrieveCPUUtilization(String name, String timeframe )* *{* *return stats[]; }* WSDL snippet : *xs:element name=retrieveCPUUtilization xs:complexType xs:sequence xs:element minOccurs=0 name=name nillable=true type=xs:string/ xs:element minOccurs=0 name=timeframe nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:element* Scenario 1: For the a SOAP request ( generated from WSDL2Java Utillity )of the format below with the order of the paramters matching the Java API above, the values are parsed correctly on the server side ( the java api sets name= xy-server and timeframe=hour ) *soapenv:Body* *retrieveCPUUtilization* *xs:namexy-server/xs:name* *xs:timeframehour/xs:timeframe* */retrieveCPUUtilization* */soapenv:Body* ** Scenario 2 : For the a SOAP request ( generated using SOAPpy )of the format below with the order of the paramters are NOT matching the Java API above, the values are parsed INCORRECTLY on the server side( the Java API sets name=hour, timeframe =xy-server ) *soapenv:Body* *retrieveCPUUtilization* *xs:timeframehour/xs:timeframe* *xs:namexy-server/xs:name* */retrieveCPUUtilization* */soapenv:Body* ** ** *Please let me know nif I am missing anything here.* ** *Thanks* *Ram* ** **
Re: Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY
In a web service service specifies the contract using the wsdl and schema. Here *xs:element name=retrieveCPUUtilization xs:complexType xs:sequence xs:element minOccurs=0 name=name nillable=true type=xs:string/ xs:element minOccurs=0 name=timeframe nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:element *Here it has mentioned the the element order as a sequence. So the request *must* keep the order. thanks, Amila. * * On Feb 14, 2008 9:10 AM, Upul Godage [EMAIL PROTECTED] wrote: XML Schema defines that the elements should be in that order with that complextype definition in the WSDL. I think, if it is not, then it is an error even if some tools do not care. Upul On Feb 13, 2008 6:29 AM, Ram Thakkalapalli (rthakkal) [EMAIL PROTECTED] wrote: Should the client ensure the order of the elements inside the Soap envelope? Ram -- *From:* Ram Thakkalapalli (rthakkal) *Sent:* Tuesday, February 12, 2008 2:29 AM *To:* axis-user@ws.apache.org *Subject:* Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY Hello, Here is a Java API and generated WSDL snippet. Does the order of the elements in WSDL is mandatory when constructing the SOAP envelope? In my test setup, I have encountered that the order of the elements seems to be mandatory? If Yes, Can we make the order optional and read the values from element name instead of element index? Java Class Snippet: *public stats[] retrieveCPUUtilization(String name, String timeframe )* *{* *return stats[]; }* WSDL snippet : *xs:element name=retrieveCPUUtilization xs:complexType xs:sequence xs:element minOccurs=0 name=name nillable=true type=xs:string/ xs:element minOccurs=0 name=timeframe nillable=true type= xs:string/ /xs:sequence /xs:complexType /xs:element* Scenario 1: For the a SOAP request ( generated from WSDL2Java Utillity )of the format below with the order of the paramters matching the Java API above, the values are parsed correctly on the server side ( the java api sets name= xy-server and timeframe=hour ) *soapenv:Body* *retrieveCPUUtilization* *xs:namexy-server/xs:name* *xs:timeframehour/xs:timeframe* */retrieveCPUUtilization* */soapenv:Body* ** Scenario 2 : For the a SOAP request ( generated using SOAPpy )of the format below with the order of the paramters are NOT matching the Java API above, the values are parsed INCORRECTLY on the server side( the Java API sets name=hour, timeframe =xy-server ) *soapenv:Body* *retrieveCPUUtilization* *xs:timeframehour/xs:timeframe* *xs:namexy-server/xs:name* */retrieveCPUUtilization* */soapenv:Body* ** ** *Please let me know nif I am missing anything here.* ** *Thanks* *Ram* ** ** -- Amila Suriarachchi, WSO2 Inc.
Re: wsdl2java -ss (server-side) classes required for complex object serialization?
you can do two types of service development with Axis2. 1. Contract first This is what you currently doing. you start with a wsdl file (contract) and generate the java code for this. 2. Code first approach you first write the service classes and then generates the wsdl and service from those classes. So I think what you ask for the second option. This article may help you http://www.developer.com/services/article.php/3726461 And also see the Axis2 documentation. thanks, Amila. On Feb 14, 2008 8:17 AM, Kraus, David [EMAIL PROTECTED] wrote: Currently our web service generates server-side logic automatically using wsdl2java with the –ss parameter. The resulting classes handle the serialization of complex objects, created on the server-side, to xml to be transported back to the client (and vice-versa). My question is: Is this the required approach? Can the Axis2 core (provided in the binary distribution) also provide serialization, if the targeted complex objects (used as API parameters, and return objects) adhere to JavaBean requirements? Or must the web service developer provide serialization/deserialization for all complex objects introduced into a web service API? Thanks, Dave -- Amila Suriarachchi, WSO2 Inc.