472,791 Members | 1,490 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

Empty Arraylist from Perl Client using SOAP:Lite

Hi

I am passing an arraylist to a c#/.net webmethod from a perl client
using soap:lite. The trace shows the elements in the xml request. The
arraylist input in the webmethod however does not contain any values
and is empty.
It works fine with arrays....but NOT arraylists....does anyone know
WHY? and HOW TO SOLVE THIS ISSUE?

Regards,
Vinit

Sep 13 '06 #1
6 2692
"Vinit" <vi********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi

I am passing an arraylist to a c#/.net webmethod from a perl client
using soap:lite. The trace shows the elements in the xml request. The
arraylist input in the webmethod however does not contain any values
and is empty.
It works fine with arrays....but NOT arraylists....does anyone know
WHY? and HOW TO SOLVE THIS ISSUE?
Does Perl have an ArrayList data type? If not, then I don't think you're
passing an ArrayList.

Please give us some details, as we cannot guess what the problem is.

John
Sep 14 '06 #2
>I am passing an arraylist to a c#/.net webmethod from a perl client
>using soap:lite. The trace shows the elements in the xml request. The
arraylist input in the webmethod however does not contain any values
and is empty.
It works fine with arrays....but NOT arraylists....does anyone know
WHY? and HOW TO SOLVE THIS ISSUE?
Have the WSDL?
Perl does not have ArrayList... :D

The issue is only with deserialization.
--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------
Sep 14 '06 #3
Sorry my bad....I meant I am passing things like this from my perl
client

print $seperator;
$name = "SendArrayList";
$params = {newList =[1,'index'] };
$xpath = "";
@ret = $test->ExecSoapMethod($name, $params, $xpath);
print Dumper($ret[1]), "\n";
the .Net webmethod is:
[WebMethod]
public string SendArrayList(ArrayList newList)
{
if (newList==null)
return "Null List!";
StringBuilder sb=new StringBuilder();
ArrayList list = new ArrayList();
IEnumerator enumList = newList.GetEnumerator();
while(enumList.MoveNext())
{
list.Add(enumList.Current.ToString());
sb.Append(enumList.Current.ToString());
}

return sb.ToString();
}

But it always returns an empty string the...arrayList if always
empty....WHY????

Gaurav Vaish (www.EduJiniOnline.com) wrote:
I am passing an arraylist to a c#/.net webmethod from a perl client
using soap:lite. The trace shows the elements in the xml request. The
arraylist input in the webmethod however does not contain any values
and is empty.
It works fine with arrays....but NOT arraylists....does anyone know
WHY? and HOW TO SOLVE THIS ISSUE?

Have the WSDL?
Perl does not have ArrayList... :D

The issue is only with deserialization.
--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------
Sep 14 '06 #4
And the trace mite help:

================================================== ============================
POST http://localhost/TestWebService/Service1.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 527
Content-Type: text/xml; charset=utf-8
SOAPAction: http://xxxx/SendArrayList

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://sch
emas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmln
s:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SendArrayList
xmlns="http://www.xxxx"><newList><int>1</int><string
>index</string></newList></SendArrayList></SOAP-ENV:Body></SOAP-ENV:Envelope>
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Connection: close
Date: Wed, 13 Sep 2006 23:37:22 GMT
Server: Microsoft-IIS/5.1
Content-Length: 367
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 13 Sep 2006 23:37:22 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchem
a-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><SendArrayListResponse
xmlns="http://www.xxxx"><SendArr
ayListResult /></SendArrayListResponse></soap:Body></soap:Envelope>

$VAR1 = '';


Vinit wrote:
Sorry my bad....I meant I am passing things like this from my perl
client

print $seperator;
$name = "SendArrayList";
$params = {newList =[1,'index'] };
$xpath = "";
@ret = $test->ExecSoapMethod($name, $params, $xpath);
print Dumper($ret[1]), "\n";
the .Net webmethod is:
[WebMethod]
public string SendArrayList(ArrayList newList)
{
if (newList==null)
return "Null List!";
StringBuilder sb=new StringBuilder();
ArrayList list = new ArrayList();
IEnumerator enumList = newList.GetEnumerator();
while(enumList.MoveNext())
{
list.Add(enumList.Current.ToString());
sb.Append(enumList.Current.ToString());
}

return sb.ToString();
}

But it always returns an empty string the...arrayList if always
empty....WHY????

Gaurav Vaish (www.EduJiniOnline.com) wrote:
>I am passing an arraylist to a c#/.net webmethod from a perl client
>using soap:lite. The trace shows the elements in the xml request. The
>arraylist input in the webmethod however does not contain any values
>and is empty.
>It works fine with arrays....but NOT arraylists....does anyone know
>WHY? and HOW TO SOLVE THIS ISSUE?
Have the WSDL?
Perl does not have ArrayList... :D

The issue is only with deserialization.
--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------
Sep 14 '06 #5
"Vinit" <vi********@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
And the trace mite help:

================================================== ============================
POST http://localhost/TestWebService/Service1.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 527
Content-Type: text/xml; charset=utf-8
SOAPAction: http://xxxx/SendArrayList

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://sch
emas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmln
s:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SendArrayList
xmlns="http://www.xxxx"><newList><int>1</int><string
>>index</string></newList></SendArrayList></SOAP-ENV:Body></SOAP-ENV:Envelope>
....
>>
the .Net webmethod is:
[WebMethod]
public string SendArrayList(ArrayList newList)
{
....
> }

But it always returns an empty string the...arrayList if always
empty....WHY????
Because you didin't pass it an ArrayList!!!!

How do you expect .NET to know that your <newListhas any relationship to
the .NET ArrayList class?

Sorry, but magic doesn't work on Windows.

John
Sep 14 '06 #6
> public string SendArrayList(ArrayList newList)

Look at:

http://articles.edujinionline.com/we...bservices.html

--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------
Sep 15 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rushikesh Joshi | last post by:
Problem: Whenever i have called your stringArray method with argument of Array for different style. It work like below... #Pass XML without XML Serialiser & Vector by value #Pass XML with XML...
0
by: Lamar | last post by:
I have been told that we cannot have both the SOAP::Lite and the DBI modules available on our IRIX box due to some conflict. Has anyone else encountered this problem and/or discovered a work...
0
by: Thomasb | last post by:
Hi! Has anyone managed to install DB2 Runtime Client Lite (part of Stinger)? I have tried on different machines with diffrent versions of Windows and it always ends up with "The DB2 Setyp...
1
by: JTrigger | last post by:
I need to call a .Net web service that takes an array or object as a parameter from a PERL client. I have been trying to use the PERL SOAP::Lite package to do this without success. I can call one...
1
by: Julio Delgado | last post by:
Hi, I am new to web services but I need to creating a VB.NET Client from a SOAP::LITE server the only information that I have is the http://servername/namespace and port number. How can I add a...
0
by: Eric | last post by:
I am trying to make a webservice call from an asp.net web app. I have added the web reference to my project, and I can create the webservice object in my code. This object has the correct methods...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
1
by: Gary W. Smith | last post by:
I have a SOAP::Lite package written in perl on a *nix environment that I need to consume from a C#. The classes in perl are pretty simple, each taking a string and returning a string (ranging from...
1
by: parimalb | last post by:
Hi All, I want to pass an array argument to the java webservice from perl client using SOAP::LITE package. Please let me know if anyone knows about this. The web method declaration in java is...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.