netbeans webservice希腊字符

时间:2016-02-04 11:47:45

标签: java web-services

我在NetBeans中创建了一个Web应用程序,并且有一个简单的hello world Web服务,就像这样。

@WebMethod(operationName = "hello")
public String sayHello(@WebParam(name = "name") String txt) {
    return "Hello " + txt + " !";
  }
}

当我部署并尝试测试它时,如果我输入一个希腊词,我会得到这个例外:

WS00041: Service invocation threw an exception with message : 
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 
Invalid byte 2 of 2-byte UTF-8 sequence.; Refer to the server log for more details

Exceptions details : javax.xml.transform.TransformerException:   
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 2 of 2-byte UTF-8 sequence.

我试图找到一个改变编码但没有结果的解决方案,对此有什么解决方案吗?

0 个答案:

没有答案
相关问题