Forum Discussion

JD_73952's avatar
JD_73952
Icon for Nimbostratus rankNimbostratus
Dec 09, 2011

perl API issue - unrecognized type error

Normally I'm not one to post on forums for help as I prefer to root around the internet, forums and documentation and learn the hard way, but after spinning my wheels on this one for a couple of days, I'm throwing in the towel.

 

 

I'm pretty new to the perl SOAP::Lite module, but not so new to perl programming (10+ years). From what I've been able to ascertain, I'm not doing anything wrong with the SOAP::Lite module nor with the iControl APIs, yet I continue to get this error that I need to resolve.

 

 

***

 

I've TRIED attaching the simple perl file as well as the output from the script, but no luck with either IE or Chrome - Ajax(?) calls seem to hang both when I try attaching AND putting the text inline in this post

 

How else do I get the code and output here? Email?

 

***

 

 

I appear to be able to get to the iControl:System/Connections API on the F5 server that I'm querying as I AM able to retrieve the version info from the server (BIG-IP VERSION [BIG-IP_v10.2.3]), but on the very next call when I make a call to get_list (as specified in the documentation here http://devcentral.f5.com/wiki/iControl.System__Connections.ashx), I receive the error 'Unrecognized type '{urn:iControl}Common.ProtocolType' followed by the SOAP envelope that apparently contains exactly the data I'm trying to get at.

 

 

I should mention that I am also having troubles accessing some of the System/Statistics methods as well - some work fine, others erroring out with the same type of error '{urn:iControl}Common.StatisticType'.

 

 

Is this something that is perhaps set up incorrectly on the F5 server that is causing this? Or am I totally missing something important on my client-side setup or my understanding of this interface?

 

 

Please help and thanks for your time.

 

 

Trying to put SOME of the code/output here:

 

 

[code snippet]

 

my $resp = $SysConnInfo->get_version();

 

if (checkResponse(SOAP => $resp, METHOD => 'get_version'))

 

{ my $verInfo = $resp->result; print "BIG-IP VERSION [$verInfo]\n"; }

 

 

$resp = $SysConnInfo->get_list(); if (checkResponse(SOAP => $resp, METHOD => 'get_list')) { print "Getting here!\n"; }

 

[/snippet]

 

 

[output snippet]

 

Unrecognized type '{urn:iControl}Common.ProtocolType'

 

(BUNCHES OF XML OUTPUT HERE showing the data I want to get at)

 

at ./ya.pl line 32

 

 

BIG-IP VERSION [BIG-IP_v10.2.3]

 

[/output]

 

 

 

If someone could provide an email address or some other method, I could send the code/output in it's entirety.

 

 

Thanks.

 

JD

 

 

p.s. This forum interface is very difficult to work with.

1 Reply

  • I've resolved this. Chalk this one up to ignorance.

     

     

    Through all of my research on this site in the perl section, I did not find any reference to the fact that you needed to place the iControlTypeCast.pm module in your @INC and then 'use iControlTypeCast.pm' in your script. Possibly a seemingly rookie mistake, but being unfamiliar with SOAP::Lite, I was thinking that those definitions were carried through in the SOAP response from the server.

     

    I only started suspecting that this was the case when I found an example perl script that included iContrlTypeCast.

     

     

    This should be a bullet point in the 'Quick start for perl' section of this site.

     

     

    I also needed to go in and make a few changes to the iControlTypeCast.pm file to handle some 'undef' and 'subroutine redefined' errors when using '-w' and 'use strict'. I actually also found that these problems had been addressed earlier and supposedly rolled into the archived version of iControlTypeCast.pm, but apparently those changes were lost between revision. (http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/59992/showtab/groupforums/Default.aspx)