I am trying to create a webservice in the ReadSOAPImpl.java where I am coding for the REQUEST and RESPONSE pieces.
From the READRESPONSE.java 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
Header
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.
FieldValue:
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 READSOAPIMPL.java 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.
responseheader.setVersion(BigInteger.valueOf(1));
responseheader.setStatus(Status.fromString("OK"));
// Initialize the response object by passing in the responseheader object.
response.setHeader(responseheader);
// 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.
From the READRESPONSE.java 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
Header
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.
FieldValue:
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 READSOAPIMPL.java 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.
responseheader.setVersion(BigInteger.valueOf(1));
responseheader.setStatus(Status.fromString("OK"));
// Initialize the response object by passing in the responseheader object.
response.setHeader(responseheader);
// 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.