我得到这个 $Proxy10 不能转换为 com.sun.xml.ws.developer.WSBindingProvider。我将 jaxws-rt-2.2.7.jar 添加到我的项目中。
有什么建议么?
这是我的代码:
URL wsdlLocation = new URL(url);
QName portName = new QName(namespace,serviceName);
UsedCarWSX_Service ws = new UsedCarWSX_Service(wsdlLocation,portName);
UsedCarWSX usedCarWSX = ws.getUsedCarWSX();
//---------Populate the UserCredentials-------
UserCredentials uc = new UserCredentials();
uc.setUserid(username);
uc.setPassword(password);
uc.setProducttype("W");
javax.xml.ws.Holder<UserCredentials> ucHolder=new Holder<UserCredentials>(uc);
String vin = vin;
BBValues vinValues = null;
CurrentVINValues cvv = null;
cvv = new CurrentVINValues();
cvv.setBFillDrilldown(true);
cvv.setBReturnAddDeducts(false);
cvv.setBReturnMileage(true);
cvv.setIAverageAddDeductAdj(0);
cvv.setICleanAddDeductAdj(0);
cvv.setIExtraCleanAddDeductAdj(0);
cvv.setIMileage(0);
cvv.setIRoughAddDeductAdj(0);
cvv.setSCountryCode("U");
cvv.setSFrequencyCode("W");
cvv.setSVIN(vin);
// ---------- Call the web service --------------
CurrentVINValuesResponse cvr = usedCarWSX.getCurrentVINValues(cvv, ucHolder);
WSBindingProvider bp=(WSBindingProvider)usedCarWSX;
List hl=bp.getInboundHeaders();
UserCredentials incomingUC = parseResponseHeader((Header)hl.get(0));