Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Web services lookup - issues on loading WSDL file #4813

Open
dave-csc opened this issue Jan 23, 2025 · 2 comments
Open

[Bug]: Web services lookup - issues on loading WSDL file #4813

dave-csc opened this issue Jan 23, 2025 · 2 comments

Comments

@dave-csc
Copy link
Contributor

Apache Hop version?

2.11.0

Java version?

17.0.2

Operating system

Linux

What happened?

Choose a test file for the Web services lookup transform: if the WSDL file resides in the ${PROJECT_HOME} folder, the transform fails because it tries to look for a folder with the URL-escaped braces, e.g. file:/opt/apache/hop-2.11.0/$%7BPROJECT_HOME%7D/wsdl/my_wsdl_v2.8.wsdl.

Tentative workaround: select the file (without pressing Open) in the Test file GUI window, copy the composed path and paste it in the URL field. However, when pressing Load the following exception is raised:

RuntimeException: Could not load WSDL file: 
org.apache.http.client.ClientProtocolException
 at org.apache.hop.ui.hopgui.HopGui.main (HopGui.java:354)
 at org.apache.hop.ui.hopgui.HopGui.open (HopGui.java:476)
 at org.eclipse.swt.widgets.Display.readAndDispatch (Display.java:4517)
 at org.eclipse.swt.widgets.Display.runDeferredEvents (Display.java:5065)
 at org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1617)
 at org.eclipse.swt.widgets.Display.sendEvent (Display.java:5855)
 at org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:91)
 at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:237)
 at org.apache.hop.ui.hopgui.file.pipeline.HopGuiPipelineGraph.mouseUp (HopGuiPipelineGraph.java:940)
 at org.apache.hop.ui.hopgui.file.pipeline.HopGuiPipelineGraph.editTransform (HopGuiPipelineGraph.java:3368)
 at org.apache.hop.ui.hopgui.file.pipeline.delegates.HopGuiPipelineTransformDelegate.editTransform (HopGuiPipelineTransformDelegate.java:195)
 at org.apache.hop.pipeline.transforms.webservices.WebServiceDialog.open (WebServiceDialog.java:1264)
 at org.apache.hop.ui.core.dialog.BaseDialog.defaultShellHandling (BaseDialog.java:528)
 at org.eclipse.swt.widgets.Display.readAndDispatch (Display.java:4517)
 at org.eclipse.swt.widgets.Display.runDeferredEvents (Display.java:5065)
 at org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1617)
 at org.eclipse.swt.widgets.Display.sendEvent (Display.java:5855)
 at org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:91)
 at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:265)
 at org.apache.hop.pipeline.transforms.webservices.WebServiceDialog$3.widgetSelected (WebServiceDialog.java:889)
 at org.apache.hop.pipeline.transforms.webservices.WebServiceDialog.initTreeTabWebService (WebServiceDialog.java:331)
 at org.apache.hop.pipeline.transforms.webservices.WebServiceDialog.loadWebService (WebServiceDialog.java:170)
 at org.apache.hop.pipeline.transforms.webservices.wsdl.Wsdl.<init> (Wsdl.java:75)
 at org.apache.hop.pipeline.transforms.webservices.wsdl.Wsdl.parse (Wsdl.java:356)
 at org.apache.hop.pipeline.transforms.webservices.wsdl.Wsdl.readWsdl (Wsdl.java:365)
 at org.apache.hop.core.HttpProtocol.get (HttpProtocol.java:81)
 at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:56)
 at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:108)
 at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83)
 at org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:187)

Root cause: ProtocolException: Target host is not specified

Tentative workaround of workaround 😅 : add a file:// marker before the composed path as explained above. This time the exception raised is:

RuntimeException: Could not load WSDL file: 
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: file:///work/hop/config/projects/my_project/wsdl/my_wsdl_v2.8.wsdl
URI does not specify a valid host name: file:///work/hop/config/projects/my_project/wsdl/my_wsdl_v2.8.wsdl

Root cause: ClientProtocolException: URI does not specify a valid host name: file:///work/hop/config/projects/my_project/wsdl/my_wsdl_v2.8.wsdl

Issue Priority

Priority: 2

Issue Component

Component: Hop Gui, Component: Transforms

@mattcasters
Copy link
Contributor

Unfortunately there are too many unsupported WSDL formats which are not supported by the underlying libraries.
Perhaps it's easier to just use SoapUI (or the like) to fill in the fields manually.

@dave-csc
Copy link
Contributor Author

dave-csc commented Jan 30, 2025

Hi @mattcasters,

I could use SoapUI to test the service and retrieve the input (request) and output (response) structures as XML.

But how can I map them in the Hop GUI properties table (the fields Name, WS Name and WS Type are requested)? There are no specs in the documentation for this...

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants