cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bastien Sauvan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-4627) Topic's namespace of WSN Subscribe requests cannot be retrieve in some cases
Date Fri, 09 Nov 2012 18:40:11 GMT
Bastien Sauvan created CXF-4627:
-----------------------------------

             Summary: Topic's namespace of WSN Subscribe requests cannot be retrieve in some
cases
                 Key: CXF-4627
                 URL: https://issues.apache.org/jira/browse/CXF-4627
             Project: CXF
          Issue Type: Bug
          Components: WS-* Components
    Affects Versions: 2.7.0
            Reporter: Bastien Sauvan
            Priority: Minor


Using WS-Notification, it seems that in some cases it is not possible to retrieve the namespace
of the topic of a Subscribe request.

To reproduce the bug, deploy a simple NotificationProducer service which, in the subscribe
method, accesses to the otherAttributes map of the topicExpressionType object of the Subscribe
request like this:

((JAXBElement<TopicExpressionType>) subscribeRequest.getFilter().getAny().get(0)).getValue().getOtherAttributes()

If a Subscribe request such as [1] (topic's namespace is defined both in xmlns attribute and
in a specific attribute) is sent to this NotificationProducer service, the map will contain
an entry for the namespace of the topic "testTopic" defined in the payload.

If a Subscribe request such as [2] (topic's namespace is only defined in the xmlns attribute)
is sent to this NotificationProducer service, the map will be empty even if the namespace
of the topic "testTopic" has been defined in the xmlns attribute. In such a case, there is
no way to retrieve the namespace of the topic.


[1]
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:Subscribe xmlns="http://www.w3.org/2005/08/addressing"
            xmlns:ns2="http://docs.oasis-open.org/wsn/b-2" xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
            xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2" xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
            xmlns:ns6="http://docs.oasis-open.org/wsn/br-2" xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2">
            <ns2:ConsumerReference>
                <Address>http://localhost:8888/consumer</Address>
                <ReferenceParameters />
            </ns2:ConsumerReference>
            <ns2:Filter>
                <ns2:TopicExpression xmlns:s="http://test.cxf.wsn/subscribe/"
                    Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete"
                    s:testTopic="http://test.cxf.wsn/subscribe/">s:testTopic</ns2:TopicExpression>
            </ns2:Filter>
        </ns2:Subscribe>
    </soap:Body>
</soap:Envelope>


[2]
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:Subscribe xmlns="http://www.w3.org/2005/08/addressing"
            xmlns:ns2="http://docs.oasis-open.org/wsn/b-2" xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
            xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2" xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
            xmlns:ns6="http://docs.oasis-open.org/wsn/br-2" xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2">
            <ns2:ConsumerReference>
                <Address>http://localhost:8888/consumer</Address>
                <ReferenceParameters />
            </ns2:ConsumerReference>
            <ns2:Filter>
                <ns2:TopicExpression xmlns:s="http://test.cxf.wsn/subscribe/"
                    Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">s:testTopic</ns2:TopicExpression>
            </ns2:Filter>
        </ns2:Subscribe>
    </soap:Body>
</soap:Envelope>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message