Dear Monks, I am completely new to SOAP and trying to write a client for a web service our company intend to use.
My problem is that i am not able to figure out why this code does not fill up $response. I am pasting my code..
my $webService = SOAP::Lite-> uri($self->{NAMESPACE}) -> on_action(sub{sprintf '%s/%s', @_ }) -> outputxml("1") -> proxy($self->{ENDPOINT}); eval{ my $response = $webService ->call(SOAP::Data->name("SubmitXml")->attr({xmlns => $self->{NAM +ESPACE}}), SOAP::Data->name(Profile => $self->{HAP})->type('string') +, SOAP::Data->name(Request => $xmlRequest)->type('xml'), SOAP::Data->name(Filter => $xmlFilter)->type('xml')); }; if($@){print $@} open RES,">>Responce.log"; if (defined $response) { print RES $response."\n"; }else {print RES "========No Response======== \n";} close RES;
but i can see the proper response if i enable +trace on it shows me the right
result but does not return it .
please help me as I always end up with undefined $response.
i tried this $response=$webService->result; but the wsdl
raised error saying that it does not expect this method,which was recorded in the log
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Connection: close Date: Wed, 21 Jun 2006 10:44:06 GMT Server: Apache-Coyote/1.1 Content-Length: 4059 Content-Type: text/xml;charset=utf-8 Client-Date: Wed, 21 Jun 2006 10:45:18 GMT Client-Response-Num: 1 Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU +=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS I +ncorp.by Ref. LIABILITY LTD.(c)97 VeriSign Client-SSL-Cert-Subject: /C=US/ST=New Jersey/L=Parsippany/O=Cendant Co +rporation/OU=Terms of use at www.verisign.com/OU=Terms of use at www. +verisign.com/rpa (c)00/CN=copyws.cendant.com Client-SSL-Cipher: AES256-SHA Client-SSL-Warning: Peer certificate not verified <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http:// +www.w3.org/1999/XMLSchema-instance"> <soapenv:Body> <SubmitXmlResponse xmlns=""> <SubmitXmlResult> <AirAvailability_6_2 xmlns=""><AirAvail><MoreToken><Tok>3 +01030383628882023605530276080</Tok></MoreToken><AvailSummary><NumSegs +>2</NumSegs></AirAvail></AirAvailability_6_2> </SubmitXmlResult> </SubmitXmlResponse> </soapenv:Body></soapenv:Envelope>
now according to me the $response should have this string as i have enabled the outputxml(1) .
In reply to About SOAP ::Client written by me by mohan123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |