★あらたなVM。Always Freeに移行できた★
wsdl (http://35.225.1.11:8080/GunClockWebService/gunchara.ws?wsdl)
実行例
>java -jar GunClockWebServiceClient.jar __ _|__|_ b (@@) V|~~|> //T| __AA | 6 |__P ~~| l /_/~l_l |
@WebMethod
public String getCharacter( @WebParam( name="charaNumber" ) int charaNumber ){
switch ( charaNumber ) {
case 1:
return
" __ \n" +
" _|__|_ \n" +
"b (@@) \n" +
" V|~~|> \n"+
" //T| ";
case 2:
return
"__AA \n" +
"| 6 |__P\n" +
"~~| l\n" +
" /_/~l_l\n" +
" \n";
default:
return "invalid chara number";
}
}
}
|
import java.net.URL;
import javax.xml.namespace.QName;
import ryu.webservice.*;
public class GunClockWebServiceClient {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
GunChara_Service service = new GunChara_Service();
GunChara servicePort = service.getGunCharaPort();
URL url = new URL("http://35.225.1.11:8080/GunClockWebService/gunchara.ws?wsdl");
GunChara_Service serviceWithUrl = new
GunChara_Service(url,new QName("http://ryu/webservice","GunChara"));
GunChara servicePortWithUrl = serviceWithUrl.getGunCharaPort();
System.out.println(servicePortWithUrl.getCharacter(1));
System.out.println(servicePortWithUrl.getCharacter(2));
}
}
|