System.exit(1);
}
/* Define the service QName and port QName */
/*******************************************/
QName servQN = new QName("urn:xmltoday-delayed-quotes",
"GetQuoteService");
QName portQN = new QName("urn:xmltoday-delayed-quotes", "GetQuote");
/* Now use those QNames as pointers into the WSDL doc */
/******************************************************/
Service service = ServiceFactory.newInstance().createService(
new URL("file:samples/stock/GetQuote.wsdl"), servQN);
Call call = service.createCall(portQN, "getQuote");
/* Strange - but allows the user to change just certain portions of */
/* the URL we're gonna use to invoke the service. Useful when you */
/* want to run it thru tcpmon (ie. put -p81 on the cmd line). */
/********************************************************************/
opts.setDefaultURL(call.getTargetEndpointAddress());
call.setTargetEndpointAddress(opts.getURL());
/* Define some service specific properties */
/*******************************************/
call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());
/* Get symbol and invoke the service */
/*************************************/
Object result = call.invoke(new Object[] {symbol = args[0]});
/* Reuse the Call object for a different call */
/**********************************************/
call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "test"));
call.removeAllParameters();
call.setReturnType(XMLType.XSD_STRING);
System.out.println(call.invoke(new Object[]{}));
return ((Float) result).floatValue();