Dan_Markhasin_1
Jun 08, 2015Nimbostratus
upload_xml_profile_wsdl exception
Hi,
I'm trying to upload a WSDL file to associate with an XML profile in ASM, but getting an exception saying "The XML profile doesn't have a WSDL file".
This is my code:
import bigsuds
bigip = bigsuds.BIGIP(hostname='bigip-lab')
profile_name="Test_Profile"
policy_name="/Common/Dan_Test_Policy"
xml_file="/media/sf_VirtualBox/bigip/Device.svc"
filename="Device.wsdl"
contents = ''
with open(xml_file) as f:
contents = f.read()
result = bigip.ASM.Policy.upload_xml_profile_wsdl(policy_name, profile_name, filename, contents)
And this is the exception being thrown:
dmarkhas@dmarkhas-VirtualBox:~/workspace/BigIP$ python policy.py
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
File "policy.py", line 14, in
result = bigip.ASM.Policy.upload_xml_profile_wsdl(policy_name, profile_name, filename, contents)
File "/usr/local/lib/python2.7/dist-packages/bigsuds.py", line 416, in wrapped_method
result = method(*args, **kwargs)
File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__
File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke
File "build/bdist.linux-x86_64/egg/suds/client.py", line 649, in send
File "build/bdist.linux-x86_64/egg/suds/client.py", line 702, in failed
File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 265, in get_fault
bigsuds.ServerError: Server raised fault: 'Exception caught in ASM::urn:iControl:ASM/Policy::upload_xml_profile_wsdl()
Exception: Common::OperationFailed
primary_error_code : 0 (0x00000000)
secondary_error_code : 0
error_string : The XML profile doesn't have a WSDL file'
Any idea what is missing? Has anyone been successful in uploading a schema file to an XML profile in ASM?