Webservice connector in liveserver

17 views
Skip to first unread message

TonyG

unread,
Jul 14, 2008, 11:36:38 AM7/14/08
to RedDot CMS Users
I am trying to get a simple webservice running in a page via teh web
services connector. Has anyone had any interaction with these
connectors? I have made a simple 'hello world' webservice which works
as it should, I haev imported teh webservice qwith no problems but I
am stuck on how I can invoke it correctly?

Aish

unread,
Jul 21, 2008, 3:10:06 AM7/21/08
to RedDot CMS Users
Integrating .Net Webservice with Liveserver

In order to integrate .Net webservice with the Liveserver, we have to
create a webservice connector in the Liveserver according to the steps
given below:

Step1: Select Main Menu -> Connectors -> Web Services -> Administer

Step 2: Click on the New button to create a new connector

Step 3: Enter a name for the webservice and enter the URL of the WSDL
that is hosted in the IIS
Eg:http://localhost name or ipaddress/web/service.asmx?wsdl
Click Next, if the URL entered is correct then the second connector
screen appears else it shows an error stating:


Step 4: Select the appropriate Service Port from the drop down list
box and click create button

Step 5: Click on the webservice that is created

Step 6: Click on the General Tab in the left pane, you shall notice
the following details in the right pane automatically invoked from the
WSDL.
Active

Timeout (Seconds)

URL of the WSDL http://localhost name or ipaddress/web/service.asmx?
wsdl
User name

Password

Confirm password

Service Name {http://tempuri.org/}Service
Service Port ServiceSoap
Service Port URL http://localhost name or ipaddress/web/service.asmx
User name

Password

Confirm password

Attachment encapsulation format




Step 7: (This step is optional, it is necessary only if any additional
Configuration is required)
• Click on General -> Operation-specific Configuration -> and the
below screen appears with the details of Operation and attachment
encapsulation format.
• Click Ok.

Step 8: Create an addform.htm and add the code below:
<html>
<body>
<center><h3><b>Addition Form</b></h3></center><br>
<center>
<form method="get" action="addresults.htm">
Enter a number A: <input type="text" name="a">
<br>
Enter a number B: <input type="text" name="b">
<p></p>
<input type="submit" value="Add">
</form>
</center>
</body>
</html>


The action for the Add button calls the “addresults.htm”
Step 9: Create an addresults.htm and add the below code:
<html>
<body>
<center><h3><b>Add Result</b></h3></center>
<br>
<rde-dm:include content="addwebservice.xml" tag="notag"/>
</body>
</html>

The addresults.htm has and Include Dynament that calls the
“addwebservice.xml”
Step 10: Create an addwebservice.xml and add the below code:
<?xml version="1.0" encoding="UTF-8"?>
<dynaments>
<rde-dm:webservice name="ashwebservice">
<rde-rd:soap-message operation="add" type="operation">
<a>[#request:a#]</a>
<b>[#request:b#]</b>
</rde-rd:soap-message>
</rde-dm:webservice>
<rde-dm:attribute mode="read" source="request" attribute="return-code"/
>
</dynaments>

Step 11: Run the addform.htm in the browser and enter the two numbers
and you shall notice that the webservice is invoked and the add
function is executed via the webservice.

(Note : This webservice is invoked using the type “operation”)
Reply all
Reply to author
Forward
0 new messages