1 package org.codehaus.ivory; 2 3 import javax.xml.namespace.QName; 4 import javax.xml.rpc.ParameterMode; 5 import javax.xml.rpc.encoding.XMLType; 6 7 import org.apache.axis.client.Call; 8 import org.apache.axis.client.Service; 9 10 /*** 11 * A client for the SparePartInfo service. 12 * 13 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 14 * @since Mar 11, 2003 15 */ 16 public class SparePartInfoClient 17 { 18 public String getPartInfo(String PartSKU) throws Exception 19 { 20 // EndPoint URL for the SparePartInfo Web Service 21 String endpointURL = "http://localhost/services/SparePartInfo"; 22 23 // Method Name to invoke for the SparePartInfo Web Service 24 String methodName = "getPartInfo"; 25 26 // Create the Service call 27 Service service = new Service(); 28 Call call = (Call) service.createCall(); 29 call.setTargetEndpointAddress(new java.net.URL(endpointURL)); 30 call.setOperationName(new QName("SparePartInfo",methodName)); 31 call.addParameter( "sku", 32 XMLType.XSD_STRING, 33 ParameterMode.IN ); 34 35 call.setReturnType( XMLType.XSD_FLOAT ); 36 37 //Setup the Parameters i.e. the Part SKU to be passed as input parameter to th 38 //SparePartInfo Web Service 39 Object[] params = new Object[] { PartSKU }; 40 41 //Invoke the SparePartInfo Web Service 42 return (String) call.invoke(params); 43 } 44 }

This page was automatically generated by Maven