private static void buildSecurityMetaData(final EJBMetaData wsEjbMD, final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) { final EJBSecurityMetaData smd = new EJBSecurityMetaData(); // auth method final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD); smd.setAuthMethod(authMethod); // transport guarantee final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD); smd.setTransportGuarantee(transportGuarantee); // secure wsdl access final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD); smd.setSecureWSDLAccess(secureWsdlAccess); // propagate wsEjbMD.setSecurityMetaData(smd); }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint) * * @param endpoint EJB webservice endpoint * @return transport guarantee or null if not specified */ public String getTransportGuarantee(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null; }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint) * * @param endpoint EJB webservice endpoint * @return authentication method or null if not specified */ public String getAuthMethod(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getAuthMethod() : null; }
if (smd != null) beanAuthMethod = smd.getAuthMethod(); transportGuarantee = smd.getTransportGuarantee(); secureWSDLAccess = smd.getSecureWSDLAccess();
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint) * * @param endpoint EJB webservice endpoint * @return whether WSDL access have to be secured */ public boolean isSecureWsdlAccess(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false; }
/** * Builds JBoss agnostic EJB meta data. * * @param wsEjbsMD * jboss agnostic EJBs meta data */ protected void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final EJBEndpoint ejbEndpoint, final JBossWebservicesMetaData jbossWebservicesMD) { final SLSBMetaData.Builder wsEjbMDBuilder = new SLSBMetaData.Builder(); // set EJB name and class wsEjbMDBuilder.setEjbName(ejbEndpoint.getName()); wsEjbMDBuilder.setEjbClass(ejbEndpoint.getClassName()); final JBossPortComponentMetaData portComponentMD = getPortComponent(ejbEndpoint.getName(), jbossWebservicesMD); if (portComponentMD != null) { // set port component meta data wsEjbMDBuilder.setPortComponentName(portComponentMD.getPortComponentName()); wsEjbMDBuilder.setPortComponentURI(portComponentMD.getPortComponentURI()); } // set security meta data // auth method final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD); // transport guarantee final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD); // secure wsdl access final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD); final String realmName = getRealmName(ejbEndpoint, portComponentMD); // propagate wsEjbMDBuilder.setSecurityMetaData(new EJBSecurityMetaData(authMethod, realmName, transportGuarantee, secureWsdlAccess)); wsEjbsMD.add(wsEjbMDBuilder.build()); }
if (smd != null) beanAuthMethod = smd.getAuthMethod(); transportGuarantee = smd.getTransportGuarantee(); secureWSDLAccess = smd.getSecureWSDLAccess();
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint) * * @param endpoint EJB webservice endpoint * @return whether WSDL access have to be secured */ public boolean isSecureWsdlAccess(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false; }
/** * Builds JBoss agnostic EJB meta data. * * @param wsEjbsMD * jboss agnostic EJBs meta data */ protected void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final EJBEndpoint ejbEndpoint, final JBossWebservicesMetaData jbossWebservicesMD) { final SLSBMetaData.Builder wsEjbMDBuilder = new SLSBMetaData.Builder(); // set EJB name and class wsEjbMDBuilder.setEjbName(ejbEndpoint.getName()); wsEjbMDBuilder.setEjbClass(ejbEndpoint.getClassName()); final JBossPortComponentMetaData portComponentMD = getPortComponent(ejbEndpoint.getName(), jbossWebservicesMD); if (portComponentMD != null) { // set port component meta data wsEjbMDBuilder.setPortComponentName(portComponentMD.getPortComponentName()); wsEjbMDBuilder.setPortComponentURI(portComponentMD.getPortComponentURI()); } // set security meta data // auth method final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD); // transport guarantee final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD); // secure wsdl access final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD); final String realmName = getRealmName(ejbEndpoint, portComponentMD); // propagate wsEjbMDBuilder.setSecurityMetaData(new EJBSecurityMetaData(authMethod, realmName, transportGuarantee, secureWsdlAccess)); wsEjbsMD.add(wsEjbMDBuilder.build()); }
/** * Builds JBoss agnostic EJB meta data. * * @param wsEjbsMD jboss agnostic EJBs meta data * @param jbossEjbMD jboss specific EJB meta data */ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final WebServiceDeclaration jbossEjbMD) { final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD); if (wsEjbMD != null) { // set EJB name and class wsEjbMD.setEjbName(jbossEjbMD.getComponentName()); wsEjbMD.setEjbClass(jbossEjbMD.getComponentClassName()); final PortComponentSpec portComponentAnnotation = jbossEjbMD.getAnnotation(PortComponentSpec.class); if (portComponentAnnotation != null) { // set port component meta data wsEjbMD.setPortComponentName(portComponentAnnotation.portComponentName()); wsEjbMD.setPortComponentURI(portComponentAnnotation.portComponentURI()); // set security meta data final EJBSecurityMetaData wsEjbSecurityMD = new EJBSecurityMetaData(); wsEjbSecurityMD.setAuthMethod(portComponentAnnotation.authMethod()); wsEjbSecurityMD.setTransportGuarantee(portComponentAnnotation.transportGuarantee()); wsEjbSecurityMD.setSecureWSDLAccess(portComponentAnnotation.secureWSDLAccess()); wsEjbMD.setSecurityMetaData(wsEjbSecurityMD); } wsEjbsMD.add(wsEjbMD); } }
if (smd != null) beanAuthMethod = smd.getAuthMethod(); transportGuarantee = smd.getTransportGuarantee(); secureWSDLAccess = smd.getSecureWSDLAccess();
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint) * * @param endpoint EJB webservice endpoint * @return transport guarantee or null if not specified */ public String getTransportGuarantee(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null; }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint) * * @param endpoint EJB webservice endpoint * @return whether WSDL access have to be secured */ public boolean isSecureWsdlAccess(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false; }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint) * * @param endpoint EJB webservice endpoint * @return authentication method or null if not specified */ public String getAuthMethod(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getAuthMethod() : null; }
/** * Builds JBoss agnostic EJB meta data. * * @param wsEjbsMD jboss agnostic EJBs meta data * @param jbossEjbMD jboss specific EJB meta data */ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final WebServiceDeclaration jbossEjbMD) { final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD); if (wsEjbMD != null) { // set EJB name and class wsEjbMD.setEjbName(jbossEjbMD.getComponentName()); wsEjbMD.setEjbClass(jbossEjbMD.getComponentClassName()); final PortComponentSpec portComponentAnnotation = jbossEjbMD.getAnnotation(PortComponentSpec.class); if (portComponentAnnotation != null) { // set port component meta data wsEjbMD.setPortComponentName(portComponentAnnotation.portComponentName()); wsEjbMD.setPortComponentURI(portComponentAnnotation.portComponentURI()); // set security meta data final EJBSecurityMetaData wsEjbSecurityMD = new EJBSecurityMetaData(); wsEjbSecurityMD.setAuthMethod(portComponentAnnotation.authMethod()); wsEjbSecurityMD.setTransportGuarantee(portComponentAnnotation.transportGuarantee()); wsEjbSecurityMD.setSecureWSDLAccess(portComponentAnnotation.secureWSDLAccess()); wsEjbMD.setSecurityMetaData(wsEjbSecurityMD); } wsEjbsMD.add(wsEjbMD); } }
if (smd != null) beanAuthMethod = smd.getAuthMethod(); transportGuarantee = smd.getTransportGuarantee(); secureWSDLAccess = smd.getSecureWSDLAccess();
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint) * * @param endpoint EJB webservice endpoint * @return transport guarantee or null if not specified */ public String getTransportGuarantee(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null; }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint) * * @param endpoint EJB webservice endpoint * @return whether WSDL access have to be secured */ public boolean isSecureWsdlAccess(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false; }
/** * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint) * * @param endpoint EJB webservice endpoint * @return authentication method or null if not specified */ public String getAuthMethod(final Endpoint endpoint) { final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint); final boolean hasEjbSecurityMD = ejbSecurityMD != null; return hasEjbSecurityMD ? ejbSecurityMD.getAuthMethod() : null; }
/** * Builds JBoss agnostic EJB meta data. * * @param wsEjbsMD jboss agnostic EJBs meta data * @param jbossEjbMD jboss specific EJB meta data */ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final WebServiceDeclaration jbossEjbMD) { final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD); if (wsEjbMD != null) { // set EJB name and class wsEjbMD.setEjbName(jbossEjbMD.getComponentName()); wsEjbMD.setEjbClass(jbossEjbMD.getComponentClassName()); final PortComponentSpec portComponentAnnotation = jbossEjbMD.getAnnotation(PortComponentSpec.class); if (portComponentAnnotation != null) { // set port component meta data wsEjbMD.setPortComponentName(portComponentAnnotation.portComponentName()); wsEjbMD.setPortComponentURI(portComponentAnnotation.portComponentURI()); // set security meta data final EJBSecurityMetaData wsEjbSecurityMD = new EJBSecurityMetaData(); wsEjbSecurityMD.setAuthMethod(portComponentAnnotation.authMethod()); wsEjbSecurityMD.setTransportGuarantee(portComponentAnnotation.transportGuarantee()); wsEjbSecurityMD.setSecureWSDLAccess(portComponentAnnotation.secureWSDLAccess()); wsEjbMD.setSecurityMetaData(wsEjbSecurityMD); } wsEjbsMD.add(wsEjbMD); } }