Need help with data access, to use a wsdl file for soap call

I need help on how to access data using SOAP call. I want to perform below actions:

  1. Connect to database server through webservice, providing username and password.
  2. Get the token from server, in response.
  3. Use the token to get the data columns I need.
  4. Get the response.
    How can I achieve this using knime. Need urgent help on this.
    Thank you!

I have tried using generic web service client node, but getting below error:
org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage Unexpected error forwarding to login page
org.apache.catalina.connector.ClientAbortException: An established connection was aborted by the software in your host machine

What needs to be done, to resolve the issue.

Able to perform connection, but getting below error while taking output from generic web service client node, which says invalid KNIME settings.

ERROR : KNIME-Worker-17-Generic Web Service Client 0:961 : : Node : Generic Web Service Client : 0:961 : Execute failed: Different child count in parameter tree node “output”: 0 vs . 1
org.knime.core.node.InvalidSettingsException: Different child count in parameter tree node “output”: 0 vs . 1

Can somebody please how to take the output from this node in XML format with SOAP header. Retrieve SOAP header as XML is checked.
Thanks in advance!

Hi @Kavita_Selkery and welcome to the Knime community.

When you say you’re able to perform connection, do you mean you were able to perform step 1 and 2 from your 4 steps?

I am guessing for step 3, it’s a SOAP api that you are trying to call? What node are you using to do this? I would guess you’d use a POST node here.

Hi @bruno29a, first of all thanks for replying.

So, what I am trying to say is, that using wsdl login is working fine, but for response I am receiving the above error. Basically the required/expected response (token in XML) format and the one WSDL is generating in KNIME is not matching. So the server will return a token, but in my wsdl file, I dont have any parameter to hold it, and shows below error:

Failed on row “Row0”: Unmarshalling Error: unexpected element (uri:"$$$$$", local:“Cookie”). Expected elements are <{}Cookie>

But if I include it in form of soap header for response, it is showing me below error, same as above but instead of ‘0’ its now 2.

KNIME-Worker-53-Generic Web Service Client 3:980 : : Node : Generic Web Service Client : 3:980 : Execute failed: Different child count in parameter tree node “output”: 2 vs . 1
org.knime.core.node.InvalidSettingsException: Different child count in parameter tree node “output”: 2 vs . 1

Also, I am not sure about the input to Generic Web Service client node. It should be an xml/json, but it shud be empty or shud have some data in it.

Just to add, I tried the wsdl in SOAP UI and I am getting the response in SOAP, but I am not getting how can I handle response in knime.

Please let me know, for answers to any of those queries.

So the above functionality actually worked :slight_smile:
I successfully got the response for the token.
Note: cannot use Rest nodes, have to use only SOAP call.
But now I am stuck at further step, and getting below error, when I am trying to pass nested input parameters:
WsdlParseException: unsupported collection element type: javax.xml.bind.JAXBElement

Was wondering, if this is actually restricting the input levels, as we have to basically define the input search parameters till 4th level.
How many child levels KNIME supports for Generic Web Service Client Node?
Kindly help.

Hi @Kavita_Selkery , I am not sure about the specific error you are getting when parsing the wsdl file, but alternatively, you may not need the wsdl file.

If you managed to get the token, it’s good. You can then do a POST request for the SOAP call. Unfortunately, I have to see the SOAP code and documentation to be able to guide you further, for example, how is the token passed during the SOAP call? Is it via the body or via the headers?

But generally speaking, you can submit the SOAP xml code in the POST body, and with some required headers if there are any to send.

I have passed it via headers as below:

  1. defined the TokenMsg
    <wsdl:message name=“TokenMsg”>
    <wsdl:part element=“sns:Token” name=“TokenHeader”/>

  2. Passing it in soap header as below:

<wsdl:input name=“SearchData”>
<soap:body namespace=“” part=“parameters” " parts=“SearchData” use=“literal”/>
<soap:header message=“sns:TokenMsg” part=“TokenHeader” use=“literal”/>

Tried using Post node also, passing SOAP header and BODY, but getting below error:
ERROR : KNIME-Worker-24-POST Request 3:1007 : : Node : POST Request : 3:1007 : Execute failed: Wrong status: 500 Internal Server Error
java.lang.IllegalStateException: Wrong status: 500 Internal Server Error

Not sure, if I am sending the correct header in Post node. What should be entered in Host field if I have send in header?


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.