Allows to create an own SOAP class.
1 soap.addServiceClass
<soap.addServiceClass name='name'>
<class_code /> !
</soap.addServiceClass>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | String | Name of the class which will be created. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eclass_code | String | Code which defines the class which is you want to define. |
Example
It is defined an own methode called mySOAP which multiply two doubles, returns its result and then a SOAP call is performed invoking the methode and showing the result on screen.
Copy
<xsql-script name='addServiceClass'> <body> <soap.addServiceClass name='mySOAP'> <![CDATA[ public class mySOAP extends SOAPServer{ public final Double multiply(double a, double b){ return a * b; } } ] ]> </soap.addServiceClass> <println> <soap.call url='http://localhost/soap/servlet/rpcrouter' uri='urn:mySOAP' method='multiply' user='jet' password='xxxxx' encoding='NS_URI_SOAP_ENC'> <parameters> <parameter name='a'><number>10</number></parameter> <parameter name='b'><number>20</number></parameter> </parameters> </soap.call> </println> </body> </xsql-script>