Specifies whether this class query is a web method. Applies only in a class that is defined as a web service or web client.
To specify that this query is a web method, use the following syntax:
Query name(formal_spec) As classname [ WebMethod ]
Otherwise, omit this keyword or place the word Not
immediately before the keyword.
This keyword specifies whether this class query is a web method and can be invoked via the SOAP protocol.
If you omit this keyword, the query cannot be invoked as a web method.
When you add this keyword to a class query and compile the class, the class compiler generates two additional classes:
For example, suppose that you start with the class ROBJDemo.QueryWS
and you add a class query to it named MyQuery
. When you add the WebMethod keyword to that class query and compile it, the class compiler generates the following additional classes:
Do not modify or directly use these generated classes; they are is intended only for internal use.
For a web service, this keyword also affects the generated WSDL, which now contains the additional elements needed to represent this web method.