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
-------------------