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

Looking for help again

Expand Messages
  • Vaibhav Sharma
    Hi All, Please someone help me to resolve following problem. Please Let me know, what I am doing wrong in my script, and not getting the right output?? Thanks
    Message 1 of 1 , Oct 21, 2005
    • 0 Attachment

      Hi All,

      Please someone help me to resolve following problem.

      Please Let me know, what I am doing wrong in my script, and not getting the right output??

      Thanks in advance

      The following is a SOAP request

      <?xml version="1.0" encoding="utf-8"?>

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Header>

      <AuthenticationHeader xmlns="http://www.sim.com/ELS/ResellerInterface">

      <CustomerID>int</CustomerID>

      <Username>string</Username>

      <Password>string</Password>

      </AuthenticationHeader>

      </soap:Header>

      <soap:Body>

      <GetProductInstanceDetailxmlns="http://www.sim.com/ELS/ResellerInterface">

      <MacAddress>string</MacAddress>

      <IPAddress>string</IPAddress>

      </GetProductInstanceDetail>

      </soap:Body>

      </soap:Envelope>

      And the following should be SOAP response

      <?xml version="1.0" encoding="utf-8"?>

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

      <GetProductInstanceDetailResponsexmlns="http://www.sim.com/ELS/ResellerInterface">

      <GetProductInstanceDetailResult>xml</GetProductInstanceDetailResult>

      </GetProductInstanceDetailResponse>

      </soap:Body>

      </soap:Envelope>

      Perl::SOAP::Lite code for the same is -

      ####### BEGIN CODE #####################

      #!/usr/bin/perl -w

      use SOAP::Lite maptype => {};

      use SOAP::Lite +trace => "debug";

      my $cid = "51000";

      my $username = "myself";

      my $password = "sim12345";

      my $proxy = "https://itdevapp1.ms.sim.com:65443/ELSWSR/ELSReseller.asmx";

      my $uri = "http://www.sim.com/ELS/ResellerInterface";

      my $Mac = "00-13-20-20-7D-E1";

      my $IP = "10.70.40.1";

      my $soap = SOAP::Lite

      -> uri($uri)

      -> on_action( sub{ join '/', $uri, $_[1] })

      -> proxy($proxy);

      my $header = SOAP::Header->name(AuthenticationHeader => {

      'CustomerID' => $cid,

      'Username' => $username,

      'Password' => $password,

      })->uri($uri)->prefix('');

      my $MAC = SOAP::Data->name("MacAddress" => $Mac);

      my $IPadd = SOAP::Data->name("IPAddress" => $IP);

      my $result = $soap->GetProductInstanceDetail($header,$MAC,$IPadd);

      if ($result->fault) { print "fault is: " . $result->faultstring ."\n" } else { print "result is: " . $result->result . "\n"; }

      Out Put of the code gives -

      <?xml version="1.0" encoding="utf-8"?>

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <soap:Body>

      <GetProductInstanceDetailResponse xmlns="http://www.sim.com/ELS/ResellerInterface">

      <GetProductInstanceDetailResult><ProductInstance xmlns="" /></GetProductInstanceDetailResult>

      </GetProductInstanceDetailResponse>

      </soap:Body>

      </soap:Envelope>

    Your message has been successfully submitted and would be delivered to recipients shortly.