Call call = (Call) service.createCall();
call.setOperationName(new QName("命名空间地址", "方法名"));
异常Unexpected wrapper element
异常详情:
Unexpected wrapper element drink found Expected {http://invoke.service.code.king.com/}drink
解决方法:
Call call = (Call) service.createCall(); //call.setOperationName(new QName("方法名")); //原语句改成现语句 call.setOperationName(new QName("命名空间地址", "方法名")); //现语句
异常Unexpected Unmarshalling Error
异常详情:
Unmarshalling Error: 意外的元素 (uri:"", local:"fruit")。所需元素为<{http://invoke.service.code.king.com}fruit>
解决方法:
Call call = (Call) service.createCall(); //call.addParameter("参数名", XMLType.SOAP_STRING, ParameterMode.IN);//原语句改成现语句 call.addParameter(new QName(nameSpace, "参数名"),XMLType.SOAP_STRING, ParameterMode.IN);//现语句