How to interact with Web Service?

Hi,

We have a Test Web Service. This service takes 2 input parameters (Input 1, Input 2) and returns an Output (Output) which is a sum of Input 1 and Input 2. We tried to send the input parameters using fpmi.net.httpPost() like this:

message = '<?xml version=\"1.0\" encoding=\"utf-8\" ?>'
message += '<TestData>'
message += '<Input1>1</Input1>'
message += '<Input2>2</Input2>'
message += '</TestData>'

event.source.parent.getComponent('tfWebServiceTest').text = str(fpmi.net.httpPost("http://testWebService/standard/document?client=300", "text/xml", message))

This code returing the complete XML code that has been written in the Web Service, contrary to what we expected (3).

Is this correct way to connect the Web service or any other way ?

Correct, in order to communicate with web services you must use the httpPost or httpGet. Did your test work?