问题描述
- JAX-WS的相关问题,无法正确显示结果
- 用eclipse LUNA版本做了一个Web Service的服务端,然后通过自动生成了客户端。我在客户端里写了个类,可是报错了,不知道该怎么办,求各位大神帮忙。在测试WS的时候是可以的
以下是客户端的类
public class MyJDBCClient {
/**- @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
MyJDBCService service = new MyJDBCServiceLocator();
MyJDBCProxy client = (MyJDBCProxy) service.getMyJDBC();String readResult = client.read(1);
System.out.println(readResult);String writeResult = client.write(9JACK ROSE""E:/Folder/some.doc""); System.out.println(writeResult);
}
catch (Exception e)
{
System.err.println(""Execution failed. Exception: "" + e);
}
}}
以下是抛出的异常:
警告: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
Execution failed. Exception: java.lang.ClassCastException: server.MyJDBCSoapBindingStub cannot be cast to server.MyJDBCProxy
该如何解决,求指导 - @param args
时间: 2024-09-29 08:34:03