Forum Discussion
arkus_10691
Nimbostratus
Jul 08, 2005multii-dimension array SOAPException
I'm using the SOAP api for iControl v9 within IBM's Rational Application Developer. Things have been going pretty well. (Your XTrustProvider is great!)
Problem: Attempting to invoke LocalLB.VirtualServer.get_default_pool_name() results in the following exception:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Arrays of arrays are not supported 'urn:iControl:Common.IPPortDefinition[][1]'.; targetException=java.lang.IllegalArgumentException: Arrays of arrays are not supported 'urn:iControl:Common.IPPortDefinition[][1]'.]
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at MyBigIP.VirtualServer_get_default_pool_name(MyBigIP.java:335)
Code:
String urnPool = new String("urn:iControl:LocalLB/Pool");
String[] pool_name_list = new String[] {"somename"};
Call call = updateConnectionInfo(urnPool);
Vector params = new Vector();
params.addElement(new Parameter("pool_names", String[].class, pool_name_list, null));
call.setParams(params);
call.setMethodName("get_member");
Response resp = call.invoke(m_endpoint, urnPool);
Can you please enlighten?
17 Replies
- Thanks for the kudos on the XTrustProvider, but they should really go to user 'Exnihilo' for contributing that piece of code to the DevCentral community.
As for your issue, it looks like App Developer uses Apache WS-SOAP which, it seems, does not support arrays of arrays and we make use of these in the 9.0 interfaces to support bulk requests. Development on Apache WS-SOAP stopped in 2002 and all development work is now on the Apache Axis project.
I've been digging in the Apache WS-SOAP sources and the ArraySerialization code (with last code change on 11/8/02) explicitly does not support Arrays of Arrays.public static Object getNewArray( String inScopeEncStyle, Element arrayEl, QName arrayItemType, XMLJavaMappingRegistry xjmr) throws IllegalArgumentException { ... if (componentTypeName.endsWith("]")) { throw new IllegalArgumentException("Arrays of arrays are not " + "supported '" + arrayTypeValue + "'."); } ... }
This slipped through the cracks on our testing for the 9.0 SDK as none of the supplied examples accessed the Array of Array methods.
I don't know much about the product you are using, but if there were a way to plugin with Apache Axis (http://ws.apache.org/axis/index.html - Click here) instead of WS-SOAP, then you should be all set as I've verified that Arrays of Arrays are supported in that toolkit. (If you haven't use Axis yet, it blows away WS-SOAP as it parses the WSDL into full client bindings with all the serialization done for you).
I will make sure to update the 9.2 SDK's list of supported toolkits to remove Apache WS-SOAP for this reason.
-Joe - arkus_10691
Nimbostratus
Ouch. If using WS-SOAP, that appears to drasticly limit the number of usable APIs.
I'm a neophyte to both web services and to iControl. I've been tasked with enhancing an existing administratin web app to provide the functionality to control BigIP nodes. The app currently uses an IBM supplied SOAP api to talk to the WebSphere app server dmgr process.
I strongly fear that the app will not play well with AXIS when running in a WebSphere App Server v5.1.1.2.
My early success with the SOAP API led me to think this would be a POC. Now I'm scared and alone. :-)
I need to be able to do the following and had planned on using these SOAP APIs:
Given vip, obtain pool name.
LocalLB.VirtualServer.get_default_pool_name
Given pool name, obtain list of node names
LocalLB.Pool.get_member
Determine if a node is enabled/disabled
LocalLB.NodeAddress.get_session_enabled_state
Determine if a node is up/down
LocalLB.NodeAddress.get_monitor_status (tells if it is up or down)
Enable/Disable new sessions to a node
LocalLB.NodeAddress.set_session_enabled_state
Enable/Disable connections to a node. (Force down)
LocalLB.NodeAddress.set_monitor_state
Any insights or suggestions would be appreciated.
(I will begin to determine if AXIS is an option in my situation) - Axis is a completely different package so the two should play very nicely together. I've built applications using both and there is no known issues doing so.
I've seen several reports on the web of people asking if anyone has implemented array of array support on WS-SOAP but haven't found one to date. If I find one I'll let you know.
As for Axis, our SDK provides make files to parse all the WSDL to produce full client binding wrappers. It's very slick and you can get back to programming to an API instead of having to pack and unpack parameters manually.
Let me know how it goes...
-Joe - arkus_10691
Nimbostratus
Joe,
Attempted to take your advice and use AXIS apis. Replaced the bindings with the supplied Axis bindings. Swapped out the SOAP samples for the AXIS samples.
Edited the LocalLBNodeAddress constructor to use the nifty XTrustProvider.
Added the axis.jar to the classpath.
Running the sample produces a NoClassDefFoundError. I believe that WebSPhere 5.1 removed the sun security provivder from the list of supplied providers.
I would like to use the default com.ibm.jsse.IBMJSSEProvider.
Have tried supplying the following code to no avail.
System.setProperty("java.protocol.handler.pkgs", "com.ibm.net.ssl.internal.www.protocol");
Security.addProvider(new com.ibm.jsse.IBMJSSEProvider());
Security.addProvider(new com.ibm.security.cert.IBMCertPath());
Any ideas?
Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/provider/Sun
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
at java.lang.Class.getConstructor1(Class.java:2063)
at java.lang.Class.getConstructor(Class.java:1124)
at org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:159)
at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:197)
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
at org.apache.axis.AxisProperties$1.run(AxisProperties.java:241)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:287)
at org.apache.axis.AxisProperties.newInstance(AxisProperties.java:237)
at org.apache.axis.AxisProperties.newInstance(AxisProperties.java:122)
at org.apache.axis.components.net.SocketFactoryFactory.getSecureFactory(SocketFactoryFactory.java:122)
at org.apache.axis.transport.http.HTTPSender.getSecureSocket(HTTPSender.java:155)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:116)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1851)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at iControl.LocalLBNodeAddressBindingStub.get_Session_Status(LocalLBNodeAddressBindingStub.java:800)
at LocalLBNodeAddress.getNodeInfo(LocalLBNodeAddress.java:87)
at LocalLBNodeAddress.parseArgs(LocalLBNodeAddress.java:55)
at LocalLBNodeAddress.main(LocalLBNodeAddress.java:125) - I don't have WebSphere to test this on but I did find a few hits on google with respect to Axis, WebSphere and SAAJ.
http://mail-archives.apache.org/mod_mbox/ws-axis-user/200503.mbox/%3c422E6220.2050301@agentissoftware.com%3e (Click here)
This link says that WebSphere 5.1 is compatible with Axis
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0405_reinitz/0405_reinitz.html (Click here)
And this thread looks like it's an identical issue to what you are running into
http://www-128.ibm.com/developerworks/forums/dw_expandTree.jsp?thread=33132&cat=10&forum=178&message=3602946 (Click here)
Which version of Axis are you using? The last post said the sun provider issue was fixed with Axis 1.1. From this message it looks like somewhere the sun provider is hardcoded into some class. You can always install the sunjce_provider.jar to your system as well.
You also might want to make sure you have the latest versions of the other libraries (axis, commons, wsdl4j, etc).
Wish I had more advice for you right now. When I get back into the office, I'll download a copy of WebSphere 5.1 and see if I can get it to work but that may not be until later in the week. I'll post if I have any update.
Let me know if you get things working in the interum.
-Joe - Also, this article describes how to the the Sun JCE provider from within WebSphere
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0306_yu/yu.html
(Click here)
-Joe - Sunit_Tailor_11
Nimbostratus
Hi bmcgoven,
I am trying to use iControl.jar version 9.0 with my Websphere 5.1.1. I am trying to execute "LocalLBPool.java" with in websphere as a java application. When move code for "XTrustProvider.java" to my websphere It is not able to resolve "javax.net.ssl.*". I would appreciate if you let me know which jar file should i load at runtime to resolve this issue.
Also, Did you able to resolve this "Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/provider/Sun
" exception.
I am pretty much trying the same thing what you have mentioned in your earlier note. I am using Websphere 5.1.1 and try to develope web front end to manage vvertual servers, pools and nodes.
I would appreciate your help.
Thanks
-Sunit - arkus_10691
Nimbostratus
The ibmjsse.jar file contains that package. - Sunit_Tailor_11
Nimbostratus
Thanks bmcgoven,
I added "jsse.jar" to resolve my earlier issue. Now I am getting following error:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException: SSL implementation not available
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: SSL implementation not available
at javax.net.ssl.DefaultSSLSocketFactory.createSocket([DashoPro-V1.2-120198])
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1511)
at com.vanguard.bigip.core.LocalLBPool.getInfo(LocalLBPool.java:85)
at com.vanguard.bigip.core.LocalLBPool.main(LocalLBPool.java:153)
{http://xml.apache.org/axis/}hostname:t62671
java.net.SocketException: SSL implementation not available
java.net.SocketException: SSL implementation not available
at javax.net.ssl.DefaultSSLSocketFactory.createSocket([DashoPro-V1.2-120198])
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at iControl.LocalLBPoolBindingStub.get_list(LocalLBPoolBindingStub.java:1511)
at com.vanguard.bigip.core.LocalLBPool.getInfo(LocalLBPool.java:85)
at com.vanguard.bigip.core.LocalLBPool.main(LocalLBPool.java:153)
I would appreciate all the help.
Thanks. - arkus_10691
Nimbostratus
If you are running a command-line app, ensure that you are using the WebSphere JRE. (Launch configuration)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
