If I understood your question correctly... and with your previous post(s) in mind, I believe you know how to do this.
Will not a simple method like
String getSomeValue() do the job for you? If so, you can get lot of samples from Apache axis, which already has examples like this in its latest built or package.