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

need to remove the method tag from xml req

Expand Messages
  • manumahendran
    I have been using your perl module `Soap::lite for last one month. I have trying to verify few webservices. I came across a strange scenario in which the
    Message 1 of 1 , Jan 18, 2010
    • 0 Attachment
      I have been using your perl module `Soap::lite' for last one month. I have trying to verify few webservices.

      I came across a strange scenario in which the request should be in the below format.





      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body xmlns:ns1=<target namespace>

      <ns1:element></ns1:element>

      </soap:Body>

      </soap:Envelope>



      but it gives,



      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body >

      <ns1:element xmlns:ns1=<target namespace > #the method name and the parameter name are the same



      <ns1:element></ns1:element>

      </ns1:element>

      </soap:Body>

      </soap:Envelope>



      since the method tag (element tag) is present in the request xml, the server is not able to parse it.



      my question is, is there a way where I can disable the method tag, means I only need the elements tag?

      Script used

      $so = SOAP::Lite

      ->uri($URI)

      ->proxy($PROXY);





      my $soap_response = $so -> call("ns1:element",@param); #element is the method name, both method and element name is the same.

      print $soap_response->result,"\n";



      unless ($soap_response->fault)

      {



      my @res = $soap_response->paramsout;

      my $res = $soap_response->result;

      print "ERROR CODE : $res \nERROR MSG: $res[0]\n";



      }

      else

      {

      print join ', ',

      $soap_response->faultcode,

      $soap_response->faultstring;

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