473,472 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2767
"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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.