Loading ...
Sorry, an error occurred while loading the content.

how the vector is created perl.

Expand Messages
  • Rushi
    I am having problem to work with soaplite with hash & vector type Below is input parameter of my Web Services method vectorTest -
    Message 1 of 2 , Jul 12, 2004
    • 0 Attachment
      I am having problem to work with soaplite with hash & vector type

      Below is input parameter of my Web Services method vectorTest

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

      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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body><namesp1:vectorTest
      xmlns:namesp1="com.logicboxes.foundation.sfnb.user.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]"
      xsi:type="apachesoap:Vector">
      <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>
      </vectorParam>
      </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="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Body>
      <soapenv:Fault>
      <faultcode>soapenv:Server.userException</faultcode>
      <faultstring>org.xml.sax.SAXException: No deserializer defined for
      array type {http://www.w3.org/1999/XMLSchema}string</faultstring>
      <detail/>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

      <!-- END OF XML Dump -->


      Remember it the same code is work fine for JAVA in java i had used.

      V = new Vector();

      V.add('a');
      V.add('b');
      V.add('c');
      V.add('d');

      so a,b,c & d are elements of Vector V and i am passing it to my
      function it runs perfectly.
    • Rushikesh Joshi
      I am having problem to work with soaplite with hash & vector type Below is input parameter of my Web Services method vectorTest -
      Message 2 of 2 , Jul 26, 2004
      • 0 Attachment
        I am having problem to work with soaplite with hash & vector type

        Below is input parameter of my Web Services method vectorTest

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

        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:SOAP-ENC="
        http://schemas.xmlsoap.org/soap/encoding/"
        SOAP-ENV:encodingStyle="
        http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsi="
        http://www.w3.org/1999/XMLSchema-instance"
        xmlns:SOAP-ENV="
        http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="
        http://www.w3.org/1999/XMLSchema">
        <SOAP-ENV:Body><namesp1:vectorTest
        xmlns:namesp1="com.logicboxes.foundation.sfnb.user.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]"
        xsi:type="apachesoap:Vector">
        <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>
        </vectorParam>
        </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="
        http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="
        http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="
        http://www.w3.org/2001/XMLSchema-instance">

        <soapenv:Body>
        <soapenv:Fault>
        <faultcode>soapenv:Server.userException</faultcode>
        <faultstring>org.xml.sax.SAXException: No deserializer defined for
        array type {
        http://www.w3.org/1999/XMLSchema}string</faultstring>
        <detail/>
        </soapenv:Fault>
        </soapenv:Body>
        </soapenv:Envelope>

        <!-- END OF XML Dump -->


        Remember it the same code is work fine for JAVA in java i had used.

        V = new Vector();

        V.add('a');
        V.add('b');
        V.add('c');
        V.add('d');

        so a,b,c & d are elements of Vector V and i am passing it to my
        function it runs perfectly.


        Do you Yahoo!?
        New and Improved Yahoo! Mail - Send 10MB messages!
      Your message has been successfully submitted and would be delivered to recipients shortly.