Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2770

Rewrite org.jboss.test.ws.jaxws.binding testcase to get SOAPMessageContext from handlers

XMLWordPrintable

      We have

      @Resource
      public WebServiceContext context;

      public String namespace()
      {
      try

      { SOAPMessageContext msgContext = (SOAPMessageContext)context.getMessageContext(); SOAPMessage soapMessage = msgContext.getMessage(); SOAPEnvelope soapEnvelope = (SOAPEnvelope)soapMessage.getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); log.info(nsURI); return nsURI; }

      catch (SOAPException ex)

      { throw new WebServiceException(ex); }

      }

      in an endpoint. The SOAPMessageContext can be obtained from handlers only, so the SOAPMessageContext retrieval should be done in a server side handler.

      This is related to CXF-1511

              rhn-support-asoldano Alessio Soldano
              rhn-support-asoldano Alessio Soldano
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: