1 2 3 Previous Next 33 Replies Latest reply: Mar 2, 2010 10:34 PM by Alexandre Lourenço Go to original post RSS
  • 30. Re: WS-RM Exception: cannot be cast to org.jboss.ws.core.Stu
    Alessio Soldano Master

    I've scanned the patch, thanks. I've just one concern, ie. whether it's a bit too aggressive rewriting a "file://foo-bar" address with one using http protocol, as theoretically that might refer to a jms binding.
    So you might want to enhance the patch a bit scanning the model, getting the binding corresponding to the address being analysed and verifying the soap:binding in use before rewriting "file" to "http(s)".
    Btw, besides fixing this which is good in anycase, did you try providing an address without procotol (simply "replace-me" for instance) in your wsdl as a workaround?

  • 31. Re: WS-RM Exception: cannot be cast to org.jboss.ws.core.Stu
    Alexandre Lourenço Newbie

    hy, can you please tell me exacly how you fixed the class cast problem?still running on this problem.

    thanks

  • 32. Re: WS-RM Exception: cannot be cast to org.jboss.ws.core.Stu
    Neil McFarlane Novice

    It's almost certainly because of endorsement issues; JBossWS clients w/ WS-RM have a bit of a "gotcha" in this regard.

     

    It is an easy fix though, you need to endorse the JBoss AS "endorsed" JARs.  Assuming you're using Eclipse...

     

    1. Properties > Run/Debug Settings > (select your project) > Edit > Arguments > VM arguments
    2. Add the following: -Djava.endorsed.dirs=${JBOSS_HOME}\lib\endorsed

     

    Note that ${JBOSS_HOME} is just a placeholder, you'll have to use your actual path to the endorsed JARs.

  • 33. Re: WS-RM Exception: cannot be cast to org.jboss.ws.core.Stu
    Alexandre Lourenço Newbie

    hum, sorry, but it is already there, and dont work, anyway I just wanted to try this so I can set manually the config for the ws-security, this is because I cant make my client to use ws-security to encripty the messages, I am using jbossws native, I maked like in a tutorial I saw where you make some xml files (standard-jaxws-client-config.xml and jboss-wsse-client.xml) alongside the certificate files, look here my xml files:

    <?xml version="1.0" encoding="UTF-8"?>
    <jaxws-config xmlns="urn:jboss:jaxws-config:2.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:javaee="http://java.sun.com/xml/ns/javaee"
       xsi:schemaLocation="urn:jboss:jaxws-config:2.0
          jaxws-config_2_0.xsd">
    <client-config>
       <config-name>Standard WSSecurity Client</config-name>
       <post-handler-chains>
          <javaee:handler-chain>
          <javaee:protocol-bindings>
             ##SOAP11_HTTP
          </javaee:protocol-bindings>
             <javaee:handler>
                <javaee:handler-name>
                   WSSecurityHandlerOutbound
                </javaee:handler-name>
                <javaee:handler-class>
                   org.jboss.ws.extensions.security.jaxws.
                      WSSecurityHandlerClient
                </javaee:handler-class>
             </javaee:handler>
          </javaee:handler-chain>
       </post-handler-chains>
    </client-config>
    </jaxws-config>

     

    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-ws-security
       xmlns="http://www.jboss.com/ws-security/config"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.jboss.com/ws-security/config
       http://www.jboss.com/ws-security/schema/
          jboss-ws-security_1_0.xsd">
          <key-store-file>META-INF/client.keystore</key-store-file>
          <key-store-password>cyclops</key-store-password>
          <trust-store-file>
             META-INF/client.truststore
          </trust-store-file>
          <trust-store-password>cyclops</trust-store-password>
          <config>
          <encrypt type="x509v3" alias="wsse"></encrypt>
          <requires>
             <encryption></encryption>
           </requires>
          </config>

     

    </jboss-ws-security>

     

    the client code is generated by eclipse, the server part it works, but when I try to execute the client, this happens:

    03:10:18,349 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
    javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
        at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
        at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
        at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:97)
        at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)
        at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:171)
        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
    Caused by: org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
        at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:100)
        at org.jboss.ws.extensions.security.WSSecurityDispatcher.decodeMessage(WSSecurityDispatcher.java:207)
        at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:83)
        at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
        at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
        at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
        at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
        ... 29 more

    on the image you can see the files on my project

    This error is driving me crazy, I simply cant get past him :-( .......

1 2 3 Previous Next