invoke(inputMessage: String): String updating;
The invoke method of the JadeWebServiceConsumer class sends the SOAP-formatted message specified in the inputMessage parameter to the Web service and returns the response from the Web service provider (a SOAP message).
Re-implement the invoke method in the following situations.
If you do not want to use the JADE Web service communications framework, which currently supports only HTTP (for example, if you prefer to use SMTP rather than the HTTP protocol), so that you can use your own communication handlers.
If you want to dynamically connect to a Web service (that is, without using or importing a WSDL file).
For example, if you have a JadeWebServiceConsumer subclass called DoItMyself, the method in the following example illustrates calling the Amazon Web service dynamically.
vars doItMyself : DoItMyself; inputMsg : String; outputMsg : String; begin create doItMyself transient; doItMyself.setEndpointURL('http://soap.amazon.com/onca/soap2'); inputMsg := ""; //soap request here outputMsg := doItMyself.invoke(inputMsg); // outputMsg will now contain the response from the Web service // provider or a SOAP fault raised by the JADE Web services // framework (for example, if the connection failed) epilog delete doItMyself; end;
In this case, you are dealing directly with SOAP messages.
This method uses the POST verb to send a message to the Web service via the associated JadeHTTPConnection. Use the JadeWebServiceConsumer class invokeWithVerb method to send a message to the Web service using a verb other than POST.