You need to add a schema for jaxws URL into the schemaLocation attribute.

That said, I also think you probably also want:
 <jaxws:client
       name="{http://www.example.org/doubleit}DoubleItPort";
       createdFromAPI="true"> .......

I've attached the client xml config for the MS WF interop plugfest stuff 
(http://mssoapinterop.org/ilab/) for WS-Security 1.1 to use as an example.

(the code for that will hopefully go into StoneHendge once that is all 
finalized.   Howeever, I'd be happy to send it along if you are interested)

Dan

On Wednesday 05 November 2008 8:59:26 pm Glen Mazza wrote:
> Hello, I think this is a newbie Spring error on my part, but I'm getting
> the error message below when attempting to use the new WS-SecurityPolicy
> functionality in CXF 2.2.[1].  Here's my error stack:
>
> [INFO] WARNING: Failed to create application context.
> [INFO]
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 16 in XML document from class path resource [cxf.xml] is invalid; nested
> exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
> matching wildcard is strict, but no declaration can be found for element
> 'jaxws:client'.
> [INFO]        at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDef
>initions(XmlBeanDefinitionReader.java:404) [INFO]      at
> org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoa
>dBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:108)
> [INFO]        at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefin
>itions(XmlBeanDefinitionReader.java:342)
>
> Here's the cxf.xml I'm trying to load:
>
> <beans xmlns="http://www.springframework.org/schema/beans";
>    xmlns:cxf="http://cxf.apache.org/core";
>    xmlns:p="http://cxf.apache.org/policy";
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>    xmlns:jaxws="http://cxf.apache.org/jaxws";
>    xsi:schemaLocation="
>          http://cxf.apache.org/core
>          http://cxf.apache.org/schemas/core.xsd
>          http://cxf.apache.org/policy
>          http://cxf.apache.org/schemas/policy.xsd
>          http://www.springframework.org/schema/beans
>          http://www.springframework.org/schema/beans/spring-beans.xsd";>
>
>    <jaxws:client
>       name="{http://www.example.org/doubleit}DoubleItPort.http-conduit";>
>       <jaxws:properties>
>          <entry key="ws-security.callback-handler"
>             value="demo.hw.client.KeystorePasswordCallback" />
>          <entry key="ws-security.username" value="Alice" />
>          <entry key="ws-security.signature.properties"
>             value="alice.properties" />
>          <entry key="ws-security.encryption.username" value="Bob"/>
>          <entry key="ws-security.encryption.properties"
>             value="bob.properties" />
>       </jaxws:properties>
>    </jaxws:client>
>
>    <cxf:bus>
>       <cxf:features>
>          <p:policies />
>          <cxf:logging />
>       </cxf:features>
>    </cxf:bus>
> </beans>
>
> Any idea what the problem is?
>
> Thanks,
> Glen
>
> [1]
> http://www.nabble.com/Re%3A-WS-SecurityPolicy-in-CXF-2.1.x%2C-or-just-2.2--
>p19837200.html



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog
<?xml version="1.0" encoding="UTF-8"?>
<!-- -->
<!-- Copyright (c) 1993-2007 IONA Technologies PLC. -->
<!--            All Rights Reserved. -->
<!-- -->
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:http="http://cxf.apache.org/transports/http/configuration";
       xmlns:jaxws="http://cxf.apache.org/jaxws";
       xmlns:cxf="http://cxf.apache.org/core";
       xmlns:p="http://cxf.apache.org/policy";
       xmlns:sec="http://cxf.apache.org/configuration/security";
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans           http://www.springframework.org/schema/beans/spring-beans.xsd
          http://cxf.apache.org/jaxws                           http://cxf.apache.org/schemas/jaxws.xsd
          http://cxf.apache.org/transports/http/configuration   http://cxf.apache.org/schemas/configuration/http-conf.xsd
          http://cxf.apache.org/configuration/security          http://cxf.apache.org/schemas/configuration/security.xsd
          http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
          http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd";
>
    <cxf:bus>
        <cxf:features>
            <p:policies/>
            <cxf:logging/>
        </cxf:features>
    </cxf:bus>
    <!-- -->
    <!-- Scenario 4.1 -->
    <!-- -->
    <jaxws:client name="{http://InteropBaseAddress/interop}A_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}A-NoTimestamp_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}AD_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}A-ES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}AD-ES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>

    <jaxws:client name="{http://InteropBaseAddress/interop}UX_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}UX-NoTimestamp_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}UXD_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>    
    <jaxws:client name="{http://InteropBaseAddress/interop}UX-SEES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>    
    <jaxws:client name="{http://InteropBaseAddress/interop}UXD-SEES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>    
    
    <jaxws:client name="{http://InteropBaseAddress/interop}X_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}X-NoTimestamp_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}X-AES128_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}X-AES192_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}X-TripleDES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}XD_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
        <jaxws:client name="{http://InteropBaseAddress/interop}XD-ES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>
    <jaxws:client name="{http://InteropBaseAddress/interop}XD-SEES_IPingService"; createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.username" value="Alice"/>
            <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
            <entry key="ws-security.encryption.username" value="Bob"/>
            <entry key="ws-security.encryption.properties" value="etc/bob.properties"/> 
        </jaxws:properties>
    </jaxws:client>        
</beans>

Reply via email to