Here it is 2011 and Axis2-Rampart is up to 1.6. The solution I posted in 2007 no longer works, but this does: ServiceStub stub = new ServiceStub(ctx, endpoint); stub._getServiceClient().getOptions().setProperty(WSDL2Constants.ATTRIBUTE_MUST_UNDERSTAND,"false");
Jon Hanshew wrote: > > I just love having these conversations with myself, but for anybody who is > interested I didn't want to leave the impression that the correct solution > was to modify the wsdl2java generated code. > > Here is a better solution. All calls to modify the mustUnderstand flag > are made before the call to the stub. > > ServiceStub stub = new ServiceStub(ctx, endpoint); > > stub._getServiceClient().getOptions().setProperty(WSDL2Constants.ATTRIBUTE_MUST_UNDERSTAND,"0"); > > response = stub.GetData(request); > > > > Jon Hanshew wrote: >> >> Here is the solution. I had to make changes in the code generated by >> WSDL2Java. >> >> /* Here is the call I make from TestClient.java */ >> >> response = stub.GetData(request); >> >> /* End of call I make from TestClient.java */ >> >> /* Control transfers here in ServiceneStub.java, the code generated by >> WSDL2java. */ >> >> public Service.client.ServiceStub.ResponseMessage GetData( >> Service.client.ServiceStub.RequestMessage requestMessage) >> throws java.rmi.RemoteException { >> try { >> org.apache.axis2.client.OperationClient _operationClient = >> >> _serviceClient.createClient(_operations[0].getName()); >> _operationClient.getOptions().setAction("urn:GetData"); >> >> _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); >> >> addPropertyToOperationClient(_operationClient, >> >> org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, >> "&"); >> /* End of WSDL2Java generated code >> >> /* Added this code to generated stub code to get "mustUnderstand" >> >> >> to disappear from SOAP header */ >> >> addPropertyToOperationClient(_operationClient, >> >> org.apache.axis2.description.WSDL2Constants.ATTRIBUTE_MUST_UNDERSTAND,"0"); >> >> /* WSDL2Java Generated code restarts here and continues on ... */ >> >> >> >> >> >> Jon Hanshew wrote: >>> >>> I am using Axis2 1.3 and Rampart 1.3 basic security. My non-Axis >>> service requires that mustUnderstand be set to zero. It seems to be >>> permanently set to "1". I have looked everywhere in forums, >>> documentation and source code but have failed to find a solution. I do >>> know that the AddressingConstant parameters do not work in my case. I >>> am not using Addressing. >>> >>> Jon >>> >> >> > > -- View this message in context: http://old.nabble.com/-Axis2--How-Do-I-Set-mustUnderstand%3D%220%22--tp13502520p32713862.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org