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

5995putting attributes to xml element using SOAP::Lite

Expand Messages
  • pokharel_ashish
    Aug 28, 2007
      Hi everyone,

      This might be a repeat of questions in earlier post but cant find one.
      I would appreciate if anyone can help me figure out one small thing
      here. I wanted to create a SOAP call as follows:

      <soap:Body>
      <myFlow version="1.0">
      <flow name="myName" action="start">
      <auth>
      <user>user</user>
      <password>pass</password>
      </auth>
      </flow>
      </myFlow>
      </soap:Body>

      It seems most of it is pretty simple.

      my $mySoap = SOAP::Lite ->uri("myUri")
      ->proxy("myProxy");

      my $method = SOAP::Data->name('myFlow');
      my @params = ( SOAP::Data->name("flow"=>
      \SOAP::Data->name("auth" =>
      \SOAP::Data->value(SOAP::Data->name("user"=>"user"),

      SOAP::Data->name("password"=>"pass"))));
      my $soap = $mySoap->call($method => @params);

      But by no means I can put the attributes to the elements for myFlow
      and flow. Does anyone know a simple solution to this?

      Thanks
    • Show all 2 messages in this topic