Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,155,220 members, 7,825,842 topics. Date: Monday, 13 May 2024 at 01:46 AM

Creating An Open-source Java Web Service - Programming (7) - Nairaland

Nairaland Forum / Science/Technology / Programming / Creating An Open-source Java Web Service (15312 Views)

Advise On Good Java Web Application Framework / [C++ Open Source] Relax! ( File Management Tool) / Web Service Using Java Or C# (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (Reply) (Go Down)

Re: Creating An Open-source Java Web Service by Javanian: 12:18pm On Aug 21, 2012
where are the PHP, ASP, ASP.NET and JSP guys??, i need as many as possible
Re: Creating An Open-source Java Web Service by mj(m): 3:50pm On Aug 21, 2012
Javanian: where are the PHP, ASP, ASP.NET and JSP guys??, i need as many as possible
I'm in, php, asp.net and jsp, present ma.
Re: Creating An Open-source Java Web Service by Javanian: 4:04pm On Aug 21, 2012
^ ok try and consume the web service in any of those languages...if possible all and see if it works...
Re: Creating An Open-source Java Web Service by mj(m): 6:43pm On Aug 21, 2012
I'm on it, trying to do it wit asp.net, my internet service is down, can't connect to the wsdl online, but still working on it.
Re: Creating An Open-source Java Web Service by Javanian: 8:53am On Aug 22, 2012
@mj any progress??...where is spike C, A-zed and others that voluntered to test the service??
Re: Creating An Open-source Java Web Service by Javanian: 6:56pm On Aug 22, 2012
Nawa o!...where has everybody gone to??... cry
Re: Creating An Open-source Java Web Service by tdops: 9:50pm On Aug 22, 2012
Hey J, I appreciate your efforts on this. why dont you put up a page that calls the web-services so that we can all see?
I am mainly interested as i currently use Icecat and my folks are pushing to go into some other channels (CNet and Co). If we (or I) can see demo then we may just be convinced that it worth the effort. It does not really need to be anything fanciful..

Just a thot from an onlooker.....
Re: Creating An Open-source Java Web Service by Chimanet(m): 11:51pm On Aug 22, 2012
Yep. wats the url to the service?? tongue tongue
Re: Creating An Open-source Java Web Service by Javanian: 12:25am On Aug 23, 2012
^
Javanian: UPDATE
Returns Laptop Ranking as XML: http://gadgetslim.com/LaptopXML?wsdl
Returns Laptop Ranking as HTML: http://gadgetslim.com/Laptops?wsdl
Returns Phone Ranking as HTML: http://gadgetslim.com/Phones?wsdl
Returns Phone Ranking as XML: http://gadgetslim.com/PhonesXML?wsdl
Returns Smart Phone Ranking as XML: http://gadgetslim.com/SmartPhonesXML?wsdl
Returns Smart Phone Ranking as HTML: http://gadgetslim.com/SmartPhones?wsdl
Re: Creating An Open-source Java Web Service by Javanian: 12:26am On Aug 23, 2012
tdops: Hey J, I appreciate your efforts on this. why dont you put up a page that calls the web-services so that we can all see?
I am mainly interested as i currently use Icecat and my folks are pushing to go into some other channels (CNet and Co). If we (or I) can see demo then we may just be convinced that it worth the effort. It does not really need to be anything fanciful..

