RE: Ksoap2: BUG?: Soap service method has multiple parameters
"McCune, Michael" <[email protected]> Thu, 8 Apr 2004 12:03:02 -0400
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <1972F96CB40DD647B2E0B38BE7960E740540963A@tayexc17.americas.cpqcorp.net> |
I should have mentioned...I'm working with kSOAP2 only. Thanks, Mike -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of McCune, Michael Sent: Wednesday, April 07, 2004 7:33 PM To: [email protected] Subject: Ksoap: BUG?: Soap service method has multiple parameters I have a problem when more than one parameter is declared in my SOAP service method. The called method is: public String getNextSystemAlert( Boolean returnTimeWithAlert, String testString ) I get varying results according to how I publish the methods in the class. If I publish using: publishClass( alertService.getClass(),"urn:system-alert"); ....it dosen't publish the parameter names (which are returnTimeWithAlert and testString) nor the namespaces, although I wouldn't expect it to capture namespaces. This only time this works for me is when I have one parameter in the calling method. If I use publishMethod(...), and specify the parameter names in the PropertyInfo, then I can get this to work if I modify the following code in SoapSerializationEnvelope, under readSerializable(...): //modification: if (info.name == null ? testIndex == sourceIndex : (info != null && (info.name.equals(name) || info.namespace.equals(parser.getNamespace())))) break; //original: //if (info.name == null // ? testIndex == sourceIndex // : (info.name.equals(name) && info == null || info.namespace.equals(parser.getNamespace()))) // break; This will break (and populate a SoapObject) if there is a match between the current SOAP envelope element and the method parameters. The match can be either on the parameter name, or the namespace, but maybe it should be both? However, most publishMethod(..) possibilities don't capture the namespace. Finally, if I don't use publishMethod(...) at all, then this all works with multiple parameters without requiring any code changes. It takes a different route in the code which dosen't touch on the above sniplet at all. Any help much appreciated, Mike _______________________________________________ Ksoap mailing list [email protected] http://www.enhydra.org/mailman/listinfo.cgi/ksoap