Error while publishing ws-at policy
gllambi Jan 15, 2010 2:20 PMHi! I made a Web Service that uses WS-AT and now I want to attach the correct policies to it. Unfortunatelly, when I deploy the service, only a part of the policy is attached, with the assertion missing. Any idea of what can possibly be wrong?
Here's the service implementation:
@Stateless @LocalBinding(jndiBinding = "PepeBankServices/PepeBankLocal") @WebService @HandlerChain(file = "context-handlers.xml") @PolicyAttachment({@Policy( policyFileLocation="META-INF/policy.xml", scope = PolicyScopeLevel.WSDL_BINDING ) }) public class PepeBankService implements IPepeBankServiceLocal { public void depositar(@WebParam(name = "idCuenta") long idCuenta, @WebParam(name = "monto") double monto) throws BankException { System.out.println("Finalizando deposito..."); } }
Here's the policy.xml:
<wsp:Policy wsu:Id="WSATPepeBankEndpointPolicy" 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" xmlns:wsat="http://docs.oasis-open.org/ws-tx/wsat/2006/06" > <wsp:ExactlyOne> <wsp:All> <wsat:ATAssertion wsp:Optional="true" /> </wsp:All> </wsp:ExactlyOne> </wsp:Policy>
and here is the published wsdl with the ws-at policy:
<definitions name="PepeBankServiceService" targetNamespace="http://services.lins.fing.edu.uy/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://services.lins.fing.edu.uy/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> ... </types> <message name="BankException"> <part element="tns:BankException" name="BankException"/> </message> <message name="PepeBankService_depositar"> <part element="tns:depositar" name="depositar"/> </message> <message name="PepeBankService_depositarResponse"> <part element="tns:depositarResponse" name="depositarResponse"/> </message> <portType name="PepeBankService"> <operation name="depositar" parameterOrder="depositar"> <input message="tns:PepeBankService_depositar"/> <output message="tns:PepeBankService_depositarResponse"/> <fault message="tns:BankException" name="BankException"/> </operation> </portType> <binding name="PepeBankServiceBinding" type="tns:PepeBankService"> <wsp:PolicyReference URI="#WSATPepeBankEndpointPolicy"/> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="depositar"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> <fault name="BankException"> <soap:fault name="BankException" use="literal"/> </fault> </operation> </binding> <service name="PepeBankServiceService"> <port binding="tns:PepeBankServiceBinding" name="PepeBankServicePort"> <soap:address location="http://192.168.244.130:8080/PepeBankEAR-PepeBankService/PepeBankService"/> </port> </service> <wsp:Policy wsu:Id="WSATPepeBankEndpointPolicy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsp:All/> </wsp:Policy> </definitions>
Thank in advance!
Guzman