主题: "Unable to determine binding from message element",when invoke webservice under basic authentication
Hi, The web service client was built with RPCServiceClient -------------- serviceClient = new RPCServiceClient(); EndpointReference targetEPR = new EndpointReference(service_address); serviceClient.getOptions().setTo(targetEPR); -------------- I had set the authentication info as follows: -------------- HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator(); basicAuthentication.setUsername(username); basicAuthentication.setPassword(password); basicAuthentication.setPreemptiveAuthentication(true); serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication); -------------- Invoke like below: Object[] results = serviceClient.invokeBlocking( qName, args, new Class[] { returnType }); -------------- When invoke , the following appears: Caused by: org.apache.axis2.AxisFault: Unable to determine binding from message element: getCustInfoByName at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508) at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:101) -------------- If I fill the username or the password wrong , it will return 401 not authorized. The same web service , I invoke it with XFire framework , it is fine. But with Axis2 ... I can't find any related content on the web. Pls help me with that. thanks. Looking forward your replay. Thanks & Best Regards Li Wei --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]