I didn't think so, but just incase you did!....
Code Snippet
- #!/usr/bin/perl
- use SOAP::Lite 'trace', 'debug'; # adds debug and tracing to view SOAP msgs
- use SOAP::WSDL;
- use strict;
- use warnings;
- my $soap = SOAP::Lite
- -> uri('http://services.aonaware.com/webservices')
- -> proxy('http://services.aonaware.com/DictService/DictService.asmx');
End of Code Snippet
Key Points to note
1. Use the tracing and debugging options, this will tell you what is wrong (trust me, it will happen!)
2. URI - This is a reference to the NAMESPACE.... Simple view your WSDL or ASMX service, and view the 'targetNamespace' attribute for the base node.... This references the namespace... This is required when making SOAP calls.
3. PROXY - This is the actual URL to the service or WSDL.
4. on_action - What to do when the action is raised.... similar to an event.... In the example, its simply printing the response. I am also manually printing the response in the code... so you will see output twice.
For reference, there is a really good post here that troubleshoots these issues further.
Microsoft also did a good post here
No comments:
Post a Comment