Thanks for the help Guillaume but the problem remains.
I was using ServiceMix 3.2.3, where that soap version issue arose.
I had tried 3.3 but tried it again, and got the same exceptions as before:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,109]
Message: expected start or end tag</title>
</head>
<body><h2>HTTP ERROR: 500</h2><pre>javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[1,109]
Message: expected start or end tag</pre>
<p>RequestURI=/Broker/</p><h3>Caused by:</h3><pre>java.lang.Exception:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,109]
Message: expected start or end tag
at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:209)
at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:757)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:371)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,109]
The sent subscribe message was:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns4:Subscribe xmlns:ns2="http://www.w3.org/2005/08/addressing" xmlns:ns3="
http://docs.oasis-open.org/wsn/br-2" xmlns:ns4="
http://docs.oasis-open.org/wsn/b-2" xmlns:ns5="
http://docs.oasis-open.org/wsrf/bf-2" xmlns:ns6="
http://docs.oasis-open.org/wsn/t-1" xmlns:ns7="
http://docs.oasis-open.org/wsrf/r-2">
<ns4:ConsumerReference>
<ns2:Address>
http://localhost:11111/ws/NotificationConsumer/?http.soap=true&http.soapVersion=1.1
</ns2:Address>
</ns4:ConsumerReference>
<ns4:Filter>
<ns4:TopicExpression Dialect="
http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple
">myTopic</ns4:TopicExpression>
</ns4:Filter>
</ns4:Subscribe>
</S:Body>
</S:Envelope>
I tried SMX 4.0. I downloaded the latest snapshot bundle and had another go
building from source using maven.
But couldn't get the wsn-http-binding example running.
On Fri, Jan 30, 2009 at 12:31 PM, Guillaume Nodet <[email protected]> wrote:
> ServiceMix >= 3.2 should be ok, i would try with one of the latest
> (3.3 or 4.0-SNAPSHOT)
>
> On Fri, Jan 30, 2009 at 13:25, Filipe Campos <[email protected]>
> wrote:
> > Well, I'll give the new http endpoints a try, then.
> > On which version are they available? SMX 4?
> >
> > On Fri, Jan 30, 2009 at 12:15 PM, Guillaume Nodet <[email protected]>
> wrote:
> >
> >> We should use cxf-bc or servicemix-http new endpoints instead of the
> >> old ones, are they do a much better job wrt soap. Wanna try with the
> >> new http endpoins ?
> >>
> >> On Fri, Jan 30, 2009 at 12:59, Filipe Campos <[email protected]>
> wrote:
> >> > Thanks for your answer Guillaume.
> >> > I have looked up the binding in the wsn-http-binding wsdl, and the
> >> declared
> >> > namespace corresponds to SOAP 1.2.
> >> > In this case the declared Content Type should be application/soap+xml
> >> > instead of text/xml, as in the response sent by the Broker.
> >> > I have tried to use wsimport in two different ways to solve this
> issue:
> >> > - Having modified SOAP 1.2 to 1.1 in the binding of the Broker's wsdl.
> >> > - Using the original Broker's wsdl, but setting a custom SOAP 1.1
> binding
> >> > for the client.
> >> > However, the generated code uses SOAP 1.2.
> >> >
> >> > Can anyone suggest a workaround?
> >> >
> >> > Thanks
> >> >
> >> > On Thu, Jan 29, 2009 at 9:23 PM, Guillaume Nodet <[email protected]>
> >> wrote:
> >> >
> >> >> I think this is a difference between soap 1.1 and soap 1.2 (the
> >> >> content type has changed between both versions afaik).
> >> >> I guess the jaxws client uses the wrong soap version somehow.
> >> >>
> >> >> On Thu, Jan 29, 2009 at 20:06, Filipe Campos <[email protected]>
> >> wrote:
> >> >> > I have used a JAX-WS client to perform notifications to the broker
> >> >> > sucessfully, but when I try to perform a subscription something
> >> >> > extraordinary happens: an exception is risen.
> >> >> >
> >> >> > com.sun.xml.ws.server.UnsupportedMediaException: Unsupported
> >> >> Content-Type:
> >> >> > text/xml; charset=utf-8 Supported ones are: [application/soap+xml]
> >> >> >
> >> >> > The craziest part is that, by sending the exact same message using
> >> >> soapUI, I
> >> >> > get a correct soap response:
> >> >> >
> >> >> > <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
> >> >> > <S:Body>
> >> >> > <ns4:SubscribeResponse xmlns:ns2="
> >> >> http://www.w3.org/2005/08/addressing"
> >> >> > xmlns:ns4="http://docs.oasis-open.org/wsn/b-2" xmlns:ns3="
> >> >> > http://docs.oasis-open.org/wsrf/bf-2" xmlns:ns5="
> >> >> > http://docs.oasis-open.org/wsn/t-1" xmlns:ns6="
> >> >> > http://docs.oasis-open.org/wsn/br-2">
> >> >> > <ns4:SubscriptionReference>
> >> >> > <ns2:Address>
> >> >> >
> >> >>
> >>
> http://servicemix.org/wsnotification/Subscription/ID-59130-1233255110070-3-3
> >> >> > </ns2:Address>
> >> >> > </ns4:SubscriptionReference>
> >> >> > <ns4:TerminationTime xsi:nil="true" xmlns:xsi="
> >> >> > http://www.w3.org/2001/XMLSchema-instance"/>
> >> >> > </ns4:SubscribeResponse>
> >> >> > </S:Body>
> >> >> > </S:Envelope>
> >> >> >
> >> >> >
> >> >> >
> >> >> > The sent message is as follows:
> >> >> >
> >> >> > <?xml version='1.0' encoding='UTF-8'?>
> >> >> > <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
> >> >> > <S:Body>
> >> >> > <ns5:Subscribe
> >> >> > xmlns:ns2="http://docs.oasis-open.org/wsn/t-1"
> >> >> > xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> >> >> > xmlns:ns4="http://www.w3.org/2005/08/addressing"
> >> >> > xmlns:ns5="http://docs.oasis-open.org/wsn/b-2"
> >> >> > xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
> >> >> > xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2">
> >> >> > <ns5:ConsumerReference>
> >> >> > <ns4:Address>
> >> >> >
> >> >> >
> >> >>
> >>
> http://localhost:11111/wsn/NotificationConsumer/?http.soap=true&http.soapVersion=1.1
> >> <
> >>
> http://localhost:11111/wsn/NotificationConsumer/?http.soap=true&http.soapVersion=1.1
> >> >
> >> >> > </ns4:Address>
> >> >> > </ns5:ConsumerReference>
> >> >> > <ns5:Filter>
> >> >> > <ns5:TopicExpression Dialect="
> >> >> > http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
> >> >> > myTopic
> >> >> > </ns5:TopicExpression>
> >> >> > </ns5:Filter>
> >> >> > </ns5:Subscribe>
> >> >> > </S:Body>
> >> >> > </S:Envelope>
> >> >> >
> >> >> > Has this happened to anybody else? And could someone share their
> >> >> solution?
> >> >> >
> >> >> > Thanks
> >> >> >
> >> >> > On Thu, Jan 29, 2009 at 10:10 AM, Filipe Campos <
> [email protected]
> >> >> >wrote:
> >> >> >
> >> >> >> Just to share some of the discoveries performed during my
> experience
> >> >> with
> >> >> >> the wsn-http-binding
> >> >> >> Contrarily to what is described in
> >> >> >> http://servicemix.apache.org/ws-notification-http-binding.html, I
> >> have
> >> >> >> been able, by using the soapUI project, to subscribe a consumer
> >> endpoint
> >> >> >> using the URL
> >> >> >>
> http://localhost:11111/wsn/NotificationConsumer/?http.soap=trueinstead
> >> >> of
> >> >> >> http://localhost:11111/wsn/NotificationConsumer?http.soap=true<
> >> >> http://localhost:11111/wsn/NotificationConsumer/?http.soap=true>
> >> >> >> .
> >> >> >> And regarding the soap version I had to use the &'s special
> character
> >> in
> >> >> >> the URL:
> >> >> >>
> >> >>
> >>
> http://localhost:11111/wsn/NotificationConsumer/?http.soap=true&http.soapVersion=1.1
> >> <
> >>
> http://localhost:11111/wsn/NotificationConsumer/?http.soap=true&http.soapVersion=1.1
> >> >
> >> >> <http://localhost:11111/wsn/NotificationConsumer/?http.soap=true>
> >> >> >>
> >> >> >> However, I still haven't been able to perform a subscription or a
> >> >> publisher
> >> >> >> registration from my JAX-WS web services and clients.
> >> >> >>
> >> >> >>
> >> >> >> <
> >> >>
> >>
> http://localhost:11111/wsn/NotificationConsumer?http.soap=true&http.soapVersion=1.1
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Cheers,
> >> >> Guillaume Nodet
> >> >> ------------------------
> >> >> Blog: http://gnodet.blogspot.com/
> >> >> ------------------------
> >> >> Open Source SOA
> >> >> http://fusesource.com
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Cheers,
> >> Guillaume Nodet
> >> ------------------------
> >> Blog: http://gnodet.blogspot.com/
> >> ------------------------
> >> Open Source SOA
> >> http://fusesource.com
> >>
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>