我在.NET中编写了一个简单的Web服务,它返回一个字符串值。javax.microedition.lcdui.TextField.setChars处的IllegalArgumentException
[WebMethod]
public string DeveloperInfo()
{
return "Chamara is the appliaction developer";
}
我需要使用J2ME application.following消耗它的代码我已经使用
if (displayable == ServiceForm) {
if (command == exitCommand1) {
// write pre-action user code here
switchDisplayable(null, getTaskList());
// write post-action user code here
} else if (command == okCommand2) {
try
{
new Thread(new Runnable()
{
public void run()
{
try {
service1.Service1_Stub service=new service1.Service1_Stub();
String Info= service.DeveloperInfo().toString();
txtService.setString(Info);
// write post-action user code here
} catch (Exception ex) {
ex.printStackTrace();
}
}
}).start();
}catch (Exception e){System.out.println(e.toString());}
它提供了以下异常
java.lang.IllegalArgumentException
at javax.microedition.lcdui.TextField.setChars(TextField.java:747)
at javax.microedition.lcdui.TextField.setString(TextField.java:666)
at com.sliit.j2me.tutorial.TaskList$1.run(TaskList.java:155)
如果我有错吗?
你能确定什么信息字符串包含? – 2010-08-24 08:17:43