Oliver Naumann

Greenhorn
+ Follow
since Jul 29, 2013
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 Oliver Naumann

Hi guys,

I'm using JAX-WS in order to implement a web service. The web service receives XML as parameter and returns XML. I use Java Strings for this (i.e. the XML data comes as string and gets returned as a string):



Now when I return small XML instances (with few < and >), the String is not wrapped within CDATA but instead the < are parsed into <. However if the instances that are returned are big enough, suddenly my web service packs everything into a CDATA passage.
The latter is actually what I want: I want every string to be represented as a CDATA field. But my service won't return the short XML instances as CDATA. Is there any way to force JAX-WS to always return the string within a CDATA passage?
10 years ago
Hi guys,

I'm new to web services but already managed to set up a simple HelloWorld-WebService.

Now I wanted to try something more difficult by converting a project of mine into a WebService. During the execution, the program reads from a local file via using Java File (mostly it reads xsd files for xml validation). This works well locally but as soon as I convert the project into a web service, I get a FileNotFound exception when I call it. My problem is that I don't know where to locate my files from which I want to read. I tried a lot of locations including WEB-INF and the classes folder.

Where in my WAR-File do the files have to be so that I can read from them? Do I have to specify anything in sun-jaxws.xml or web.xml?

I am using JAX-WS and am deploying on a tomcat server.

Just tell me if you need any more information.
10 years ago