Forum Discussion
Jason_L__54018
Nimbostratus
Feb 21, 2008SNMPConfiguration.set_readonly_community call complains about no deserializer
Hi All,
This is my first time posting, so hopefully I'm not asking anything too dumb. I am trying to write a simple of proof of concept piece of code to simply set the SNMP readonly string using a SOAP call. I have been successful in making simple calls to functions that don't require any arguments, having worked through the first small hurdle of SOAP over HTTPS. Where I ran into trouble is when I tried to make a call to set_readonly_community that takes an array parameter.
I've read over similar examples in this forum and studied the Management.SNMPConfiguration.wsdl file intently, yet the call always throws a "no deserializer" type SOAP Fault.
Below is the XML trace of my client's request:
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">testStringdefault.1false
The response is the typical one I get when I've screwed up the message. I just can't seem to figure out why it doesn't like my request:
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
soapenv:Server.userException
org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType
localhost
Does anyone have any idea as to what's wrong with this request?
- How did you create your request? The anyType arrayType in the request looks like the culprit. Did you use the iControl library for Java to generate the client request or did you custom bake the WSDL's into your code base?
- Jason_L__54018
Nimbostratus
Hi Joe,SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance(); SOAPConnection con = scFactory.createConnection(); MessageFactory factory = MessageFactory.newInstance(); SOAPMessage message = factory.createMessage(); SOAPPart soapPart = message.getSOAPPart(); SOAPEnvelope envelope = soapPart.getEnvelope(); SOAPHeader header = envelope.getHeader(); SOAPBody body = envelope.getBody(); MimeHeaders headers = message.getMimeHeaders(); headers.addHeader( "SOAPAction", "set_readonly_community"); String authorization = Base64Coder.encodeString(username+":"+password); headers.addHeader("Authorization", "Basic " + authorization); header.detachNode(); Name bodyName = envelope.createName("set_readonly_community","", "urn:iControl:Management/SNMPConfiguration"); SOAPBodyElement gul = body.addBodyElement(bodyName); //Construct ro_community_info parameter Name childName = envelope.createName("ro_community_info"); SOAPElement roCommunity = gul.addChildElement(childName); Name arrayName = envelope.createName("type","xsi",""); roCommunity.addAttribute(arrayName,"SOAP-ENC:Array"); Name arrayType = envelope.createName("SOAP-ENC:arrayType","",""); roCommunity.addAttribute(arrayType,"xsd:anyType[1]");
- Jason_L__54018
Nimbostratus
Hi Joe, - We are not using Axis on our end. Our endpoint is very flexible and does not rely on the namespace for deserialization, but dynamically deserializes by element names. The error indicates that it's a server error, but I don't see how it could be. As for the case of the BIG-IP returning anyType in the SOAP Response, that's won't happen since the return code is void and there are no out params. That's why from first glance it looks to me like a client side serialization error in the request before it makes it to the BIG-IP.
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