The namespace in the WSDL is incorrect. It should be either:

a) http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702

or

b) http://schemas.xmlsoap.org/ws/2005/07/securitypolicy

Colm.

On Mon, Feb 16, 2015 at 11:37 AM, G.Long <[email protected]> wrote:

> Hi,
>
> I've used cxf 2.5.10 to generate a web service client based on a provided
> wsdl file.
>
> When I test the client, I get the following error stack trace:
>
> 16 févr. 2015 12:29:51 org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
> handleNoRegisteredBuilder
> ATTENTION: No assertion builder for type {http://docs.oasis-open.org/
> ws-sx/ws-securitypolicy/200512}SupportingTokens registered.
> 16 févr. 2015 12:29:51 org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
> handleNoRegisteredBuilder
> ATTENTION: No assertion builder for type {http://docs.oasis-open.org/
> ws-sx/ws-securitypolicy/200512}UsernameToken registered.
> 16 févr. 2015 12:29:51 org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
> handleNoRegisteredBuilder
> ATTENTION: No assertion builder for type {http://docs.oasis-open.org/
> ws-sx/ws-securitypolicy/200512}WssUsernameToken11 registered.
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: None of
> the policy alternatives can be satisfied.
>
>
> The java code used to test the web service is :
>
> EURLexWebService ss = new EURLexWebService(wsdlURL, SERVICE_NAME);
>         EURLexWebServiceProvider port = ss.getEURLexWebServicePort();
>
>         Map ctx = ((BindingProvider)port).getRequestContext();
>         ctx.put("ws-security.username", "login");
>         ctx.put("ws-security.password", "password");
>
>         {
>         System.out.println("Invoking doQuery...");
>         SearchRequest request = new SearchRequest();
>         request.setExpertQuery("OJ_DATE = 12/02/2015");
>         request.setPageSize(200);
>         SearchLanguageType searchLanguage = SearchLanguageType.FR;
>         request.setSearchLanguage(searchLanguage);
>
>         try {
>             SearchResults results = port.doQuery(request);
>         } catch (Fault_Exception e) {
>             System.out.println("Expected exception: Fault has occurred.");
>             System.out.println(e.toString());
>         }
>
> I also tried to follow tutoriels to use interceptors but it didn't work
> either. Please find attached the wsdl file.
>
>
>
> Regards,
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to