Pregunta

After a few days trying to develop a WS client from a provided WSDL, I discover I was all this time using axis, and not axis2...

Well, what I'm doing is right clicking the wsdl > New > Other > Web Service Client.

In the wizard window, 'Web service runtime' was all this time set to 'Apache Axis', and I didn't see that. Clicking on it I'm able to choose 'Apache Axis2' and 'Apache CXF 2.x', but both fails, while 'Apache Axis' "works": client is created, but doesn't add header username and password to XML request.

Here's the error I get when trying to use 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
¿Fue útil?

Solución

For CXF, you would need to go to Preference -> Web Service -> CXF 2.x Preferences and add a CXF runtime (point to an CXF installation). That should allow it to find the wsdl2java tool (and such) that would be needed for CXF.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top