Dale Christ

Greenhorn
+ Follow
since Jun 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dale Christ

Ivan Krizsan wrote:Hi!
Personally, I would not have a web service generate HTML. To me, this feels like assigning a responsibility that belongs in the presentation layer to another layer (perhaps this can be called the service layer).
This will lead to to service layer being coupled to the HTML presentation and there will be difficulties creating, for example, a Swing client that uses the same service layer.
A, in my opinion, better idea is to have the service(s) produce XML data, which is later (in the presentation layer) either used to render a presentation or transformed using XSLT to HTML or XHTML.
Best wishes!



I was thinking the same thing after I did a little more researching and coding last night. I'm going to set up the service (database) layer to create the POJOs that I need. I can then translate the POJOs into the final format (XML, HTML, etc.) on my client/presentation layer.

Thanks again for the help.
13 years ago
Thanks for the help so far. This is close to what I'm looking for, and it definitely covers POJOs.

The next thing that I need is something like this (think HTML table, but it can be just about any kind of free form XML - I usually create a Document (org.w3c.Document) from a jar file that I created, then parse it when I create my web page):



This kind of output is pretty easy to do in REST, but SOAP seems a little more challenging. I like the ability to have complex inputs to a SOAP request, but the simplicity (in my case, I can do XML) of a REST response

Again, thanks for any info.
13 years ago
I'm new to Web services, and am working on developing a SOAP service. From the examples I've seen using JAX-WS, I can issue what ever input parameters to a SOAP service that I want to. What isn't clear is how to get anything other than a String in the return message.

Here's a sample return from a "Ping" soap service that I created:



What I would like to have is "richer" output - for example:



So how can I create a response that includes XML that I have? Or is there a way that I can return either a POJO, or a Document (org.w3c.Document)?

Thanks in advance for any help.
13 years ago