Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing a parameter to a Talend SOAP service

I created a simple web service in Talend by following the (very well written, I must say) instructions here.

I named my service 'txn' and it accepts a numeric refNumber and returns the txn record from Mysql db. All works perfectly using SoapUI.

Now, I wanted to create a java web service client using Eclipse. The problem comes with passing the parameter to the web service. From the code generated by eclipse, the parameter is of type TxnOperationRequest, yet I want to pass an int type reference number. So I get the error: 

The method txnOperation(TxnOperationRequest) in the type TxnPortType is not applicable for the arguments (int)

As far as I can tell, the types and methods are autogenerated in Talend, despite me setting the refNumber type to int when creating the service (see images below).

My question is how do I convert the parameter into usable types? 

 

0683p000009LwFq.png0683p000009LwHz.png

 

Edit:

I found where the problem was: I had not created an instance of type TxnOperationRequest

 

txnPortType txnService = locator.gettxnPort();
txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method
txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service
System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice

 

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Solved by ceating an instance of type txnOperationRequest:

txnPortType txnService = locator.gettxnPort();
txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method
txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service
System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice

 

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Solved by ceating an instance of type txnOperationRequest:

txnPortType txnService = locator.gettxnPort();
txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method
txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service
System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice