In the new version (2.1) of CAI (or Application Designer) you can easily build a page on base of a web service, using the Web Service Layout Assistant. And there is no need to provide any Java coding. Application Designer provides for the adapter to call the service.
Here is an example page XML:
<?xml version="1.0" encoding="UTF-8"?>
<wsdlpage wsdlpagename="OrderType" wsdlurl="http://localhost:51000/cis/services/SrvSalesDef?wsdl" service="SrvSalesDef" port="SrvSalesDefHttpPort" operation="getOrderType">
<titlebar name="WSDLTemplate">
</titlebar>
<header withdistance="false">
</header>
<pagebody>
<rowtable0>
<itr height="8">
<label name="Type Id" width="100">
</label>
<field valueprop="getOrderType.in0" width="200" wsdlparams="Input;http://service.salesdef.erp.m2m.com;getOrderType;http://service.salesdef.erp.m2m.com;in0">
</field>
</itr>
<itr height="8">
<button name="get order types" method="getOrderType">
</button>
</itr>
</rowtable0>
<rowarea name="Order Type">
<itr height="8">
<label name="Code" width="100">
</label>
<field valueprop="getOrderTypeResponse.out.code" width="200" wsdlparams="Output;http://service.salesdef.erp.m2m.com;getOrderTypeResponse;http://service.salesdef.erp.m2m.com;out;http://dom.salesdef.erp.m2m.com;code">
</field>
</itr>
<itr height="8">
<label name="Name" width="100">
</label>
<field valueprop="getOrderTypeResponse.out.name" width="200" wsdlparams="Output;http://service.salesdef.erp.m2m.com;getOrderTypeResponse;http://service.salesdef.erp.m2m.com;out;http://dom.salesdef.erp.m2m.com;name">
</field>
</itr>
</rowarea>
</pagebody>
<statusbar withdistance="false">
</statusbar>
</wsdlpage>
However I need to do some coding within the page, especially after the Web Service method is invoked.
I think it is not possible to bind an adapter to Web Service Layouts. Is it :?:
And therefore I need to use a standard layout and invoke the web service myself in the adapter. But I do not know how to accomplish this. How can I invoke a Web Service from the adapter code?
Thanks