Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-432

Secure SOAP Example - This example is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • fuse-esb-7.1.0
    • fuse-esb-7.1.0
    • Examples
    • None
    • % %

    Description

      I follow the README.txt for the secure-soap example.

      When I run the client using: mvn compile exec:java

      I get an error

      [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ secure-soap ---
      Nov 26, 2012 10:16:56 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
      INFO: Creating Service {http://security.jaxws.cxf.examples.fusesource.org/}HelloWorldService from class org.fusesource.examples.cxf.jaxws.security.HelloWorld
      javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
      	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
      	at $Proxy49.sayHi(Unknown Source)
      	at org.fusesource.examples.cxf.jaxws.security.client.Client.sendRequest(Client.java:69)
      	at org.fusesource.examples.cxf.jaxws.security.client.Client.main(Client.java:35)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
      	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
      	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
      	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:114)
      	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
      	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1694)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1530)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1438)
      	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
      	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:660)
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
      	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
      	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
      	... 9 more
      

      And log:display shows

      2012-11-26 10:14:50,480 | INFO  | use-036-thread-1 | InstrumentationManagerImpl       | ?                                   ? | 167 - org.apache.cxf.cxf-rt-management - 2.6.0.fuse-71-036 | registering MBean org.apache.cxf:bus.id=org.fusesource.examples.secure-soap-cxf15560174,type=Bus.Service.Endpoint,service="{http://security.jaxws.cxf.examples.fusesource.org/}HelloWorldImplService",port="HelloWorldImplPort",instance.id=1197222: javax.management.modelmbean.RequiredModelMBean@5c690
      2012-11-26 10:16:27,089 | WARN  | qtp11677979-166  | PhaseInterceptorChain            | ?                                   ? | 170 - org.apache.cxf.cxf-api - 2.6.0.fuse-71-036 | Interceptor for {http://security.jaxws.cxf.examples.fusesource.org/}HelloWorldImplService has thrown exception, unwinding now
      org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:242)
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:61)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[170:org.apache.cxf.cxf-api:2.6.0.fuse-71-036]
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[170:org.apache.cxf.cxf-api:2.6.0.fuse-71-036]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:236)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:130)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:221)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doOptions(AbstractHTTPServlet.java:170)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:197)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_37]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_37]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_37]
      	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_37]
      	at org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.8]
      	at org.ops4j.pax.web.service.internal.$Proxy36.service(Unknown Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.8]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)[83:org.eclipse.jetty.security:7.6.7.v20120910]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.Server.handle(Server.java:363)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[80:org.eclipse.jetty.http:7.6.7.v20120910]
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[80:org.eclipse.jetty.http:7.6.7.v20120910]
      	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[91:org.eclipse.jetty.util:7.6.7.v20120910]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[91:org.eclipse.jetty.util:7.6.7.v20120910]
      	at java.lang.Thread.run(Thread.java:680)[:1.6.0_37]
      Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
       at [row,col {unknown-source}]: [1,0]
      	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
      	at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2119)
      	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2025)
      	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1117)
      	at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1140)
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:139)
      	... 43 more
      2012-11-26 10:16:57,906 | WARN  | qtp11677979-167  | PhaseInterceptorChain            | ?                                   ? | 170 - org.apache.cxf.cxf-api - 2.6.0.fuse-71-036 | Interceptor for {http://security.jaxws.cxf.examples.fusesource.org/}HelloWorldImplService has thrown exception, unwinding now
      org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
      	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAAJInInterceptor.java:139)
      	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAAJInInterceptor.java:101)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[170:org.apache.cxf.cxf-api:2.6.0.fuse-71-036]
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[170:org.apache.cxf.cxf-api:2.6.0.fuse-71-036]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:236)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:130)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:221)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:141)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:197)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_37]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_37]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_37]
      	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_37]
      	at org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.8]
      	at org.ops4j.pax.web.service.internal.$Proxy36.service(Unknown Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.8]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)[83:org.eclipse.jetty.security:7.6.7.v20120910]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[81:org.eclipse.jetty.servlet:7.6.7.v20120910]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.8]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.Server.handle(Server.java:363)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)[80:org.eclipse.jetty.http:7.6.7.v20120910]
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[80:org.eclipse.jetty.http:7.6.7.v20120910]
      	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)[85:org.eclipse.jetty.server:7.6.7.v20120910]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[91:org.eclipse.jetty.util:7.6.7.v20120910]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[91:org.eclipse.jetty.util:7.6.7.v20120910]
      	at java.lang.Thread.run(Thread.java:680)[:1.6.0_37]
      Caused by: javax.xml.soap.SOAPException: Unable to create MessageFactory: Provider for javax.xml.soap.MessageFactory cannot be found
      	at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:90)
      	at org.apache.cxf.binding.soap.saaj.SAAJFactoryResolver.createMessageFactory(SAAJFactoryResolver.java:56)
      	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.getFactory(SAAJInInterceptor.java:145)
      	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAAJInInterceptor.java:127)
      	... 43 more
      

      I have just started the ESB (full) from fresh, and compiled the example, and installed it as instructed in the readme file.

      Attachments

        Issue Links

          Activity

            People

              yfang@redhat.com Freeman(Yue) Fang
              cibsen@redhat.com Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: