Hi, Your client request is missing a Dialect attribute in TopicExpression:
/wsnt:Subscribe/wsnt:Filter/wsnt:TopicExpression/@Dialect A REQUIRED attribute of type URI that identifies the language of the TopicExpression. WS-Topics defines an initial set of standard URIs for TopicExpressions. Designers MAY define and use other domain-specific URIs to identify the dialect of the TopicExpression. Colm. On Fri, Nov 15, 2019 at 9:29 PM Currie, Thomas <tcur...@rheinmetall.ca> wrote: > Hi, > > I'm having trouble with a subscribe request from my client to an apache > cxf wsn (web service notification) broker. Here is my soap request: > > <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> > <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <Subscribe xmlns="http://docs.oasis-open.org/wsn/b-2"> > <InitialTerminationTime xsi:nil="true"/> > <b2:ConsumerReference xmlns:b2="http://docs.oasis-open.org/wsn/b-2/ > "> > <add:Address xmlns:add="http://www.w3.org/2005/08/addressing > ">foo</add:Address> > </b2:ConsumerReference> > <b2:Filter xmlns:b2="http://docs.oasis-open.org/wsn/b-2/"> > <b2:TopicExpression>bar</b2:TopicExpression> > </b2:Filter> > </Subscribe> > </s:Body> > </s:Envelope> > > I am getting the following fault in the soap response, which highlights > that something is wrong with the TopicExpression element in the Filter. > > <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"> > <faultcode>S:Server</faultcode> > <faultstring>Unrecognized filter: [b2:TopicExpression: > null]</faultstring> > <detail> > <ns4:InvalidFilterFault xmlns:ns4="http://docs.oasis-open.org/wsn/b-2" > xmlns="http://docs.oasis-open.org/wsrf/bf-2" xmlns:ns2=" > http://www.w3.org/2005/08/addressing" xmlns:ns3=" > 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"/> > </detail> > </S:Fault> > > I've looked at the source code at > https://github.com/apache/cxf/blob/master/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractSubscription.java > (line 370). > It seems the TopicExpression is not being cast back nicely to a > JAXBElement..... > > Does someone know what is wrong with my request? I am formatting my > request following the example shown section 4.2.1 in the oasis spec: > http://docs.oasis-open.org/wsn/wsn-ws_base_notification-1.3-spec-os.htm#_Toc133735624 > > Regards, > Thomas >