Hello I am working on a web service that accepts a jaxb object and returns a
jaxb object. The Processjob obj is a jaxb object which I successfully have
used in a restful web service. The following is my server code:
/**
* Web service operation
*/
@WebMethod(operationName = "getStatus")
public ProcessJob getStatus(@WebParam(name = "ProcessJob") ProcessJob
aProcessJob)
{
ProcessJob processJob = jobMgmtBean.queryJobStatus(aProcessJob);
return processJob;
}
/**
* Web service operation
*/
@WebMethod(operationName = "runJob")
public ProcessJob runJob(@WebParam(name = "ProcessJob") ProcessJob
aProcessJob)
{
ProcessJob processJob = null;
try {
processJob = jobMgmtBean.processJob(aProcessJob);
} catch (Exception ex) {
}
return processJob;
}
The following is the client code stub that netbeans generates:
private static Return getStatus(delete.ProcessJob processJob) {
delete.DFEEJobManagementSOAP_Service service = new
com.soapclient.DFEEJobManagementSOAP_Service();
delete.DFEEJobManagementSOAP port =
service.getDFEEJobManagementSOAPPort();
return port.getStatus(processJob);
}
private static RunJobResponse.Return runJob(delete.ProcessJob
processJob) {
delete.DFEEJobManagementSOAP_Service service = new
com.soapclient.DFEEJobManagementSOAP_Service();
delete.DFEEJobManagementSOAP port =
service.getDFEEJobManagementSOAPPort();
return port.runJob(processJob);
}
I would like to know if anyone more familiar with web services can help me
help netbeans generate a proper client stub that accepts a ProcessJob (jaxb
serialized obj) and returns a ProcessJob. By the way the above code 'works'
but I'm going to have to map every object somehow to the new versions. I
could easily marshall the jaxb obj to xml, send, receive xml string and then
unmarshall back into the obj but I figured there would be a fairly simple
way to send/recieve a jaxb object without the mess. Any help much
appreciated!