kadir_beyazli
kadir_beyazli

Reputation: 197

Handling Perl SOAP Web Service Result

I am calling a web service, customer verifies that call is successful which means my data reached their server succsessfully. But unfortutanetely I could not read output. This is the first time I encountered. I worked with SOAP web services for many years.

I am calling web service as follows which is very common

my $som = $soap->call(
  .............................
);

I am trying to get result as follow but it did not work

my $result = $som->result;

I can see result when I call web service by using SOAPUI:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <WebServiceOutput xmlns="http://xmlns.oracle.com/keyword/firm/method">
         <OUTPUT1>string1</OUTPUT1>
         <OUTPUT2>string2</OUTPUT2>
         <OUTPUT3>string3</OUTPUT3>
      </WebServiceOutput>
   </soap:Body>
</soap:Envelope>

I also Dumped $som but it does not include result above. I am waiting to see term string1, string2 but it does not exist

How can I handle result?

Upvotes: 1

Views: 192

Answers (1)

kadir_beyazli
kadir_beyazli

Reputation: 197

I have another web service from same customer which works successfully. So I compared with it and realized a small difference which caused problem.

My wsdl address is: http://xxx.xx.xx.xx:8080/orawsv/company/method?wsdl

I was calling as follow, proxy value includes "wsdl". When I removed it from proxy value, I could get result with code $som->result.

my $soap = SOAP::Lite
    -> on_action( sub { join '/', @_ } )
    -> readable(1)
    -> uri($uri)
    -> proxy("http://xxx.xx.xx.xx:8080/orawsv/company/method?wsdl")
    -> ns("http://schemas.xmlsoap.org/soap/envelope/","soapenv");

But I could not understand why it was needed removing "?wsdl" tag from proxy value because I was always adding it at my previous works.

Upvotes: 1

Related Questions