12.07.2015 Views

Using SOAP and Web Services with Ensemble - InterSystems ...

Using SOAP and Web Services with Ensemble - InterSystems ...

Using SOAP and Web Services with Ensemble - InterSystems ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating an <strong>Ensemble</strong> <strong>Web</strong> Client}}• It generates the request <strong>and</strong> response message classes needed by the business operation. Therequest class is as follows:Class MyClient.BusOp.AddRequest Extends Ens.Request [ ClassType = persistent ]{Parameter RESPONSECLASSNAME = "MyClient.BusOp.AddResponse";Property a As MyClient.ComplexNumber;Property b As MyClient.ComplexNumber;}The response class is as follows:Class MyClient.BusOp.AddResponse Extends Ens.Response [ ClassType = persistent ]{Property AddResult As MyClient.ComplexNumber;}• Finally, it generates the MyClient.ComplexNumber class, which defines a complex number<strong>and</strong> which is used by the other classes./// Created from: http://localhost:57772/csp/gsop/MyApp.AddService.CLS?WSDL=1Class MyClient.ComplexNumber Extends (%RegisteredObject, %XML.Adaptor){Parameter XMLNAME = "ComplexNumber";Parameter XMLSEQUENCE = 1;Property Real As %xsd.double(XMLNAME = "Real") [ SqlFieldName = _Real ];Property Imaginary As %xsd.double(XMLNAME = "Imaginary");}When you compile these classes, the compiler also generates a class for each method defined in the<strong>Web</strong> service. These classes are not automatically added to your project <strong>and</strong> their internal details aresubject to change. These classes extend %<strong>SOAP</strong>.ProxyDescriptor, which you should never subclassyourself.36 <strong>Using</strong> <strong>SOAP</strong> <strong>and</strong> <strong>Web</strong> <strong>Services</strong> <strong>with</strong> <strong>Ensemble</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!