invokeWithVerb(inputMessage: String; verbIn: String): String updating;
The invokeWithVerb method of the JadeWebServiceConsumer class sends the SOAP-formatted message specified in the inputMessage parameter, using the verb specified in the verbIn parameter, to the Web service and returns the response from the Web service provider (a SOAP message).
This method does the same as the JadeWebServiceConsumer class invoke method, except that the verb specified in the verbIn parameter is used (for example, "GET" or "PUT") instead of "POST". Calling the invoke method is the same as calling the invokeWithVerb method with "POST" specified in the verbIn parameter.
Re-implement the invokeWithVerb method in the following situations when you also need to specify the verb that is used.
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.invokeWithVerb(inputMsg, verb); // 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.
You can use the invokeWithVerb method, for example, to allow users to access a REST service using the HTTP GET verb.