Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NEWBIE - Webservice code question  RSS feed

Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a webservice in the where I am coding for the REQUEST and RESPONSE pieces.

From the code:

public class ReadResponse {
private org.texashealth.www.SCM.Common.Header header;
private org.texashealth.www.SCM.DataTier.Common.FieldValue[][][] rows;

public ReadResponse() {

public org.texashealth.www.SCM.Common.Header getHeader() {
return header;

public void setHeader(org.texashealth.www.SCM.Common.Header header) {
this.header = header;

public org.texashealth.www.SCM.DataTier.Common.FieldValue[][][] getRows() {
return rows;

public void setRows(org.texashealth.www.SCM.DataTier.Common.FieldValue[][][] rows) {
this.rows = rows;

public org.texashealth.www.SCM.DataTier.Common.FieldValue[][] getRows(int i) {
return this.rows[i];

public void setRows(int i, org.texashealth.www.SCM.DataTier.Common.FieldValue[][] value) {
this.rows[i] = value;

I am trying to utilize the "setRows" method to populate the RESPONSE Parameters which is as follows:

Response Parameters
Version: The schema version number for the XML
Status: The status of the request.
Rows: This is a list of database rows being returned.
Row: This is a list of FieldValues.
Name: Name of the field
Value: The contents of the field as a string.

I got the HEADER, VERSION and STATUS already initialized and here is what I have put together in my code:

public class ReadSOAPImpl implements org.tempuri.Read_PortType{
public org.texashealth.www.SCM.DataTier.ReadResponse.ReadResponse read(
org.texashealth.www.SCM.DataTier.BTResponse.ReadRequest readRequest
) throws java.rmi.RemoteException {

// Create the ReadResponse and Header objects.
ReadResponse response = new ReadResponse();
Header responseheader = new Header();

// Initialize the responseheader with the hardcoded VERSION and STATUS.

// Initialize the response object by passing in the responseheader object.

// Initialize the response object by passing in the rows.

return null;


Being new to Java I'm lost as to how to respond with the correct ROWS information. Any direction or help would be appreciated.

Thank you.
Posts: 42975
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're using SOAP on a very low level, creating requests and responses your self. Is it not feasible to program to a higher-level API live JAX-RPC? Those would let you deal just with the parameters you're sending and the actual Java objects; the minutiae of transferring them over the wire via SOAP would be hidden from you.
As to your actual question, I have no clue.
Don't touch me. And dont' touch this tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!