Search in sources :

Example 6 with SOAPAddressRewriteMetadata

use of org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata in project jbossws-cxf by jbossws.

the class EndpointImpl method getSOAPAddressRewriteMetadata.

private SOAPAddressRewriteMetadata getSOAPAddressRewriteMetadata() {
    if (sarm == null) {
        Deployment dep = (Deployment) getBus().getProperty(Deployment.class.getName());
        sarm = dep.getAttachment(SOAPAddressRewriteMetadata.class);
    }
    return sarm;
}
Also used : SOAPAddressRewriteMetadata(org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata) Deployment(org.jboss.wsf.spi.deployment.Deployment)

Example 7 with SOAPAddressRewriteMetadata

use of org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata in project jbossws-cxf by jbossws.

the class MetadataBuilder method build.

public DDBeans build(Deployment dep) {
    final SOAPAddressRewriteMetadata sarm = dep.getAttachment(SOAPAddressRewriteMetadata.class);
    Map<QName, String> serviceNameAddressMap = new HashMap<QName, String>();
    Map<String, SOAPAddressWSDLParser> soapAddressWsdlParsers = new HashMap<String, SOAPAddressWSDLParser>();
    DDBeans dd = new DDBeans();
    for (Endpoint ep : dep.getService().getEndpoints()) {
        DDEndpoint ddep = createDDEndpoint(ep.getTargetBeanClass(), (ArchiveDeployment) dep, ep);
        if (ep instanceof HttpEndpoint) {
            ddep.setInvoker(JBossWSInvoker.class.getName());
        }
        processWSDDContribution(ddep, (ArchiveDeployment) dep);
        URL wsdlLocation = getWsdlLocationURL(ddep, ((ArchiveDeployment) dep).getResourceResolver());
        processAddressRewrite(ddep, wsdlLocation, sarm, soapAddressWsdlParsers);
        METADATA_LOGGER.addingServiceEndpointMetadata(METADATA_LOGGER.isDebugEnabled() ? ddep.toStringExtended() : ddep.toString());
        dd.addEndpoint(ddep);
        serviceNameAddressMap.put(ddep.getServiceName(), ddep.getAddress());
    }
    dep.setProperty("ServiceAddressMap", serviceNameAddressMap);
    return dd;
}
Also used : DDBeans(org.jboss.wsf.stack.cxf.metadata.services.DDBeans) DDEndpoint(org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) SOAPAddressRewriteMetadata(org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata) HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint) URL(java.net.URL) JBossWSInvoker(org.jboss.wsf.stack.cxf.JBossWSInvoker) HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint) DDEndpoint(org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint) Endpoint(org.jboss.wsf.spi.deployment.Endpoint) SOAPAddressWSDLParser(org.jboss.ws.common.deployment.SOAPAddressWSDLParser)

Example 8 with SOAPAddressRewriteMetadata

use of org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata in project jbossws-cxf by jbossws.

the class BusHolder method setInterceptors.

protected void setInterceptors(Bus bus, Deployment dep, Map<String, String> props) {
    // Install the EndpointAssociationInterceptor for linking every message exchange
    // with the proper spi Endpoint retrieved in CXFServletExt
    bus.getInInterceptors().add(new EndpointAssociationInterceptor());
    bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
    bus.getInInterceptors().add(new GracefulShutdownInterceptor());
    final String p = (props != null) ? props.get(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS) : null;
    if ((p == null || (!"true".equalsIgnoreCase(p) && !"1".equalsIgnoreCase(p))) && !Boolean.getBoolean(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS)) {
        bus.getInInterceptors().add(new HandlerAuthInterceptor());
    }
    final SOAPAddressRewriteMetadata sarm = dep.getAttachment(SOAPAddressRewriteMetadata.class);
    if (SoapAddressRewriteHelper.isPathRewriteRequired(sarm) || SoapAddressRewriteHelper.isSchemeRewriteRequired(sarm)) {
        bus.getInInterceptors().add(new WSDLSoapAddressRewriteInterceptor(sarm));
    }
    InterceptorUtils.addInterceptors(bus, props);
}
Also used : WSDLSoapAddressRewriteInterceptor(org.jboss.wsf.stack.cxf.interceptor.WSDLSoapAddressRewriteInterceptor) NsCtxSelectorStoreInterceptor(org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor) HandlerAuthInterceptor(org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor) SOAPAddressRewriteMetadata(org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata) EndpointAssociationInterceptor(org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor) GracefulShutdownInterceptor(org.jboss.wsf.stack.cxf.interceptor.GracefulShutdownInterceptor)

Aggregations

SOAPAddressRewriteMetadata (org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata)8 Deployment (org.jboss.wsf.spi.deployment.Deployment)5 DefaultDeploymentModelFactory (org.jboss.ws.common.deployment.DefaultDeploymentModelFactory)4 Bus (org.apache.cxf.Bus)3 BusLifeCycleManager (org.apache.cxf.buslifecycle.BusLifeCycleManager)3 HashMap (java.util.HashMap)2 DDBeans (org.jboss.wsf.stack.cxf.metadata.services.DDBeans)2 URL (java.net.URL)1 QName (javax.xml.namespace.QName)1 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)1 ServiceInfo (org.apache.cxf.service.model.ServiceInfo)1 PolicyEngine (org.apache.cxf.ws.policy.PolicyEngine)1 SOAPAddressWSDLParser (org.jboss.ws.common.deployment.SOAPAddressWSDLParser)1 Endpoint (org.jboss.wsf.spi.deployment.Endpoint)1 HttpEndpoint (org.jboss.wsf.spi.deployment.HttpEndpoint)1 JBossWebservicesMetaData (org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData)1 JBossWSInvoker (org.jboss.wsf.stack.cxf.JBossWSInvoker)1 EndpointAssociationInterceptor (org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor)1 GracefulShutdownInterceptor (org.jboss.wsf.stack.cxf.interceptor.GracefulShutdownInterceptor)1 HandlerAuthInterceptor (org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor)1