backwards compatible axis web services?
I would like to know if there is a document or if someone can tell me their experience with backwards compatible web services: Here is a use case. I make a class with web service methods. I call java2wsdl, then wsdl2java I launch this, and people make clients, and use them. Then I add a field to an input and output. All existing clients should still work, and should not fail when not sending the new input, and should see the new output field (somehow they need to pass their version string in to the server). all new clients should be able to send their new field, and they would see the new output field. A couple of options: 1. Make two beans, two wsdls. Not exactly convenient since wont I need a copy of the bean which does the service in a different package or something? Or if the field is in Java, but not the wsdl, will it handle it? 2. Deploy the service twice, with two different URLs. This is ok, though doesnt scale exactly well, for each tweak in an existing service we need a whole new webapp... What I would really like is several different wsdls (old and new), but hooked up to the same beans. Then somehow in the code say "if client version is less than 1.4, then dont send this field)", with an annotation or something... How do people handle one webapp with multiple version clients? Thanks! Chris
Re: [Axis2] [1.4] Zero Blockers / RC4 this weekend / Plan for 1.4 Final
I think this is a serious serious problem [I would classify as blocker] (it affects rest and soap in 1.3 for optional String params where the first param is not set, the second will be marshaled in the wrong place on the server). All I did was make a Java class with a method that takes two strings, the default java2wsdl, then wsdl2java, run a client where I pass the first as null, the second as something, and on the server side, the data for the second goes into the first. If I set the empty string in the first then all is well. But we cant expect all clients to do that... https://issues.apache.org/jira/browse/AXIS2-3364 The bug mentions setting null or throwing exception... it should definitely set null and *not* throw exception... Any chance this can be fixed for 1.4 (I havent verified it isnt fixed in 1.4, but the bug is still open... I can test if you like)? Sorry for late notice, havent been following the discussion on timelines... Thanks! Chris - Original Message From: Davanum Srinivas <[EMAIL PROTECTED]> To: Axis developer list <[EMAIL PROTECTED]>; axis-user@ws.apache.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, April 1, 2008 11:00:38 PM Subject: [Axis2] [1.4] Zero Blockers / RC4 this weekend / Plan for 1.4 Final -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Folks, Looks like there are no blockers on the JIRA marked for 1.4 https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=12312460 So, I'll try to cut RC4 this friday and we can roll out the RC's for axiom/xmlschema/neethi early next week. If all's well (cross my fingers) we can shoot for 1.4 Final next friday. One issue though...Can we get a woden release by next friday? thanks, dims -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) iD8DBQFH8vbWgNg6eWEDv1kRAiSMAJ9tiV1artrFtpP/uC8IEVoT3+WKbQCfUfM8 +CzhMg3v0wkFZ1agNi+zjfg= =gLeB -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com
Re: can I deploy two services based on the same java class to different servlets?
Great thanks. So I have to have my servlet container listen on multiple ports, and then I can have certain services only enabled for certain TCP ports, right? so there is no way to have one port with multiple servlets and each servlet has different services, right? Kind regards! Chris - Original Message From: Deepal jayasinghe <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Wednesday, April 2, 2008 12:45:31 AM Subject: Re: can I deploy two services based on the same java class to different servlets? Chris Hyzer wrote: > Hey, > > I want to deploy two services (right now I have .aar files, but could > be another way) based on the same Java file, but with different > options in the services.xml. > > I can use separate servlets too. Anyways, is it possible to map one > .aar file to an Axis servlet, and another .aar file to another > servlet, but not both with both? If I just put both .aar files into > the /services dir they both get loaded into both servlets and I get > this problem: There is a way to do that , by adding something called expose transport. Pleas have a look at the following article to get an idea about that. http://wso2.org/library/2060 Thank you! Deepal > > > 10:46:17,960 DEBUG AxisService: mapActionToOperation: Mapping Action > to Operation: action: hasMember; operation: > [EMAIL PROTECTED] > > 2008-04-01 10:46:17,960 DEBUG AxisService: mapActionToOperation: This > operation is already mapped to this action: hasMember; AxisOperation: > [EMAIL PROTECTED] named: hasMember > > 2008-04-01 > > > Im trying to get around having two WSDLs for this, or deploying the > web app twice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com
can I deploy two services based on the same java class to different servlets?
Hey, I want to deploy two services (right now I have .aar files, but could be another way) based on the same Java file, but with different options in the services.xml. I can use separate servlets too. Anyways, is it possible to map one .aar file to an Axis servlet, and another .aar file to another servlet, but not both with both? If I just put both .aar files into the /services dir they both get loaded into both servlets and I get this problem: 10:46:17,960 DEBUG AxisService: mapActionToOperation: Mapping Action to Operation: action: hasMember; operation: [EMAIL PROTECTED] 2008-04-01 10:46:17,960 DEBUG AxisService: mapActionToOperation: This operation is already mapped to this action: hasMember; AxisOperation: [EMAIL PROTECTED] named: hasMember 2008-04-01 Im trying to get around having two WSDLs for this, or deploying the web app twice. Thanks! Chris You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com
Re: java2wsdl customize the "return" element name
Thank you for your attention, but it is not a soap stack issue. It is an XML parsing issue. Some scripting languages convert the XML to an object model (neat trick), so any keyword (e.g. "function", "var", whatever) would make it fail. So it would be nice to not force people use keywords in their XML... Granted its difficult to forsee what all keywords are in all programming languages, but "return" seems like a sure bet. :) Is there a way to customize this? Thanks, Chris - Original Message From: Anne Thomas Manes <[EMAIL PROTECTED]> To: axis-user@ws.apache.org; Chris Hyzer <[EMAIL PROTECTED]> Sent: Sunday, March 9, 2008 3:15:07 PM Subject: Re: java2wsdl customize the "return" element name File a bug report with Adobe. A SOAP stack should not barf on a valid NCName like "return". Anne On Sat, Mar 8, 2008 at 11:53 PM, Chris Hyzer <[EMAIL PROTECTED]> wrote: > > Hey, > Im using Axis2 (latest) and all defaults for inputs to Java2WSDL. I have a > simple service, and each operation has a "return" element in it. e.g. > > > > > > > > > type="ns:WsAddMemberResult"/> > > > > > > > > This means the XML that comes back looks like this: > > > > > > http://webservices.whatever/xsd";> > > > > http://www.w3.org/2001/XMLSchema-instance"; > xsi:nil="true" /> > > I have someone connecting to the web service using flash or flex, and there > is an XML -> object converter, which converts the XML into a hierarchy of > objects and fields. But since "return" is a keyword, it barfs. So, I was > wondering if there is a way (besides hand-editing the WSDL or using XSLT) to > customize java2wsdl to get that element to be generated as "the_return" or > something else besides "return". > > > Thanks! > Chris > > Here is the email from the user: > > Notice that the element name on line two of the response is named "return" > (forget about the "ns" namespace for now). This is perfectly legal XML but > "return" is a reserved word in most languages and attempts to access the > element directly cause problems when compiling the code. e.g. > --- BEGIN EXAMPLE FLASH CODE--- > var test : XML = XML("hello worldgood > bye"); // casts string to xml > debugit.text = test.body; > debugit.text = test.child( "return" ); > --- END EXAMPLE FLASH CODE--- > All of the above code works fine. Notice that I access the "body" > element directly but accessed the "return" element using a child method. > The compiler complains if I attempt to use the syntax "test.return" or any > variation of it: "test.return.toString()". > Naming an element "return" is valid; I'm suggesting that it is probably not > good practice to use common reserve words as element names (or attribute > names for that matter). > > > > > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
java2wsdl customize the "return" element name
Hey, Im using Axis2 (latest) and all defaults for inputs to Java2WSDL. I have a simple service, and each operation has a "return" element in it. e.g. This means the XML that comes back looks like this: http://webservices.whatever/xsd";> http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="true" /> I have someone connecting to the web service using flash or flex, and there is an XML -> object converter, which converts the XML into a hierarchy of objects and fields. But since "return" is a keyword, it barfs. So, I was wondering if there is a way (besides hand-editing the WSDL or using XSLT) to customize java2wsdl to get that element to be generated as "the_return" or something else besides "return". Thanks! Chris Here is the email from the user: Notice that the element name on line two of the response is named "return" (forget about the "ns" namespace for now). This is perfectly legal XML but "return" is a reserved word in most languages and attempts to access the element directly cause problems when compiling the code. e.g. --- BEGIN EXAMPLE FLASH CODE--- var test : XML = XML("hello worldgood bye"); // casts string to xml debugit.text = test.body; debugit.text = test.child( "return" ); --- END EXAMPLE FLASH CODE--- All of the above code works fine. Notice that I access the "body" element directly but accessed the "return" element using a child method. The compiler complains if I attempt to use the syntax "test.return" or any variation of it: "test.return.toString()". Naming an element "return" is valid; I'm suggesting that it is probably not good practice to use common reserve words as element names (or attribute names for that matter). Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
axis2 server marshals optional nullable params in wrong order???
My Axis server (Axis2 as of a couple of months ago) is not working correctly, please help. I have a class with this method: public WsFindGroupsResults findGroups(String groupName, String stemName, String stemNameScope, String groupUuid, String queryTerm, String querySearchFromStemName, String queryScope, WsSubjectLookup actAsSubjectLookup, String[] paramNames, String[] paramValues) { All of these params are optional. I ran java2wsdl (with defaults mostly), and, then wsdl2java to generate a client. When I set only one of the latter params, this is the soap request: findGroups = FindGroups.class.newInstance(); findGroups.setGroupUuid("19284537-6118-44b2-bbbc-d5757c709cb7"); findGroupsResponse = stub.findGroups(findGroups); http://www.w3.org/2003/05/soap-envelope";> http://webservices.grouper.middleware.internet2.edu/xsd";> 19284537-6118-44b2-bbbc-d5757c709cb7 So far so good. But on the axis server, when the request is processed, it assigns "19284537-6118-44b2-bbbc-d5757c709cb7" to the input param variable "groupName", and not what I would expect: "groupUuid". No matter what single param I set, it is always assigned to groupName (the first input). What is going on here? Thanks! Chris Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
how axis upgrades affect generated XML / WSDL
Hey, We are looking at using Axis, and I did a proof of concept, which uses the defaults from the quick start and Javabeans. The details are here: https://wiki.internet2.edu/confluence/display/GrouperWG/WS+-+Proof+of+Concept+2007-10-2007 There is a concern of Axis generated XML vs more of a hand-coded approach since Axis upgrades might change the WSDL which means that existing clients of the web service will need to change. e.g. the current output of the web service for REST is: JUSTIN SMITH 100abcda JUSTIN SMITH And might an upgrade of Axis change this (it is based on a simple javabean)? In general what is the upgrade strategy? and I dont know if I am talking about major or minor upgrades to Axis. I know Axis2 is different from Axis. So can both run at once to support old clients, or do clients need to change, or just not upgrade Axis, etc? Thanks! Chris Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs