Search in sources :

Example 1 with JBossPortComponentRef

use of org.jboss.metadata.javaee.jboss.JBossPortComponentRef in project wildfly by wildfly.

the class WSRefUtils method getUnifiedPortComponentRefMetaData.

private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final PortComponentRef portComponentMD) {
    final UnifiedPortComponentRefMetaDataBuilder builder = new UnifiedPortComponentRefMetaDataBuilder();
    // propagate service endpoint interface
    builder.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
    // propagate MTOM properties
    builder.setMtomEnabled(portComponentMD.isEnableMtom());
    builder.setMtomThreshold(portComponentMD.getMtomThreshold());
    // propagate addressing properties
    final Addressing addressingMD = portComponentMD.getAddressing();
    if (addressingMD != null) {
        builder.setAddressingAnnotationSpecified(true);
        builder.setAddressingEnabled(addressingMD.isEnabled());
        builder.setAddressingRequired(addressingMD.isRequired());
        builder.setAddressingResponses(addressingMD.getResponses());
    }
    // propagate respect binding properties
    if (portComponentMD.getRespectBinding() != null) {
        builder.setRespectBindingAnnotationSpecified(true);
        builder.setRespectBindingEnabled(true);
    }
    // propagate link
    builder.setPortComponentLink(portComponentMD.getPortComponentLink());
    // propagate jboss specific MD
    if (portComponentMD instanceof JBossPortComponentRef) {
        final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
        // propagate port QName
        builder.setPortQName(jbossPortComponentMD.getPortQname());
        // propagate configuration properties
        builder.setConfigName(jbossPortComponentMD.getConfigName());
        builder.setConfigFile(jbossPortComponentMD.getConfigFile());
        // propagate stub properties
        final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
        if (stubPropertiesMD != null) {
            for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
                builder.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
            }
        }
    }
    return builder.build();
}
Also used : JBossPortComponentRef(org.jboss.metadata.javaee.jboss.JBossPortComponentRef) UnifiedStubPropertyMetaData(org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData) UnifiedPortComponentRefMetaDataBuilder(org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaDataBuilder) UnifiedStubPropertyMetaData(org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData) StubPropertyMetaData(org.jboss.metadata.javaee.jboss.StubPropertyMetaData) Addressing(org.jboss.metadata.javaee.spec.Addressing)

Aggregations

JBossPortComponentRef (org.jboss.metadata.javaee.jboss.JBossPortComponentRef)1 StubPropertyMetaData (org.jboss.metadata.javaee.jboss.StubPropertyMetaData)1 Addressing (org.jboss.metadata.javaee.spec.Addressing)1 UnifiedPortComponentRefMetaDataBuilder (org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaDataBuilder)1 UnifiedStubPropertyMetaData (org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData)1