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
- Sunit_Tailor_11
Nimbostratus
I am running this code with in Websphere GUI using run as java application. I have removed comment on following code and that has removed earlier error:
" Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());"
Now I am getting following error:
" faultString: java.lang.SecurityException: Prohibited package name: java.net"
Appreciate your help.. - arkus_10691
Nimbostratus
I think IBM dropped sun as a default provider in WAS 5.1.1. I use com.ibm.jsse.IBMJSSEProvider() - Sunit_Tailor_11
Nimbostratus
I would appreciate if you let me know where in Websphere directory structure I can find "IBMJSSEProvide" class. I looked at "C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51\java\jre\lib\ext"
and also at "C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51\lib"
I couln't find it.
I would appreciate if you let me know.
Thanks - arkus_10691
Nimbostratus
C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51\java\jre\lib\ibmjsseprovider.jar
When you need to find a class and don't know the package, you usually use Windows Explorer to search jars for the class name. Not high tech, but it works.
If you know the full package class name, then a better option is to run a servlet to search using the classloader hierarchy.
Class theClass = Class.forName("com.xxx.xxx.SomClass");
ClassLoader loader = theClass.getClassLoader();
URL aURL = loader.getResource("com.xxx.xxx.SomClass");
aURL.getFile(); - Sunit_Tailor_11
Nimbostratus
Hi bmcgovern,
Let me start from the scrach, since I have not been able to get started with icontrol 9.0.
I would appreciate if you provide insight on following:
1) I downloaded icontrol 9.0 zip file from devcentral. I would appreciate if you let me know how did you make jar file using java with in websphere 5.1.1 for icontrol.
2) Once we have icontrol jar file. To execute "LocalLBPool.java" with in Websphere 5.1.1, what other jar files do I need. I have downloaded "XTrustProvider.java" and I am using "XTrustProvider.install();" in my "LocalLBPool.java".
I would appreciate if you provide any insight on these questions. This will help me to get started.
Thanks,
-Sunit - 1) I downloaded icontrol 9.0 zip file from devcentral. I would appreciate if you let me know how did you make jar file using java with in websphere 5.1.1 for icontrol.
The jar file I provide to you was created by running the make script in the axis subdirectory on the SDK. A section of this script runs WSDL2Java (part of Apache Axis) on the wsdl files. This will put the bindings in the bindings subdirectory. I went into that directory and compiled all the java files with the javac command and this created .class files. I then moved them into another directory (to get rid of the sources) and ran jar to create the archive.
2) Once we have icontrol jar file. To execute "LocalLBPool.java" with in Websphere 5.1.1, what other jar files do I need. I have downloaded "XTrustProvider.java" and I am using "XTrustProvider.install();" in my "LocalLBPool.java".
The only jar files you should need beyond that are the ones distributed with Apache Axis and the JSSE provider libraries. I'm getting a feeling that this is the issue you are running into as I've heard that WebSphere has it's own version of those libraries. Since I've never used WebSphere I'm not quite sure the details around that. Hopefully someone else out there who is successfully making secure webservice calls from within WebSphere can chime in and help out with configuration.
The XTrustProvider is just another java file that you can include in your project. It hooks into the JSSE layer to allow self-signed certificates in the local acceptance policy. - Ok, I got WebSphere configured to work with HTTPS requests. Here's the steps I took to get things running.
1. install WebSphere 5.1.2
2. Create iControl jar file
2.a. cd {sdk_root}/sdk/samples/soap/java/apache/axis
2.b. edit setenv.bat with local java settings
2.c. run make.bat to create the binding sources
2.d. cd bindings/iControl
2.e. javac -classpath .. *.java
2.f. javac -classpath .. holders/*.java
2.g. cd ../..; mkdir obj; cd obj
2.h. xcopy ../bindings/* . /s /e
2.i. del /s *.java
2.k. jar cvf iControl.jar iControl
3. Create new project in WebSphere
4. Load up one of the sample files
5. Add the following external libraries to the project
{from WebSphere's runtime}
-- ibmjsse.jar
-- xml.jar
{from axis}
-- activation.jar
-- axis.jar
-- commons-discovery.jar
-- commons-logging.jar
-- jaxrpc.jar
-- mail.jar
-- wsdl4j-1.5.1.jar
{from sun}
-- saaj.jar
{iControl}
-- iControl.jar
6. Add the following to the java.security file in your WebSphere runtime
security.provider.3=com.ibm.jsse.IBMJSSEProvider
This was found in this technote from IBM:
http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was.doc/html/Java_Security_(JSSE_JCE)/1188709.html
Click here
7. Compile and run
Hope this helps...
-Joe
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
