Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > how the vector is created, how to pass vector to webservices method apachesoap:Vector

Thread Tools

how the vector is created, how to pass vector to webservices method apachesoap:Vector

Rushikesh Joshi
Posts: n/a
Below is input parameter of my Web Services method vectorTest

- <wsdl:message name="vectorTestRequest">
<wsdlart name="userName" type="xsd:string" />
<wsdlart name="password" type="xsd:string" />
<wsdlart name="role" type="xsd:string" />
<wsdlart name="langpref" type="xsd:string" />
<wsdlart name="parentid" type="xsd:int" />
<wsdlart name="vectorParam" type="apachesoap:Vector" />

Now just look on it the 6th parameter is Vector (apachesoap:Vector).
Now how can i pass a vector (vec) from perl to my RPC Server.

If i want to passs 'a','b','c','d' in vector how can i create a vector
in perl. See below is my passing function

my $vectorTest = $service->vectorTest("rushi_asi\","rrrrr","india" ,"en",1,$vector);

If i passing $vector in different way using Map, Array, Hash i am
receiving follwoign error using my XMLDebugger

<!-- XML Dump -->

POST /anacreon/servlet/rpcrouter HTTP/1.0
Accept: text/xml
Accept: multipart/*
Host: MySite:ServicePORT
User-Agent: SOAP::Lite/Perl/0.50
Content-Length: 967
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:namesp1=" .Test">
<userName xsi:type="xsd:string">rushi_asi\</userName>
<password xsi:type="xsd:string">rrrrr</password>
<role xsi:type="xsd:string">india</role>
<langpref xsi:type="xsd:string">en</langpref>
<parentid xsi:type="xsd:int">1</parentid>
<vectorParam SOAP-ENC:arrayType="xsd:string[4]"
<item xsi:type="xsd:string">a</item>
<item xsi:type="xsd:string">b</item>
<item xsi:type="xsd:string">c</item>
<item xsi:type="xsd:string">d</item>
</namesp1:vectorTest></SOAP-ENV:Body></SOAP-ENV:Envelope>HTTP/1.0 500
Internal Server Error
Server: Resin/2.1.11
Content-Type: text/xml; charset=utf-8
Date: Fri, 09 Jul 2004 10:09:30 GMT

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""

<faultstring>org.xml.sax.SAXException: No deserializer defined for
array type {}string</faultstring>

<!-- END OF XML Dump -->

Your help will be great appreciate

Thanks in advance.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
const vector<A> vs vector<const A> vs const vector<const A> Javier C++ 2 09-04-2007 08:46 PM
Initializing vector<vector<int> > and other vector questions... pmatos C++ 6 04-26-2007 05:39 PM
Free memory allocate by a STL vector, vector of vector, map of vector C++ 8 02-18-2006 12:48 AM
Webservices and "pass through" security Tom ASP .Net 1 06-23-2005 02:43 AM