So I've generated the classes using wsdl2java based on the following server
code, and the ProcessJob is a jaxb object:

@WebService(serviceName = "DFEEJobManagementSOAP")
public class DFEEJobManagementSOAP 
{
    
    
    @EJB
    private DFEEJobManagementEJBRemote jobMgmtBean = null;

    /**
     * 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;
    }
    
}


And after generating the client artificates I end up with a client component
that looks something like this:

    DFEEJobManagementSOAP_Service service = new
DFEEJobManagementSOAP_Service();
    DFEEJobManagementSOAP port = service.getDFEEJobManagementSOAPPort();
   
com.datamentors.datafuse.ee.communicator.processjob.RunJobResponse.Return
ret = port.runJob(processJob);

Which works fine and all except the 'type' is not the same as my server
code.  The ProcessJob jaxb object is different and although this wsdl2java
generated version contains all the same variables they are different and I'm
unsure how to efficiently convert between the two.

I could marshal the object to xml then unmarshal to a processJob object but
that seems counter productive I may as well just be passing strings!  So if
anyone could shed some light on what I'm missing.  Is there some type of
wsdl binding I can tell it to force the use of the proper objects?  By the
way wsdl2java is properly constructing the jaxb objects except my original
objects were serialized and these new objects are not.  I would just hate to
have to do all this work to use jaxb objects and in the end do something
like:

ProcessJob processJob = new ProcessJob(); // wsdl2java processJob
    
    DFEEJobManagementSOAP_Service service = new
DFEEJobManagementSOAP_Service();
    DFEEJobManagementSOAP port = service.getDFEEJobManagementSOAPPort();
    RunJobResponse.Return ret = port.runJob(processJob);

//<fully qualified path to real processJOb> ProcessJob pJob = new
ProcessJob()  //Proper processJob
pJob.setDFEngineUUID(ret.getDFEngineUUID());  // I'll have to do this for
every single element inside of all of my huge jaxb objects??!?!?!?!?



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Convert-response-return-object-to-jaxb-tp5722555.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to