Just a thot from an onlooker.....
i will do that very soon...i just want to test it on all platforms first...Thanks for your contribution...
Re: Creating An Open-source Java Web Service by Javanian: 9:25am On Aug 23, 2012
anyone done with testing??
Re: Creating An Open-source Java Web Service by spikesC(m): 10:20am On Aug 23, 2012
aaahhh...sorry ooo, i kind of stopped coming to NL. Give me a max of 2 days, i'll make you something salacious *winks*
Re: Creating An Open-source Java Web Service by Javanian: 8:20pm On Aug 23, 2012
^ Welcome back grin....any report from anybody??...
Re: Creating An Open-source Java Web Service by Javanian: 9:05am On Aug 24, 2012
The site is in progress you can goto http://www.gadgetslim.com to view it...but we still need to create a mobile version also I still haven't created an HTML parser for it...if you can do any of this please tell me...
Re: Creating An Open-source Java Web Service by xterra2(m): 10:56am On Aug 24, 2012
aha i forgot to put a facebook logo or a link but the one you used is ugly see the site is black blue shouldnt come in any way i have this facebook icon thats in black so that would be better
and the location of the logo? the space from the top of the page is a little bit too big dont u think ?
besides where the copyright info is,its out of the transparent box
i would send you a newer site, with the new facebook logo and the border to the right webservice for php devs eliminated i forgot about that one
Re: Creating An Open-source Java Web Service by Javanian: 12:59pm On Aug 24, 2012
xterra2: aha i forgot to put a facebook logo or a link but the one you used is ugly see the site is black blue shouldnt come in any way i have this facebook icon thats in black so that would be better
and the location of the logo? the space from the top of the page is a little bit too big dont u think ?
besides where the copyright info is,its out of the transparent box
i would send you a newer site, with the new facebook logo and the border to the right
Thanks for your opinions...i'm not a web desginer so dont expect my work to be perfect...i'll be waiting for the new design...

webservice for php devs eliminated i forgot about that one
i never said so everyone has a role to play
Javanian: where are the PHP, ASP, ASP.NET and JSP guys??, i need as many as possible
Re: Creating An Open-source Java Web Service by Javanian: 11:29pm On Aug 24, 2012
@spike c and mj any update??
Re: Creating An Open-source Java Web Service by Javanian: 11:45pm On Aug 24, 2012
For the Java Developers. Follow this steps to consume the web service in a web or desktop Application

Open NetBeans IDE > Choose File > New Project (Ctrl-Shift-N on Linux and Windows, ⌘-Shift-N on MacOS).

Select Web Application from the Java category.

Name the project GadegtSlim(or any name of your choice).

Select Tomcat or Glassfish server(recomended).

Select any FrameWork of your choice(you can leave it empty).

Click Finish.

Right-click the GadgetSlim node and choose New > Web Service Client. The New Web Service Client wizard opens.

Select WSDL URL as the WSDL source. Copy and paste this http://gadgetslim.com/Laptops?wsdl (or any other WSDL link) click OK.

Do not select a package name. Leave this field empty.

Leave the other settings at default and click Finish.

The Projects window displays the new web service client, with a node for the displayLaptops Method(web service).

Double-click your main class so that it opens in the Source Editor. Drag the dispalyLaptops node below the main() method.

You can now print to standard output or display on a web page.

Note: if it returns XML you will have to use an XML Parser or use our custom API
source:http://gadgetslim.com/web%20service%20portal%20Java.html
http://netbeans.org/kb/docs/websvc/jax-ws.html
Re: Creating An Open-source Java Web Service by Javanian: 12:44am On Aug 25, 2012
Re: Creating An Open-source Java Web Service by Javanian: 12:46am On Aug 25, 2012
c'mon guys do i have to do everything?? embarassed
Re: Creating An Open-source Java Web Service by netesy(m): 3:21am On Aug 25, 2012
yyes you have just done evrything
Re: Creating An Open-source Java Web Service by mj(m): 1:49pm On Aug 25, 2012
For .net Developers Follow this steps to consume the web service in a web or desktop Application

Open Microsoft Visual Studio > Choose File > New Project

Select Web Application or Windows.

Name the project GadegtSlim(or any name of your choice).

Click OK.

Right-click the GadgetSlim application on your solution explorer, and choose "Add Service Reference". The New Web Service Client wizard opens.
The "Address" text box at the top can be used to type the URL to the Service Description,
Copy and paste this http://gadgetslim.com/Laptops?wsdl (or any other WSDL link) click GO.
It will populate the "Services list with the "Service1" service:

Leave the other settings at default and click OK.

