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

3363Re: complex types

Expand Messages
  • maheshgadwal
    Feb 13, 2004
    • 0 Attachment
      Hi,

      I think given below code will help you. I had tested this. Only one
      thing i assumed that varList is the Name of method which you want to
      sent this request.

      Sample Code:
      $method = SOAP::Data->name('varList')->attr({xmlns => ''});
      @params = ( SOAP::Data->name("Variable"=>
      \SOAP::Data->value(SOAP::Data->name
      ("strVN"=>"a1"),
      SOAP::Data->name("objVV"=>
      \SOAP::Data->value(SOAP::Data-
      >name("name" => "how")))),


      \SOAP::Data->value(SOAP::Data->name
      ("strVN"=>"ap2"),
      SOAP::Data->name("objVV"=>
      \SOAP::Data->value(SOAP::Data-
      >name("name" => "how"))))
      )
      );



      This is the Output of the Above Code.
      <varList xmlns="">
      <Variable>
      <strVN xsi:type="xsd:string">a1</strVN>
      <objVV>
      <name xsi:type="xsd:string">how</name>
      </objVV>
      </Variable>
      <Variable>
      <strVN xsi:type="xsd:string">ap2</strVN>
      <objVV>
      <name xsi:type="xsd:string">how</name>
      </objVV>
      </Variable>
      </varList>



      Regards,
      Mahesh Gadwal


      --- In soaplite@yahoogroups.com, "adcgjh" <adcgjh@y...> wrote:
      > -- This is a small portion of my SOAP::Data construct.
      >
      > SOAP::Data->name(varList =>
      > \SOAP::Data->name(Variable =>
      > \SOAP::Data->value(SOAP::Data->name(strVN => 'a1'),
      > SOAP::Data->name(objVV =>
      > \SOAP::Data->value(SOAP::Data->name(name => 'how'))))),
      >
      > \SOAP::Data->name(Variable =>
      > \SOAP::Data->value(SOAP::Data->name(strVN => 'a2'),
      > SOAP::Data->name(objVV =>
      > \SOAP::Data->value(SOAP::Data->name(name => 'how')))))
      > )
      >
      > -- I am trying to do the following:
      >
      > <varList>
      >
      <Variable><strVN>a1</strVN><objVV><name>how</name></objVV></Variable>
      >
      <Variable><strVN>ap2</strVN><objVV><name>how<name></objVV></Variable>
      > </varList>
      >
      > -- But I am getting this:
      >
      > <varList>
      >
      <Variable><strVN>a1</strVN><objVV><name>how</name></objVV></Variable>
      > </varList>
      > <varList>
      > <Variable><strVN>a2</strVN><objVV><name>how<name></objVV></Variable>
      > </varList>
      >
      > -- Any ideas on what I am doing wrong? Thank You
    • Show all 4 messages in this topic