我正在使用 bi 发布者 web 服务 api 为用户分配角色。代码是
SecurityService_Service sevice = new SecurityService_Service();
SecurityService securityService = sevice.getSecurityService();
List<String> rolesList=new ArrayList<String>();
rolesList.add("Testers");
securityService.assignRolesToUser("testuser3", rolesList , "weblogic", "password123");
运行后出现错误。堆栈跟踪是:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.xml.sax.SAXException: Found character data inside an array element while deserializing
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at $Proxy32.removeRolesFromUser(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at $Proxy33.removeRolesFromUser(Unknown Source)
at view.BIPSecurityInfo.main(BIPSecurityInfo.java:89)