The Projects window displays the new web service client.

Click the Service Reference folder on the solution explorer, Double-click the ServiceReference1 so that it opens the object browser. on the object browser double click on GadegtSlim.ServiceReference1 , you will see all the functions / methods to call.

You can now print to standard output or display on a web page.
Re: Creating An Open-source Java Web Service by Javanian: 2:09pm On Aug 25, 2012
^ Thanks for this, have you tested it??
Re: Creating An Open-source Java Web Service by mj(m): 3:45pm On Aug 25, 2012
Javanian: ^ Thanks for this, have you tested it??
I have viewed it on my browser (xml), I'm still working on it, want to put it into my web app. Hav u implemented d java own in ur web page, dnt mind seeing your code on it, on how u did it,I've never worked wit wsdl, Email: oshadami.mj@gmail.com
Re: Creating An Open-source Java Web Service by Javanian: 8:46am On Aug 27, 2012
You dont need any extra code just follow the steps you listed above...its very easy with an IDE...
Re: Creating An Open-source Java Web Service by netesy(m): 11:47pm On Aug 27, 2012
Not working on Php with code in Your site
==>Catchable fatal error: Object of class stdClass could not be converted to string in C:\wamp\www\ximplicity\index.php on line 17
You might also be interested if this but might be a little to late
The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary protocol, it is well-suited to sending binary data without any need to extend the protocol with attachments.http://hessian.caucho.com/
Re: Creating An Open-source Java Web Service by Javanian: 12:05am On Aug 28, 2012
netesy: Not working on Php with code in Your site
==>Catchable fatal error: Object of class stdClass could not be converted to string in C:\wamp\www\ximplicity\index.php on line 17
Thanks for testing and giving your observation...i didnt test that PHP Code...so i cant assure you its working...i am not a PHP Programmer...i just googled that stuff out...You can take an extra step by doing some research on how to consume a web service in PHP...if you get it right alert me and i'll update the site with your code
Re: Creating An Open-source Java Web Service by Javanian: 1:17pm On Aug 28, 2012
In JSP this is what the code looks like but this code wont work for you if you have not imported the WSDL link with your IDE.
I have tested it in JSP and ASP.NET and it works perfectly well.

<%--
Document : index
Created on : Aug 24, 2012, 3:13:15 PM
Author : Javanian
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>


<h1>Testing Web Service!</h1>

<%-- start web service invocation --%><hr/>
<%
try {
gadgets.Phones_Service service = new gadgets.Phones_Service();
gadgets.Phones port = service.getPhonesPort();
// TODO process result here
java.lang.String result = port.displayPhones();
out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
%>
<%-- end web service invocation --%><hr/>


</body>
</html>
Re: Creating An Open-source Java Web Service by Javanian: 1:20pm On Aug 28, 2012
I still haven't been able to create an HTML Parser for the sites...but i am still trying...can anyone give it a try??
Re: Creating An Open-source Java Web Service by lordZOUGA(m): 1:29pm On Aug 28, 2012
Javanian: I still haven't been able to create an HTML Parser for the sites...but i am still trying...can anyone give it a try??
there should be tons of opensource html parsers. Worst case scenario, firefox is opensource, you go to their developement page and hijack their parser
Re: Creating An Open-source Java Web Service by Javanian: 1:36pm On Aug 28, 2012
i have one that am using...what i actually mean is the structure of the source sites are quite complex and using an HTML Parser to extract data has not been easy...
Re: Creating An Open-source Java Web Service by lordZOUGA(m): 1:45pm On Aug 28, 2012
Javanian: i have one that am using...what i actually mean is the structure of the source sites are quite complex and using an HTML Parser to extract data has not been easy...
how?

(1) (2) (3) (4) (5) (6) (7) (8) (9) (Reply)

Degree Vs Experience: Which Do Employers Prefer? / Are Mini Laptops Good For Programming? / Why Self Taught Programmers Over “Exaggerate”.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 39
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.