Ascalonian
Programmer
I am running into a couple of issues where an Excel spreadsheet is suppose to call a Java web service I have created in JAX-WS and get back the results. However, there is some issue with not sending, nor receiving, back a NodeList. I am not sure how I need to change my web service to handle this.
The other issue is that the MS Office 2003 Web Service Toolkit is defining the web method as a sub routine instead of a function.
My web method is defined in the endpoint interface as:
The CreateWorkOrderItemRequest is defined as:
The CreateWorkOrderItemResponse is defined as:
The result from the Web Service Toolkit comes out like this:
But apparently it is suppose to come out more like this:
How do I get it to this point? Thank you very much for the help.
The other issue is that the MS Office 2003 Web Service Toolkit is defining the web method as a sub routine instead of a function.
My web method is defined in the endpoint interface as:
Code:
@WebMethod
@WebResult(name="CreateWorkOrderItemResponse")
CreateWorkOrderItemResponse createWorkItems(@WebParam(name = "CreateWorkOrderItemRequest")CreateWorkOrderItemRequest request);
The CreateWorkOrderItemRequest is defined as:
Code:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"authentication",
"createData"
})
@XmlRootElement(name = "CreateWorkOrderItemRequest", namespace="")
public class CreateWorkOrderItemRequest {
@XmlElement(name = "authentication", required = true)
protected Authentication authentication = null;
@XmlElement(name = "create_data", required = true)
protected ArrayList<CreateWorkOrderItemData> createData = new ArrayList<CreateWorkOrderItemData>();
public Authentication getAuthentication() {
return authentication;
}
public void setAuthentication(Authentication authentication) {
this.authentication = authentication;
}
public ArrayList<CreateWorkOrderItemData> getCreateData() {
return createData;
}
public void setCreateData(ArrayList<CreateWorkOrderItemData> createData) {
this.createData = createData;
}
}
The CreateWorkOrderItemResponse is defined as:
Code:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"submissionResponse",
"errorList"
})
@XmlRootElement(name = "CreateWorkOrderItemResponse")
public class CreateWorkOrderItemResponse{
@XmlElement(name = "submission_response", required = true)
protected SubmissionResponse submissionResponse = new SubmissionResponse();
@XmlElementWrapper(name="error_list")
@XmlElement(name="error", required = true, nillable = true)
protected ArrayList<Error> errorList = new ArrayList<Error>();
public SubmissionResponse getSubmissionResponse() {
return submissionResponse;
}
public void setSubmissionResponse(SubmissionResponse submissionResponse) {
this.submissionResponse = submissionResponse;
}
public ArrayList<Error> getErrorList() {
return errorList;
}
public void addError(Error error) {
errorList.add(error);
}
public void addErrors(ArrayList<Error> errors) {
for (Error error : errors) {
errorList.add(error);
}
}
public void setErrorList(ArrayList<Error> errorList) {
this.errorList = errorList;
}
}
The result from the Web Service Toolkit comes out like this:
Code:
Public Sub wsm_createWorkItems()
'*****************************************************************
'Proxy subroutine created from [URL unfurl="true"]http://localhost:8080/gbswebsvcs/seiwebsvcs?wsdl.[/URL]
'*****************************************************************
'Error Trap
On Error GoTo wsm_createWorkItemsTrap
sc_SEIWebServiceImplServ.createWorkItems
Exit Sub
wsm_createWorkItemsTrap:
SEIWebServiceImplServErrorHandler "wsm_createWorkItems"
End Sub
But apparently it is suppose to come out more like this:
Code:
Public Function wsm_createWorkItems(ByVal any_CreateWorkOrderItemRequest As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
'*****************************************************************
'Proxy function created from [URL unfurl="true"]http://localhost:8080/gbswebsvcs/seiwebsvcs?wsdl.[/URL]
'"wsm_createWorkItems, any_CreateWorkOrderItemRequest" is defined as XML. See Complex Types: XML Variables in
'Microsoft Office 2003 Web Services Toolkit Help for details on implementing XML variables.
'*****************************************************************
'Error Trap
On Error GoTo wsm_createWorkItemsTrap
Set wsm_createWorkItems = sc_DataServicesServer.createWorkItems(any_CreateWorkOrderItemRequest)
Exit Function
wsm_createWorkItemsTrap:
DataServicesServerErrorHandler "wsm_createWorkItems"
End Function
How do I get it to this point? Thank you very much for the help.