在Weblogic环境中使用jax-ws客户端方法

时间:2013-08-13 14:41:46

标签: java jax-ws weblogic nosuchmethoderror

我遇到了使用Weblogic 10.3的jax ws客户端的问题。我在简单的java项目中生成webservice存根并测试与webservice的连接。一切正常。但是当我在jar文件中打包这个项目并将其添加到包含其他jar并在weblogic上运行的主项目时,我得到:

java.lang.NoSuchMethodError: org.home.client.AddressWS.getAddressByRequestAsync(ILjava/lang/String;)Ljavax/xml/ws/Response;

当我尝试调用webservice stub的方法时抛出了这个异常。

public class MyServiceImpl implements MyService {

private AddressWS service;
private static final String ENDPOINT = "http://endpoint.address.ws.company.org/";
private static final String SERVICE_NAME = "AddressWSImplService";

@Override
public void setSOAPServiceURL(String serviceURL) {
    URL url = createURL(serviceURL);
    QName qName = new QName(ENDPOINT, SERVICE_NAME);
    AddressWSImplService addressWSImplService= new AddressWSImplService(url, qName);
    service = addressWSImplService.getAddressWSImplPort();
}

@Override
public String getAddressById(int id, String param) throws TimeoutException {
    // NoSuchMethodError was thrown here
    final Response<GetAddressById> response = service
            .getAddressByIdAsync(id, param);
    return (String) getValue(new Future<String>() {...});}

任何指针都会有所帮助。

0 个答案:

没有答案