|
Re: SOAP::Lite client and .NET server, array return: msg#00011windows.devel.soap.general
i recommend GLUE as a java web services platform ;-) download from: http://www.themindelectric.com. GLUE standard is free for most commercial uses. cheers, graham -----Original Message----- From: Discussion of implementing SOAP applications today [mailto:SOAP@xxxxxxxxxxxxxxxxxxx]On Behalf Of Gordon Henriksen Sent: Wednesday, September 11, 2002 10:47 PM To: SOAP@xxxxxxxxxxxxxxxxxxx Subject: Re: [SOAP] SOAP::Lite client and .NET server, array return The best resolution for the problem I initially had was to switch my web service to use SOAP RPC encoding, with the [SoapRpcMethod] C# method attribute. Unfortunately, I have to support a Java client as well, which is proving to be much more problematic. I've found that IBM's wsdl2java stub generator tool can be convinced to work with document/literal encoding fairly easily but is very nearly impossible to use with SOAP RPC encoding. So, the best resolution to my Perl interop problem was is in conflict with the only feasable resolution to my Java interop problems. As an aside, is everyone else as unimpressed with Apache SOAP as I am? It is virtually undocumented and completely unusable without the stub generator. I seek alternatives. The below patch would allow me to use my Perl client with the document/literal server, but has the undesireable--if not outright buggy--behavior of creating arrays for multiple values and creating scalars for single or nil values. Reminds me of a particular horror of Mason. Since I'm not exposing the SOAP::Lite interface directly to my developers, I can apply this patch and work around that bug for the time being. But is SOAP::Lite client interoperability with document/literal web services reasonable to expect in the near term from release code? If SOAP::Lite won't become compatible, I can double up the .NET web service to vend both interfaces, one for Java and one for Perl. However, I'd prefer not to have to support the two interfaces. If this patch will make document/literal encoding fly for my Perl client and compatible document/literal functionality will appear in release code in the near future, that satisfies me and I won't bother to double the interface. Additionally, are there any other problems I should be aware of in using SOAP::Lite with document/literal encoding? > -----Original Message----- > From: Discussion of implementing SOAP applications today > [mailto:SOAP@xxxxxxxxxxxxxxxxxxx] On Behalf Of Eric Promislow > Sent: Wednesday, September 04, 2002 1:32 PM > To: SOAP@xxxxxxxxxxxxxxxxxxx > Subject: Re: [SOAP] SOAP::Lite client and .NET server, array return > > > Hello, Gordon, > > There's a bug in SOAP::Lite v. 0.5x, which hasn't made its way > into the released version yet. I would apply this patch manually, > as the code changed from 0.51 to 0.52. The patch assumes that if > the first two child elements have the same name, all the elements > do, and an array should be constructed. This isn't just .NET servers, > but any server returing an array of elements. > > - Eric > > --- Lite.bak.pm Thu Apr 4 11:06:32 2002 > +++ Lite.pm Thu Apr 4 11:06:55 2002 > @@ -1828,11 +1828,16 @@ > return defined $class && $class ne 'Array' ? > bless($res => $class) : $res; > > } elsif ($name =~ /^\{$SOAP::Constants::NS_ENC\}Struct$/ || > !$schemaclass->can($method) && (ref $children || defined > $class && $value =~ /^\s*$/)) { > - my $res = {}; > $self->hrefs->{$id} = $res if defined $id; > - %$res = map {$self->decode_object($_)} @{$children || []}; > - return defined $class && $class ne 'SOAPStruct' ? > bless($res => $class) : $res; > - > + if (@{$children} > 1 && $children->[0]->[0] eq > $children->[1]->[0]) { > + my $res = []; > + @$res = map { scalar(($self->decode_object($_))[1]) } > @{$children || []}; > + return defined $class && $class ne 'Array' ? > bless($res => $class) : $res; > + } else { > + my $res = {}; > + %$res = map {$self->decode_object($_)} @{$children || []}; > + return defined $class && $class ne 'Struct' ? bless($res => > $class) : $res; > > + } > } else { > my $res; > if ($schemaclass->can($method)) { > > > ------------------------------ > > > > Date: Tue, 3 Sep 2002 22:49:04 -0400 > > From: Gordon Henriksen <gordon@xxxxxxxxx> > > Subject: SOAP::Lite client and .NET server, array return > > > > I'm having a problem with a .NET server and a SOAP::Lite > client. I've > > searched with Google and on this list's archives, but found no help. > > Both of these programs are under my complete control, but > my deadline is > > short and the SOAP interface must be frozen soon. > > > > When deserializing the return array, the SOAP::Lite client is > > eliminating all but the last of my array elements. For > example, given > > this SOAP response from the .NET server: > > > > [example omitted...] > > > > I'm not skipping any attributes (except the namespaces); this is > > structurally how the response from the .NET server looks, > according to > > SOAP::Lite (using "on_debug => sub { print @_ }"). > > > > However, SOAP::Lite is deserializing this: > > > > { > > record => { > > field => 3, > > }, > > aBool => "false" > > } > > > > I'm a little bit befuddled. Obviously, .NET isn't using a > > SOAP-ENC:arrayType attribute. Shouldn't it be? If so, does > anyone know > > what do I need to do to make it do so? > > > > Acknowledging that "SOAP::Lite does not support complex > types," .NET's > > WSDL for this structure is as follows: > > > > [WSDL omitted...] > > > > -- > > > > Gordon Henriksen > > IT & Engineering > > ICLUBcentral Inc. > > gordon@xxxxxxxxx > > > > You can read messages from the SOAP archive, unsubscribe > from SOAP, or subscribe to other > > DevelopMentor lists at http://discuss.develop.com. > > > > ------------------------------ > > > > End of SOAP Digest - 1 Sep 2002 to 3 Sep 2002 (#2002-183) > > ********************************************************* > > You can read messages from the SOAP archive, unsubscribe from > SOAP, or subscribe to other > DevelopMentor lists at http://discuss.develop.com. > > You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other DevelopMentor lists at http://discuss.develop.com. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: SOAP::Lite client and .NET server, array return: 00011, Gordon Henriksen |
|---|---|
| Next by Date: | ANN: Web Services DevCon Filling Fast: 00011, Chris Sells |
| Previous by Thread: | Re: SOAP::Lite client and .NET server, array returni: 00011, Gordon Henriksen |
| Next by Thread: | Re: SOAP::Lite client and .NET server, array return: 00011, Eric Promislow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |