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

need help in soap lite

Expand Messages
  • sudhakar sharma
    Hi , i m new to soap lite..i have to create perl client that consume .net web service... from wsdl file i succefully install soap lite..and its woking..but
    Message 1 of 3 , Dec 22, 2005
    • 0 Attachment
      Hi , i m new to soap lite..i have to create perl client that consume .net web service...  from wsdl file
      i succefully install soap lite..and its woking..but problem is occur when i use complex type....
        im sending you my perl script file..plz have a look..give me suggestion..this is right way.. i also use stubmaker.pl  for making .pm file,but doesmt work..
       
      here is code of mine...
       
      # perl client
      # GetName method is complex type
      # problem: when client request to serevr ,serevr cant get any value from client
      # In addTwo method its simply take two parameters and return addtion of them..but when on server site its show o,o as input
      # as well as in GetName method i pass city name as "jaipur " but on server its show null
       
      $NS = "http://tempuri.org";      #name space
      $HOST = "
      http://localhost/sample1.asmx";
       
      use SOAP::Lite +trace => 'debug';
      my $_debug_=1;;
       
      my $localservice = SOAP::Lite -> uri($NS)
                                -> on_action( sub { join "/", @_ } )
                                -> proxy($HOST);
      #$localservice->proxy->timeout(100);
      $localservice ->xmlschema('2001');
       

      my $method2 = SOAP::Data->name('addTwo') ->attr({xmlns=>$NS});
      my @params = (
                    SOAP::Data->name(a => 4),
                    SOAP::Data->name(b => 4));
       
      my $result = $localservice->call($method2 => @params)->result;
       
      print $result;
       
      my $method = SOAP::Data->name('GetName') -> attr({xmlns => $NS});
       
      my @params = (
                    SOAP::Data->name('oPerson'=> \SOAP::Data->value(SOAP::Data->name('add'=>
                    \SOAP::Data->value(SOAP::Data->name('City' =>"jaipur"))))));
                   
       
      my $result = $localservice->call($method => @params)->result;
      print $result;
       
      thanks
      regards
      Sudhakar Sharma







      Send instant messages to your online friends http://uk.messenger.yahoo.com

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