Forum Discussion

Thomas_Schaefer's avatar
Thomas_Schaefer
Icon for Nimbostratus rankNimbostratus
Oct 30, 2008

add_address_class_member: When is typed, receives an error

Hello.

I have been struggling with an issue with using add_address_class_member.

I was having an issue with a program that consumes the web service so I decided to just use the raw XML and SoapUI to see what is happening.

When I send in the XML, I receive an error that the BigIP cannot convert the address string to an address. However, if I remove the type information from it works.

This is the error:

  
    
       
          
           SOAP-ENV:Server  
           Exception caught in LocalLB::urn:iControl:LocalLB/Class::add_address_class_member()  
  Exception: Common:perationFailed  
  primary_error_code   : 16908320 (0x01020020)  
  secondary_error_code : 0  
  error_string         : 01020020:3: The text string cannot be converted to an IP address.  
          
       
    
  

Here is the XML I sent that generated that error:

  
       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  
     xmlns:tns="urn:iControl"  
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"  
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">  
       
          
             
                
                 ftp_black_list  
                   
                      
                       192.168.16.5  
                       255.255.255.255  
                      
                   
                
             
          
       
  

Note that if I remove the type information (xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:LocalLB.Class.AddressEntry[2]") from members, it works.

According to the SOAP generator at http://www.soapclient.com/soapclient.com/soaptest.html, this is correct XML so I am confused if there is an issue with the parser on the BigIP when using add_address_class_member.

Thanks,

Tom Schaefer

8 Replies

  • Here is the trace from the SOAP::Lite perl client. The main difference I see is that you are specifying 2 entries for each of the arrays but only passing in one. That could be what's accounting for the cannot convert error.

     
          soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
        
          
            
              
                
                  
                   192.168.16.5 
                   255.255.255.255 
                  
                
               ftp_black_list 
              
            
          
        
     

    I would like to explore more deeply why you are resorting to passing raw XML. What issues were you having with the client toolkit you are using? Which one was it?

    I guarantee you are going to keep getting stuck with issues like this if you are hand rolling your own XML.

    -Joe
  • Did that actually work. I submitted that XML in SoapUI and received an error.

    I am using a product that calls a web service on our Unisys mainframe. It is not any standard toolkit. I wanted to eliminate if I had an issue with the generated XML so I was trying to find out the difference in SoapUI. I do not plan on rolling my own all the time. As I said though, if you paste that content above from Perl, I also get an error.

    Invalid value for array encoding tag 'arrayType': anyType[ 1 ] 
     

    Thanks,

    Tom
  • Sorry about that.

     

     

    Remove the spaces from "[ 1 ]" array sizes. The forums turn the bracket-1 into a funky character when rendering the post (another todo item on my list). I changed it so it would display properly but forgot about that issue with the decoder. I didn't verify that this worked as my BIG-IP is down and I'm working remote for the next few days but I'm 99% confident that it should be good - outside of the brackets.

     

     

    -Joe
  • Joe,

    This is the output generated by Visual Studio from the WSDL and even this does not work...

     
           xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
          xmlns:tns="urn:iControl" 
          xmlns:types="urn:iControl/encodedTypes" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
         
           
             
           
           soapenc:arrayType="tns:LocalLB.Class.AddressClass[2]"> 
             
             
           
           xsi:type="tns:LocalLB.Class.AddressClass"> 
            ftp_black_list 
             
           
           soapenc:arrayType="tns:LocalLB.Class.AddressEntry[2]"> 
             
             
           
           xsi:type="tns:LocalLB.Class.AddressEntry"> 
            192.168.16.5 
            255.255.255.255 
           
         
      
     

    Are you aware of any examples of using the add address class from VS?

    I will also try the updated Perl example...

    Thanks,

    Tom
  • Puli's avatar
    Puli
    Icon for Nimbostratus rankNimbostratus
    Can you please point me to where the perl code is.

     

    Am also trying to update a address data group and running to errors.

     

    Would appreciate if you can past the perl code.

     

    thanks.
  • This was a customer that posted the reference to having perl code. I can easily whip you up something tomorrow though. I'll reply to this thread when I've got something up in the CodeShare.

     

     

    -Joe
  • Here's some code that I just wrote that illustrates the Class.get_address_class_list, get_address_class, create_address_class, delete_class, add_address_class_member, and delete_address_class_member methods.

     

     

    http://devcentral.f5.com/Wiki/default.aspx/iControl/PerlAddressClass.html

     

    Click here

     

     

     

    Let me know if this is what you were looking for. If not, I can add to it if there's something else you are having troubles with.

     

     

    -Joe