[ 
https://issues.apache.org/jira/browse/CXF-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Glen Mazza reopened CXF-2644:
-----------------------------


Issue reappearing in CXF 2.3.1, as this element, used heavily by Metro, is not 
supported when optional value = false:

FEIN: Alternative {http://www.w3.org/2007/05/addressing/metadata}Addressing is 
not supported
30.12.2010 17:47:32 org.apache.cxf.ws.policy.PolicyUtils logPolicy
FEIN: No alternative supported.
type: Policy
  type: ExactlyOne
    type: All
      type: Assertion {http://www.w3.org/2007/05/addressing/metadata}Addressing 
({http://www.w3.org/2007/05/addressing/metadata}Addressing)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken 
(org.apache.cxf.ws.security.policy.model.issuedto...@586c7a6e)
      type: All
        type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken 
(org.apache.cxf.ws.security.policy.model.issuedto...@586c7a6e)
        type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}ProtectionToken 
(org.apache.cxf.ws.security.policy.model.protectionto...@39d9f91c)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp 
({http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout 
(org.apache.cxf.ws.security.policy.model.lay...@1571baf0)
      type: All
        type: ExactlyOne
          type: All
            type: All
              type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken 
(org.apache.cxf.ws.security.policy.model.issuedto...@586c7a6e)
              type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}ProtectionToken 
(org.apache.cxf.ws.security.policy.model.protectionto...@39d9f91c)
            type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp 
({http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp)
            type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout 
(org.apache.cxf.ws.security.policy.model.lay...@1571baf0)
        type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SymmetricBinding 
(org.apache.cxf.ws.security.policy.model.symmetricbind...@5da7ed8f)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Wss11 
(org.apache.cxf.ws.security.policy.model.ws...@3bdd7752)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Trust13 
(org.apache.cxf.ws.security.policy.model.trus...@48c4c732)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts 
(org.apache.cxf.ws.security.policy.model.signedencryptedpa...@6ef1c8f0)
      type: Assertion 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts 
(org.apache.cxf.ws.security.policy.model.signedencryptedpa...@43bf3d77)


> Have policy engine support for 
> {http://www.w3.org/2007/05/addressing/metadata}Addressing
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2644
>                 URL: https://issues.apache.org/jira/browse/CXF-2644
>             Project: CXF
>          Issue Type: New Feature
>          Components: WS-* Components
>            Reporter: Glen Mazza
>            Assignee: Glen Mazza
>            Priority: Minor
>
> The following element: <wsam:Addressing wsp:Optional="false"/> (where 
> wsam="http://www.w3.org/2007/05/addressing/metadata";)
> generated by default by NetBeans[1] could not be supported by the CXF's 
> WS:Policy engine, regardless of "true" or "false" value.  I had to remove it 
> from the WSDL in order for WS-SecurityPolicy w/X.509[2] to work.
> Attempts to run my DoubleIt client with this element returned the following 
> error:
> [INFO] Feb 2, 2010 6:19:56 AM 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
> buildServiceFromWSDL
> [INFO] INFO: Creating Service 
> {http://www.example.org/contract/DoubleIt}DoubleItService from WSDL: 
> file:/work/workspace/DoubleIt/service-war/src/main/webapp/WEB-INF/wsdl/DoubleIt.wsdl
> [INFO] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: 
> Expected exactly one child element of type Policy.
> [INFO]        at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
> [INFO]        at $Proxy38.doubleIt(Unknown Source)
> [INFO]        at 
> com.mycompany.webservice.client.WSClient.doubleIt(WSClient.java:28)
> [INFO]        at 
> com.mycompany.webservice.client.WSClient.main(WSClient.java:21)
> [INFO] Caused by: org.apache.cxf.ws.policy.PolicyException: Expected exactly 
> one child element of type Policy.
> [INFO]        at 
> org.apache.cxf.ws.policy.builder.primitive.NestedPrimitiveAssertion.<init>(NestedPrimitiveAssertion.java:93)
> [INFO]        at 
> org.apache.cxf.ws.policy.builder.primitive.NestedPrimitiveAssertion.<init>(NestedPrimitiveAssertion.java:70)
> [INFO]        at 
> org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder.build(AddressingAssertionBuilder.java:77)
> [1] http://www.jroller.com/gmazza/entry/metro_x509_profile#MetroPKI2 (WSDL 
> underneath illustration)
> [2] http://www.jroller.com/gmazza/entry/cxf_x509_profile_secpol

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to