Forum Discussion
Michel_van_der_
Nimbostratus
Nov 01, 2005Debug tools for XML SOAP messages
I'm struggling a bit with some of the more complex call to iControl using perl and SOAP::Lite. At times I want
to look at the XML messages and see if they are compliant with the API. I'm using 'tidy -xml -indent' which is
not great. Any other tools I may want to use?
Michel
- Loc_Pham_101863Historic F5 AccountYou can set iControl.loglevel to "trace" to see the actual incoming SOAP/XML messages in /var/log/ltm.
- The easiest way is to use the built-in tracing features in SOAP::Lite. At the top of each sample application is the following module declaration for SOAP::Lite
use SOAP::Lite + trace => qw(method debug); use SOAP::Lite;
use SOAP::Lite + trace => qw(method debug); use SOAP::Lite;
- Michel_van_der_
Nimbostratus
What I'm getting back is an error from iControl.cgi, soxmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> SOAP-ENC:arrayType="SOAP-ENC:Array[1]"> SOAP-ENC:arrayType="xsd:ur-type[2]"> SnatAutoMap SOAP-ENC:arrayType="xsd:ur-type[2]"> SNAT_TYPE_AUTOMAP SOAP-ENC:arrayType="SOAP-ENC:Array[1]"> SOAP-ENC:arrayType="xsd:string[1]"> 0.0.0.0 SOAP-ENC:arrayType="SOAP-ENC:Array[1]"> SOAP-ENC:arrayType="xsd:ur-type[0]" />
- I don't know of any tool out there that will convert the SOAP message back into readable format. I'm sure you could do it with a XSLT style sheet but I don't know of one that exists.
struct Translation { SnatType type; String translation_object; }; struct SNATDefinition { String name; Translation target; }; struct SNATOriginalAddress { String original_address; String wildmask; }; struct VLANFilterList { EnabledState state; String []vlans; }; void LocalLB::SNAT::create( in SNATDefinition[] snats, in SNATOriginalAddress[][] original_addresses, in VLANFilterList[] vlans );
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> create xmlns:namesp2="urn:iControl:LocalLB/SNAT">
SnatAutoMap SNAT_TYPE_AUTOMAP
0.0.0.0
- Loc_Pham_101863Historic F5 AccountAlso, if you're writing a Perl client, make sure you have the correct typecasts for the SnatType enumeration, or any enum for that matter. Was the error you saw something about the SnatType? If so, that's likely the reason. You can use the iControlTypeCast.pm module from the SDK to get around this.
- Michel_van_der_
Nimbostratus
Thanks for your help, but off course I was trying to avoid exactly - There actually is a wsdl parser in the SOAP::Lite distribution but it is somewhat limited and only seems to work for simple method calls (no arrays, structures, etc).
- Michel_van_der_
Nimbostratus
Well, I tried something like that, but I kept getting 500 errors back. However, I think that was because iControl was not happy with the undef I had originally. So, let me go back and code it like you did, which I agree is much more elegant. - Keith_Hertzer_5
Nimbostratus
Could you elaborate on how to 'set iControl.loglevel to "trace"'? Is this a line that goes into bigip.conf or another config file? - Loc_Pham_101863Historic F5 AccountTo set iControl log level:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects