Announcement Announcement Module
Collapse
No announcement yet.
WSS4jSecurityinterceptor replaces soapmessage as null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSS4jSecurityinterceptor replaces soapmessage as null

    Hi


    For PayloadRootQnameEndpointMapping-WSS4JSecurityInterceptor-AxiomSoapMessageFactory configuration
    I observed that on quick execution at below code, the wss4jsecurityinterceptor replaces the soap envelope with null. If I read execute the same code in debug mode, with some latency its working fine...

    Is there something can be done with this?

    Code:
    private void replaceMessage(SoapMessage soapMessage, Document envelope) {
            if (soapMessage instanceof AxiomSoapMessage) {
                // construct a new Axiom message with the processed envelope
                AxiomSoapMessage axiomMessage = (AxiomSoapMessage) soapMessage;
                // save the Soap Action
                String soapAction = axiomMessage.getSoapAction();
                SOAPEnvelope envelopeFromDOMDocument = AxiomUtils.toEnvelope(envelope);
                SOAPFactory factory = (SOAPFactory) axiomMessage.getAxiomMessage().getOMFactory();
                SOAPMessage newMessage = factory.createSOAPMessage();
                newMessage.setSOAPEnvelope(envelopeFromDOMDocument);
    
                // replace the Axiom message
                axiomMessage.setAxiomMessage(newMessage);
                // restore the Soap Action
                axiomMessage.setSoapAction(soapAction);
            }
        }
    I am struck with errors in this config.. posted so many posts from last 4-5 days, but nothing of luck. Is it like no one has encountered these errors? or am I missing something? Please reply!!!!!!!!

    Thanks

  • #2
    Resolved and works fine with version,

    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws-core</artifactId>
    <version>2.0.0.RELEASE</version>

    Thanks

    Comment

    Working...
    X