Raritan Computer CC-WSAPI-0B-v5.1.0-E Marine Radio User Manual


 
Appendix B: Web Services Development in Java
35
public static void set_service_end_point( Service
service, BindingProvider port )
{
Pattern pattern = Pattern.compile( "CC_SG_" );
Matcher matcher = pattern.matcher(
service.getServiceName().getLocalPart() );
String service_name = matcher.replaceFirst( "" );
if( ccsg_port.length() < 1 )
ccsg_port = "9443";
if( ccsg_address.length() > 0 )
{
port.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"https://" + ccsg_address + ":" + ccsg_port +
"/CommandCenterWebServices/" +
service_name + "Port?wsdl" );
}
}
static String get_input( String message )
{
System.out.println(message);
BufferedReader reader = new BufferedReader(new
InputStreamReader(System.in));
String name = null;
try {
name = reader.readLine();
} catch (IOException ioe)
{