无法访问wsdlURL - 使用Netbeans 7.0

时间:2011-05-25 10:40:59

标签: java java-ee jax-ws

首先在这里发帖,我在Netbeans 7.0上创建一个webservice客户端,按照所有步骤获得生成的代码(java-ws),我在Windows上构建了项目(.WAR)并将其复制到我的测试服务器( Unix上的JBOSS),当我运行客户端(通过我的Web浏览器)时,它会生成以下错误:

2011-05-25 13:20:31,272 WARN [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl]无法访问wsdlURL:file:/ C:/ Documents%20and%20Settings / FRGHOSN / Desktop / pp的.wsdl 2011-05-25 13:20:31,276 WARN [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl]无法获取端口元数据:{http://77.246.32.166/} CuWebServiceSoap

现在我检查了解决方案,有人建议更改生成的WebService类

这是我应该改变的部分:

@WebServiceClient(name = "CuWebService", targetNamespace = "http://xxx", wsdlLocation = "file:/C:/Documents%20and%20Settings/FRGHOSN/Desktop/pp.wsdl")
public class CuWebService
    extends Service
{

    private final static URL CUWEBSERVICE_WSDL_LOCATION;
    private final static WebServiceException CUWEBSERVICE_EXCEPTION;
    private final static QName CUWEBSERVICE_QNAME = new QName("http://xxx/", "CuWebService");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("file:/C:/Documents%20and%20Settings/FRGHOSN/Desktop/pp.wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        CUWEBSERVICE_WSDL_LOCATION = url;
        CUWEBSERVICE_EXCEPTION = e;
    }

我将网址编辑为url= client.CuWebservice.class.getResource("/WEB-INF/wsdl/pp.wsdl")

并且它无法正常工作

有什么建议吗?提前致谢

0 个答案:

没有答案