• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Web service client - Browser or Webstart/JNLP or Swing

 
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a webservice which does a number of things. A simple example of things it could do (note just example):

Return list of products
Update product price
Add new product
Update existing product
Return product price
Return product brochure + image
Add product brochure + image

The first 5 services are simple enough in that a request is sent to the SOAP web service and it will either return a list or it will update an existing row in the database or create a new one.

The last two a slightly tricky in that they involve sending binary files to the service and recieving binary files from the service.

There is no problem in implementing the SOAP service on the server end. I already have a framework in place i now just need to implement the services. What i am having problems with is how to implement the client that will be consuming these services.

I have been reading up about SOAP clients and know that i can send the files as SOAP attachements but i dont quite understand how this is converted into a HTTP request.

Questions:

- I would like the client to be a web portal but i am not quite sure how you can call a web service from a web browser. is this possible?
- How does a web service call work from a browser? Is it a normal HTTP call?
- And most importantly, how would the upload/download of the binary files work?
- In terms of securing the requests, which is more secure? A web portal based client or a thick client based client?
- Is there any advantage in using Java Web Start/JNLP in place of a web portal or a thick client?
- Is it possible to mix and match between a web portal and Web start for the binary data transfer?
- Is it common practice to call a web service from a web portal (i.e. from a web browser)?

The other alternative i think is to implement the client as a thick client (Desktop application). The problem with this is that i have 0 experience in GUI Swing based applications.

One important aspect of the solution is that it has to be secure so whichever approach i use will need to be secured using certificates. The majority of the services will be implemented using Spring technologies. I am using Spring-WS for the Web service and will probably use Spring-MVC if it is doable as a web portal.

The Web Service and the Web Application will both be running in the same application server.
 
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
looks like you need some REST. Try Apache CXF, which is SOAP as well as REST.
 
O. Ziggy
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How does REST help if the consumer is a web portal?
 
Anurag Verma
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can call the services just by making GET/POST requests (ajax) from your web page & can receive back the response, parse it & use it.
 
O. Ziggy
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this include the upload/download of binary files?
 
Anurag Verma
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can have upload/download for sure with interceptors (there may be more ways, may be somebody else could help in this).
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic