在这里
.
更新:我目前已经签署了我所有的JAR。我似乎仍然无法以它可以找到WSDL的方式获得CXF设置。我最后一次尝试是将WSDL放在WAr文件中,这样我就可以通过web浏览器访问它。我将客户端内部的wsdllocation设置为URL(
http://www.example.com/app/example.wsdl
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
at javax.xml.ws.Service.<init>(Unknown Source)
谷歌在这方面几乎什么也没发现。
我正在使用
Apache CXF
Can not initialize the default wsdl from ../resource/example.wsdl
Exception in thread "AWT-EventQueue-0" java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
我没有对我的web start应用程序进行签名,我不希望这样做,因为我没有从客户机访问任何资源。这个
WSDL
上面提到的是打包在我的罐子里的。此问题是由CXF生成的客户端代码引起的:
URL url = null;
try {
url = new URL("../resource/example.wsdl");
} catch (MalformedURLException e) {
System.err.println("Can not initialize the default wsdl from ../resource/example.wsdl");
// e.printStackTrace();
}
WSDL_LOCATION = url;
如何将CXF正确指向此WSDL?我还担心类上的WebService注释:
@WebServiceClient(name = "Example",
wsdlLocation = "../resource/example.wsdl",
targetNamespace = "http://services.example.com/")