Skip to main content

Guessing the State name from an XMLRPC

This scenario describes a two-component Job aiming at using a RPC method and displaying the output on the console view.

For more technologies supported by Talend, see Talend components.

  • Drop the tXMLRPCInput and a tLogRow components from the Palette to the design workspace.

  • Set the tXMLRPCInput basic settings.

  • Define the Schema type as Built-in for this use case.

  • Open Edit schema and set a single-column schema as the expected output with the Column name as: StateName.

  • Then set the Server url. For this demo, use: http://phpxmlrpc.sourceforge.net/server.php

  • No authentication details are required in this use case.

  • The Method to be called is: examples.getStateName

  • Then set the input Parameters required by the method called. The Name field is not used in the code but the value should follow the syntax expected by the method. In this example, the Name used is State Nr and the value randomly chosen is 42.

  • The class has not much impact using this demo method but could have with another method, so leave the default setting.

  • On the tLogRow component Component view, check the box: Print schema column name in front of each value.

  • Then save the Job and press F6 to execute it.

South Dakota is the state name found using the GetStateName RPC method and corresponds the 42nd State of the United States as defined as input parameter.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!