vADC Forum

Reply
New Contributor
Posts: 3
Registered: ‎07-16-2015

Exception in SOAP Control JAVA API for SteelApp

Hi All

 

I am getting the given below exception while invoking the given below SOAP java API's for SteelApp :-

 

1. com.zeus.soap.zxtm._1_0.SystemStatsBindingStub.getNodes

2. com.zeus.soap.zxtm._1_0.SystemStatsBindingStub.getPools

3. com.zeus.soap.zxtm._1_0.SystemStatsBindingStub.getVirtualservers

 

 

Given below is the exception :-

 

java.lang.IllegalArgumentException: array element type mismatch
at java.lang.reflect.Array.set(Native Method)
at org.apache.axis.utils.ArrayUtil.convertArrayToObject(ArrayUtil.java:271)
at org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:392)
at com.zeus.soap.zxtm._1_0.SystemStatsBindingStub.getNodes(SystemStatsBindingStub.java:9212)
at com.perspica.localstation.nmplugins.lb.DCSteelAppCollectImpl.getNodes(DCSteelAppCollectImpl.java:171)
at com.perspica.localstation.nmplugins.lb.DCSteelAppCollectImpl.getNodeStats(DCSteelAppCollectImpl.java:177)
at com.perspica.localstation.nmplugins.lb.DCSteelAppCollectImpl.delegateCollect(DCSteelAppCollectImpl.java:99)
at com.perspica.localstation.nmplugins.lb.AbstractLoadBalancerDataSource.collect(AbstractLoadBalancerDataSource.java:1188)
at com.perspica.localstation.nmplugins.lb.DCSteelAppCollectImpl.run(DCSteelAppCollectImpl.java:81)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

 

Can anyone please help?

 

Thanks and Regards

Subramaniam

Brocadian
Posts: 17
Registered: ‎05-22-2015

Re: Exception in SOAP Control JAVA API for SteelApp

Hi Subramaniam,

 

I think the problem is in your code or in the way the WSDL files were converted to Java. I have used the AXIS kit to convert the WSDLs in 10.0r1 to Java stubs and the generated SOAP classes work for me ;-)

 

mark@goldfish ~/Source/eclipse/StingraySoapTools $ StatsGetNodes
Node: 10.1.1.92
Node: 10.1.1.92
Node: 10.1.1.91
Node: 10.1.1.91
Pool: finger
Pool: finger-pool1
Pool: finger-pool2
Pool: www.demo.local
VServer: Builtin DNS TCP
VServer: Builtin DNS UDP
VServer: finger
VServer: www.demo.local
SUCCESS

 

Could you try compiling and running the below java code against your STM using your generated SOAP classes?

 

package stingray.api;

import com.zeus.soap.zxtm._1_0.*;
import java.security.Security;

import javax.xml.rpc.ServiceException;


public class StatsGetNodes {

	public static void main( String[] args ) {

		if ( args.length !=  1) {
			System.out.println("Usage: StatsGetNodes <ZTM URL>");
			System.out.println("   Eg: StatsGetNodes https://admin:admin@1.2.3.4:9090/soap");
			System.exit(1);
		}

		String url = args[0];
		int nodeCount = 0;

		// Install the all-trusting trust manager
		//Security.addProvider( new X509Provider() );
		//Security.setProperty( "ssl.TrustManagerFactory.algorithm", "TrustAllCertificates" );

		try {
			SystemStatsLocator sl = new SystemStatsLocator();
			sl.setSystemStatsPortEndpointAddress( url );
			//SystemStatsPort sp = sl.getSystemStatsPort();
			SystemStatsBindingStub stub = (SystemStatsBindingStub) sl.getSystemStatsPort();
			SystemStatsNode[] nodes = stub.getNodes();
			String[] pools = stub.getPools();
			String[] vs = stub.getVirtualservers();

			for (int i=0; i< nodes.length; i++ ) {
				System.out.println("Node: " + nodes[i].getAddress());
			}
			for (int i=0; i< pools.length; i++ ) {
				System.out.println("Pool: " + pools[i]);
			}
			for (int i=0; i< vs.length; i++ ) {
				System.out.println("VServer: " + vs[i]);
			}
			

		} catch (ServiceException s) {
			System.err.println("ERROR: Failed to connect to Traffic Manager. " + s.toString());
			System.exit(1);
		} catch (Exception e) {
			System.out.println( "ERROR: " + e.toString() );
			System.exit(1);
		} 
		System.out.println("SUCCESS");
	}
}

 

Cheers,

Mark

 

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.