Hello,

I am new to CXF and I am playing with the WS-Notification broker implementation.
I have downloaded apache-cxf-2.7.6.tar.gz and I am using the 
sample/ws_notification.

It appears that:
1- the broker publishes (http://...?wsdl) a SOAP 1.2 binding
2- despite #1 the sample client appears to send it SOAP 1.1 requests
3- however, a soapUI client configured with the broker's published WSDL 
succeeds in sending SOAP 1.2 requests.
4- the broker ignores the push consumer (NotificationConsumer) bindings and 
sends systematically SOAP 1.1 notifications.

I have put all relevant information in at the end of this post.

Many thanks for the help,
JC.


1- endpoints created and launched (mockservices) in soapUI:

Consumer1 deployed at http://localhost:8081/Consumer1

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="WSN-Consumer" 
targetNamespace="http://int.eurocontrol.sesar.swim-mc/surv/wsnotification"; 
xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:soaphttp="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://int.eurocontrol.sesar.swim-mc/surv/wsnotification"; 
xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";>
  <import namespace="http://docs.oasis-open.org/wsn/bw-2"; 
location="/Consumer1?WSDL&amp;interface=WSN-ConsumerBinding&amp;part=bw-2.wsdl">
    </import>
  <binding name="WSN-ConsumerBinding" type="wsntw:NotificationConsumer">
    <soap12:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="Notify">
      <soap12:operation soapAction="" soapActionRequired="false"/>
      <input>
        <soap12:body use="literal"/>

      </input>
    </operation>
  </binding>
  <service name="WSN-Consumer">
    <port name="WSN-ConsumerPort" binding="tns:WSN-ConsumerBinding">
      <soap12:address location="http://192.70.89.113:8081/Consumer1"/>
    </port>
  </service>
</definitions>

Consumer2 deployed at http://localhost:8082/Consumer2

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="WSN-Consumer" 
targetNamespace="http://int.eurocontrol.sesar.swim-mc/surv/wsnotification"; 
xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:tns="http://int.eurocontrol.sesar.swim-mc/surv/wsnotification"; 
xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
  <import namespace="http://docs.oasis-open.org/wsn/bw-2"; 
location="/Consumer2?WSDL&amp;interface=WSN-ConsumerBinding&amp;part=bw-2.wsdl">
    </import>
  <binding name="WSN-ConsumerBinding" type="wsntw:NotificationConsumer">
    <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="Notify">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal"/>

      </input>
    </operation>
  </binding>
  <service name="WSN-Consumer">
    <port name="WSN-ConsumerPort" binding="tns:WSN-ConsumerBinding">
      <soap:address location="http://192.70.89.113:8082/Consumer2"/>
    </port>
  </service>
</definitions>

soapUI shows that it understand Consumer1 is using a SOAP 1.2 binding, while 
Consumer2 is using a SOAP 1.1


2- WSN broker from the CXF samples is launched: in samples/ws_notification 
execute "mvn -Pwsn-server"


3- the broker WSDL is accessible from at 
http://localhost:9000/wsn/NotificationBroker?wsdl


4- the broker WSDL shows a SOAP 1.2 binding for port type 
{http://docs.oasis-open.org/wsn/brw-2}NotificationBroker


5- in soapUI, a client is configured with this WSDL and used to subscribe both 
endpoints to the broker on topic "MyTopic"

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:b="http://docs.oasis-open.org/wsn/b-2"; 
xmlns:add="http://www.w3.org/2005/08/addressing";>
   <soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";>
      
<wsa:Action>http://docs.oasis-open.org/wsn/brw-2/NotificationBroker/SubscribeRequest</wsa:Action>
      <wsa:From>http://localhost:808[12]/Consumer[12]</wsa:From>
      <wsa:ReplyTo>http://localhost:808[12]/Consumer[12]</wsa:ReplyTo>
   </soap:Header>
   <soap:Body>
      <b:Subscribe>
         <b:ConsumerReference>
            <add:Address>http://localhost:808[12]/Consumer[12]</add:Address>
         </b:ConsumerReference>
         <b:Filter>
            <b:TopicExpression 
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple";>MyTopic</b:TopicExpression>
         </b:Filter>
      </b:Subscribe>
   </soap:Body>
</soap:Envelope>

the broker accepts and processes successfully the 2 SOAP 1.2 subscription 
requests


6- WSN client from CXF samples is launched: in samples/ws_notification execute 
"mvn -Pclient"

Wireshark shows that the client from the sample sends request to the broker 
using SOAP 1.1.
It also shows that the broker sends notifications using SOAP 1.1 on all three 
consumers: all enveloppes in namespace http://schemas.xmlsoap.org/soap/envelope/

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:Notify 
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:NotificationMessage><ns2:SubscriptionReference><Address>http://0.0.0.0:9000/wsn/subscriptions/ID-192-70-89-113-140f40821ba-0-0</Address><ReferenceParameters/><Metadata><wsam:ServiceName
 xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"; 
xmlns:ns2="http://services.wsn.cxf.apache.org/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
EndpointName="JaxwsSubscriptionPort">ns2:JaxwsSubscriptionService</wsam:ServiceName></Metadata></ns2:SubscriptionReference><ns2:Topic
 
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple";>MyTopic</ns2:Topic><ns2:Message><ns8:foo
 xmlns:ns8="urn:test:org">Hello 
World!</ns8:foo></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>



Appendice) Wireshark ASCII extracts from a sample (sample client and broker 
only) execution

client -> broker

POST /wsn/NotificationBroker HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
SOAPAction: ""
User-Agent: Apache CXF 2.7.6
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:9000
Connection: keep-alive
Content-Length: 982

<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:9001/MyConsumer</Address><ReferenceParameters/><Metadata><wsam:ServiceName
 xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"; 
xmlns:ns2="http://client.wsn.cxf.apache.org/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
 
EndpointName="ConsumerPort">ns2:ConsumerService</wsam:ServiceName></Metadata></ns2:ConsumerReference><ns2:Filter><ns2:TopicExpression>MyTopic</ns2:TopicExpression></ns2:Filter></ns2:Subscribe></soap:Body></soap:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml;charset=UTF-8
Content-Length: 1080
Server: Jetty(8.1.7.v20120910)

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:SubscribeResponse
 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:SubscriptionReference><Address>http://0.0.0.0:9000/wsn/subscriptions/ID-192-70-89-113-140f3d48965-0-0</Address><ReferenceParameters/><Metadata><wsam:ServiceName
 xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"; 
xmlns:ns2="http://services.wsn.cxf.apache.org/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
EndpointName="JaxwsSubscriptionPort">ns2:JaxwsSubscriptionService</wsam:ServiceName></Metadata></ns2:SubscriptionReference><ns2:TerminationTime
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:nil="true"/></ns2:SubscribeResponse></soap:Body></soap:Envelope>

POST /wsn/NotificationBroker HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
SOAPAction: ""
User-Agent: Apache CXF 2.7.6
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:9000
Connection: keep-alive
Content-Length: 631

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:Notify 
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:NotificationMessage><ns2:Topic>MyTopic</ns2:Topic><ns2:Message><ns8:foo
 xmlns:ns8="urn:test:org">Hello 
World!</ns8:foo></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>

HTTP/1.1 202 Accepted
Content-Length: 0
Server: Jetty(8.1.7.v20120910)

broker -> client

POST /MyConsumer HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
SOAPAction: ""
User-Agent: Apache CXF 2.7.6
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:9001
Connection: keep-alive
Content-Length: 1131

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:Notify 
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:NotificationMessage><ns2:SubscriptionReference><Address>http://0.0.0.0:9000/wsn/subscriptions/ID-192-70-89-113-140f3d48965-0-0</Address><ReferenceParameters/><Metadata><wsam:ServiceName
 xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"; 
xmlns:ns2="http://services.wsn.cxf.apache.org/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
 
EndpointName="JaxwsSubscriptionPort">ns2:JaxwsSubscriptionService</wsam:ServiceName></Metadata></ns2:SubscriptionReference><ns2:Topic>MyTopic</ns2:Topic><ns2:Message><ns8:foo
 xmlns:ns8="urn:test:org">Hello 
World!</ns8:foo></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>

HTTP/1.1 202 Accepted
Content-Length: 0
Server: Jetty(8.1.7.v20120910)

Reply via email to