![]() |
|
![]() | ||
|
Subject:
Returning complex data types using SOAP::Lite with Perl ( to C# )
Category: Computers Asked by: aroth816-ga List Price: $5.00 |
Posted:
22 Jun 2002 01:18 PDT
Expires: 29 Jun 2002 01:18 PDT Question ID: 31506 |
I've got a SOAP::Lite server running and I've been testing out the use of complex objects. Here is the object defenition in the WSDL file: <xsd:complexType name="ResultElement"> <xsd:all> <xsd:element name="title" type="xsd:string"/> <xsd:element name="item" type="xsd:int"/> </xsd:all> </xsd:complexType> And here is an example perl sub that is called: sub getTitle(){ return SOAP::Data->type('ResultElement')->name('title')->value("A"); } But the problem should be obvious: 1. Even if this did work correctly, it is only returning a value for the 'title' of the ResultElement object. How do I return both the title and the item? 2. I am using C# and .NET to write a soap client. Here is the code that accesses the function to return this complex object: WebReference1.eb eb = new WebReference1.eb(); String title = eb.getTitle().title; int item = eb.getItem().item; While this does not crash (which means its receiving an object of the correct type!), title and item are empty... as if no data was really sent although with the ResultElement object. So, my main question would have to be -- how do I use SOAP::Lite to return a complex data type with more than 1 field (ie: ResultElement had 2 fields - - title and int). Thanks, Adam Roth (please forward this to: aroth816@yahoo.com) |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Returning complex data types using SOAP::Lite with Perl ( to C# )
From: cheesedoodles-ga on 27 Jun 2002 19:01 PDT |
I don't actually know anything about soap, but I would suggest asking your question on www.perlmonks.com if you haven't already. Many perl gurus hang out there and you're likely to get a fast response for free. |
Subject:
Re: Returning complex data types using SOAP::Lite with Perl ( to C# )
From: paulw11-ga on 28 Jun 2002 23:07 PDT |
You could try something like: return (SOAP::Data->type('ResultElement')->name('title')->value("A"),SOAP::Data->type('ResultElement')->name('item')->value(1)); The extra set of parenthesis specifies a "list" in PERL. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |