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 't...
Nov 01, 2005
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.
Here's how I interpret the code when debugging.
Here is the method signature for LocalLB::SNAT::create():
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
);
First, let's look and make sure the namespace and method are correct
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">
Looks like this is going to iControl:LocalLB/SNATcreate which is what we want.
Next look at the parameters.
The first parameter is a 1-D SNATDefinition array named stats. What looks odd here is that item 1 (type SNATDefinition) in the array is declared as an array of size 2 but it doesn't have any items in it. It does have the correct members (type and translation_object) but translation_object you have defined as null which will likely cause you problems. You should at declare these as empty strings, not nulls.
SnatAutoMap
SNAT_TYPE_AUTOMAP
Now, on to parameter 2 which is of type SNATOriginalAddress[][] named original_addresses. Your code declares it as a single dimensional array with a single item which will cause problems. You'll need to declare this as a 2-D array. The first dimension references the associated entry in the snats variable and the second dimension is a list of original addresses for that snat.
0.0.0.0
Lastly, parameter 3 is of type VLANFilterList[] named vlans. You passed in an array of size 0 which is ok as long as don't want to add any VLANs to be filtered.
I wish debugging the perl interfaces was easier but the dynamic nature of perl can sometimes be it's downside as well.
Good luck!
-Joe
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