Return to Jive Software

Skip navigation
4,909 Views 9 Replies Last post: Aug 13, 2009 2:17 PM by corygagliardi RSS
stefanmorrow Beginner 350 posts since
Jan 24, 2009
Currently Being Moderated

May 3, 2009 9:05 AM

How to access SOAP/REST Web service

Hi,

 

I am still fairly new to this and I am trying to access the Webservice interfaces. I am using soapUI (www.soapui.org) for testing

What I don't quite understand is how to build the resource endpoint, the documentation states:

 

http://<host_name>:<port_number>/<context>/rpc/rest/<endpoint>

How
do I determine the port number, what is context and endpoint. For example I am trying to get a list of users which is
/rpc/rest/userService/getUsers - what is the context?

Any help is appreciated.

Stefan
jochemd Beginner 250 posts since
May 6, 2009
Currently Being Moderated
May 6, 2009 12:42 PM in response to: Stefan Morrow
Re: How to access SOAP/REST Web service

What is the root URL of your installation? Just take that and append /rpc/ to that to get your list of services with URLs. For instance, this installation runs at http://www.jivesoftware.com/jivespace/, so you need http://www.jivesoftware.com/jivespace/rpc/ for the list of URLs.

corygagliardi Jive Employee 4,983 posts since
Apr 23, 2009
Currently Being Moderated
Jul 10, 2009 3:22 PM in response to: Stefan Morrow
Re: How to access SOAP/REST Web service

Hi Stefan,

 

Check out the REST Web Services Documentation.

 

http://<host_name>:<port_number>/<context>/ is the same location as your SBS home page.  You may not have a value for <context>.  By default, if you are just running this locally it would be http://localhost:8080/ for SBS and  http://localhost:8080/clearspace/ if you are running Clearspace.  <endpoint> refers to your REST command.

 

The RESTClient Firefox Add-on is an easy way to quickly start trying out REST with Jive SBS.

 

Don't forget to enable REST in the Admin console by going to System > Settings > Web Services.

 

Thanks,

Cory

SBSUser Novice 5 posts since
Aug 12, 2009
Currently Being Moderated
Aug 12, 2009 12:12 PM in response to: corygagliardi
Re: How to access SOAP/REST Web service

I have a question regarding testing REST web services. I've enabled REST WS in admin console, select Anybody option for User Access,

and select No option for Force SSL.

I've download firefox REST Client (http://www.jivesoftware.com/jivespace/docs/DOC-6511) to test REST Web Service.

If I enter http://jivesoftware.com/clearspace/rpc/rest/userService/getUsers  and hit SEND in REST Client , then I've got

the response back.

 

I've tried to test userService on my server with

http://172.16.114.128/Myspace/rpc/rest/userService/getUsers

but got nothing back.

The list of web services available are listed when I've tried

http://localhost:8080/Myspace/rpc/

 

What could be the problem?

corygagliardi Jive Employee 4,983 posts since
Apr 23, 2009
Currently Being Moderated
Aug 12, 2009 1:08 PM in response to: SBSUser
Re: How to access SOAP/REST Web service

Hi Stefan,

 

To use the getUsers function you should be using the request

 

GET http://domain:port/Myspace/rpc/rest/userService/users

 

Where GET is the method type you will set in RESTClient.  See the documentation on this request.

 

Thanks,

Cory

SBSUser Novice 5 posts since
Aug 12, 2009
Currently Being Moderated
Aug 13, 2009 6:33 AM in response to: corygagliardi
Re: How to access SOAP/REST Web service

Cory,

With Firefox REST client, I was able to test a

GET http://jivesoftware.com/clearspace/webservices}AvatarService/isAvatarsEnabled

and get a response back with the info for the Response Header as shown in the attached file.

On the Response Body, there is

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

 

<head>
    <title>Beyond Collaboration Software - Jive SBS Employee Engagement Center (formerly Clearspace)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="robots" content="noodp" />
....

....

 

 

 

 

When I've tried with my instance WS:

GET http://localhost:8080/Myspace/rpc/rest/AvatarService/isAvatarsEnabled

I've got a Status Code:200 OK, but there is no additional text. The Response Body is blank

My tomcat shows the following errors:

Debugger failed o attach: handshake failed - received > GET /Myspace/rp> - excepted > JDWP-Handshake

 

What could be the problem here?

SBSUser

Attachments:
corygagliardi Jive Employee 4,983 posts since
Apr 23, 2009
Currently Being Moderated
Aug 13, 2009 8:37 AM in response to: SBSUser
Re: How to access SOAP/REST Web service

Hi,

 

What do you see when you go to

 

http://localhost:8080/Myspace/rpc/rest/AvatarService/isAvatarsEnabled

 

in you web browser?

 

Thanks,

Cory

SBSUser Novice 5 posts since
Aug 12, 2009
Currently Being Moderated
Aug 13, 2009 11:36 AM in response to: corygagliardi
Re: How to access SOAP/REST Web service

my web browser displays blank page.

SBSUser Novice 5 posts since
Aug 12, 2009
Currently Being Moderated
Aug 13, 2009 1:07 PM in response to: SBSUser
Re: How to access SOAP/REST Web service

Hi,

I'm wondering if the port number is the problem?  What is the default port number?

How do I check the port number configured for the clearspace web services?

Thanks

corygagliardi Jive Employee 4,983 posts since
Apr 23, 2009
Currently Being Moderated
Aug 13, 2009 2:17 PM in response to: SBSUser
Re: How to access SOAP/REST Web service

Hi,

 

Web Services uses the same port as HTTP.  If you don't use a port for accessing your web site, you do not need a port to access REST.

 

The beggining of the url should simply be the path to your instance.

 

So if you access your instance with the URL

http://community.mysite.com/

the REST request would be

http://community.mysite.com/rpc/rest/AvatarService/isAvatarsEnabled

 

I hope this clears up some confusion.

 

Thanks,

Cory

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.