package com.westat.ctsu.cews; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import java.security.Security; import com.westat.ctsu.cews.CewsResponse; import org.apache.axis.encoding.ser.BeanDeserializerFactory; import org.apache.axis.encoding.ser.BeanSerializerFactory; import javax.xml.namespace.QName; import javax.xml.rpc.ParameterMode; public class NodeTesterComplex { public static void main(String[] args) { NodeTesterComplex node = new NodeTesterComplex(); CewsResponse cewsResponse = node.invokeClient(); System.out.println("[ResponseStatusText] " + cewsResponse.getResponseStatusText()); System.out.println("[getResponseStatus] " + cewsResponse.getResponseStatus()); } public NodeTesterComplex() { } /** * Web Service Client * @return */ public static CewsResponse invokeClient() { String endPoint = "https://www3.ctsu.org/cews/services/rssDataUpdate"; CewsResponse cewsResponse = new CewsResponse(); String result = ""; String input1 = "INSERT"; int input2 = 510416; Long input3 = 0L; String input4 = "ECOG"; String input5 = "All"; String input6 = "Co-Principal Investigator"; String input7 = "PERSON_ROSTER"; String input8 = "IN015"; String input9 = ""; String input10 = ""; String input11 = ""; String input12 = "Active"; try { System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); // Create a stub object Service service = new Service(); Call call = (Call)service.createCall(); QName qnResp = new QName("urn:com.westat.ctsu.cews", "CewsResponse"); call.registerTypeMapping(CewsResponse.class, qnResp, new BeanSerializerFactory(CewsResponse.class, qnResp), new BeanDeserializerFactory(CewsResponse.class, qnResp)); call.setTargetEndpointAddress(new java.net.URL(endPoint)); call.setReturnClass(com.westat.ctsu.cews.CewsResponse.class); call.addParameter("input1", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input2", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input3", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input4", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input5", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input6", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input7", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input8", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input9", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input10", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input11", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("input12", org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(qnResp); call.setOperationName(new javax.xml.namespace.QName("maintainPersonRoles")); cewsResponse = (CewsResponse)call.invoke(new Object[] {input1, input2, input3, input4, input5, input6, input7, input8, input9, input10, input11, input12 }); if (cewsResponse != null) { System.out.println("CewsResponse object is not null"); } else { System.out.println("CewsResponse object is null"); } } catch (Exception ex) { System.out.println("[invokeClient] Exception: " + ex.toString()); result = ex.toString(); } return cewsResponse; } }