Hi, At the client-side, if your write policy on the right place, the generated stub will contains something below for each operation,
(__operation).getMessage(org.apache.axis2.wsdl.WSDLConstants. MESSAGE_LABEL_OUT_VALUE).getPolicyInclude().setPolicy(getPolicy("<wsp:Policy wsu:Id=\"urn:uuid:A809BF1515D2ECB3871196501370797\" xmlns:wsp=\" http://schemas.xmlsoap.org/ws/2004/09/policy\" xmlns:wsu=\" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsp:ExactlyOne><wsp:All><wsrm:RMAssertion xmlns:wsrm=\"http://schemas.xmlsoap.org/ws/2005/02/rm\">\n <wsrm:InactivityTimeout Milliseconds=\"600000\" />\n <wsrm:AcknowledgementInterval Milliseconds=\"200\" />\n </wsrm:RMAssertion><sp:AsymmetricBinding xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><wsp:Policy><sp:InitiatorToken><wsp:Policy><sp:X509Token sp:IncludeToken=\" http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient\"><wsp:Policy><sp:WssX509V3Token10 /></wsp:Policy></sp:X509Token></wsp:Policy></sp:InitiatorToken><sp:RecipientToken><wsp:Policy><sp:X509Token sp:IncludeToken=\" http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never\"><wsp:Policy><sp:WssX509V3Token10 /></wsp:Policy></sp:X509Token></wsp:Policy></sp:RecipientToken><sp:AlgorithmSuite xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><wsp:Policy><sp:TripleDesRsa15 /></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict /></wsp:Policy></sp:Layout><sp:IncludeTimestamp /><sp:OnlySignEntireHeadersAndBody /></wsp:Policy></sp:AsymmetricBinding><sp:Wss10 xmlns:sp=\" http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Policy><sp:MustSupportRefKeyIdentifier /><sp:MustSupportRefIssuerSerial /></sp:Policy></sp:Wss10><sp:SignedParts xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Body /></sp:SignedParts><sp:EncryptedParts xmlns:sp=\" http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Body /></sp:EncryptedParts></wsp:All></wsp:ExactlyOne></wsp:Policy>")); Which means, wsdl2java is able to read and validate the policy inside WSDL and put the policy in generated client stub. So, cmiiw, yes. Axis2 fully support WS policy at client-side. If you wish to use it with rampart, you may load rampart specific configuration (certificate config, password, etc) from code. serviceClient.getAxisService ().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY, loadRampartPolicy()); Regards, Sukma On Dec 10, 2007 12:26 PM, Kent Tong <[EMAIL PROTECTED]> wrote: > > Hi, > > The axis2 doc says: This release fully supports WS Policy at client-side. > It > means that when you codegen a stub against a WSLD which contains policies, > the stub will contain the capability to engage the required modules with > the > appropriate configurations. > > However, it seems that it doesn't work with rampart. I've tried putting a > policy into the WSDL and generate > the stub, but it seems to have little effect on the client nor the > service. > > Can anyone confirm this? > > > ----- > -- > Kent Tong > Wicket tutorials freely available at http://www.agileskills2.org/EWDW > -- > View this message in context: > http://www.nabble.com/-axis2--rampart-and-ws-policy-tp14247537p14247537.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >