##我试图用JAXB ##
对类对象进行类型转换JAXBContext jaxbContext = JAXBContext.newInstance(org.tempuri.camswrapper.service_lt.GetSurveyResult.Xmldoc.class); org.tempuri.camswrapper.service_lt.ServiceLT service = new org.tempuri.camswrapper.service_lt.ServiceLT(); org.tempuri.camswrapper.service_lt.ServiceLTSoap port = service.getServiceLTSoap12(); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); //org.tempuri.camswrapper.service_lt.GetSurveyResult xmldoc =(org.tempuri.camswrapper.service_lt.GetSurveyResult)jaxbUnmarshaller.unmarshal(file); org.tempuri.camswrapper.service_lt.GetSurveyResult xmldoc =(org.tempuri.camswrapper.service_lt.GetSurveyResult)jaxbUnmarshaller.unmarshal(inputSource);
String result=port.getSurveyResult(xmldoc);