【问题标题】:Eclipse fails to create Web Service client using AXIS2 and CXFEclipse 无法使用 AXIS2 和 CXF 创建 Web 服务客户端
【发布时间】:2013-01-17 17:04:13
【问题描述】:

在尝试从提供的 WSDL 开发 WS 客户端几天后,我发现我一直在使用axis,而不是axis2...

好吧,我正在做的是右键单击 wsdl > New > Other > Web Service Client。

在向导窗口中,“Web 服务运行时”一直设置为“Apache Axis”,而我没有看到。单击它,我可以选择“Apache Axis2”和“Apache CXF 2.x”,但两者都失败了,而“Apache Axis”“工作”:客户端已创建,但不会将标题用户名和密码添加到 XML请求。

这是我在尝试使用 CXF 时遇到的错误:

Unable to add the follwing facets to project SIAPP_WS_FORNECEDOR_CFX_01: CXF 2.x Web Services.
    org.eclipse.wst.common.project.facet.core.FacetedProjectFrameworkException: Failed while installing CXF 2.x Web Services 1.0.
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1507)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:324)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:339)
    at org.eclipse.jst.ws.internal.consumption.ui.common.FacetOperationDelegate$1.run(FacetOperationDelegate.java:62)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Caused by: org.eclipse.core.runtime.CoreException: CXF Runtime location not set. Please set location in Preferences > Web Services > CXf 2.x Preferences
    at org.eclipse.jst.ws.internal.cxf.facet.CXFFacetInstallDelegate.execute(CXFFacetInstallDelegate.java:50)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    ... 8 more

【问题讨论】:

    标签: cxf axis webservice-client eclipse-wtp


    【解决方案1】:

    对于 CXF,您需要转到 Preference -> Web Service -> CXF 2.x Preferences 并添加 CXF 运行时(指向 CXF 安装)。这应该允许它找到 CXF 所需的 wsdl2java 工具(等等)。

    【讨论】:

      猜你喜欢
      • 2011-10-10
      • 2013-12-05
      • 1970-01-01
      • 1970-01-01
      • 2011-09-10
      • 2011-02-03
      • 2014-01-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多