FileDocCategorySizeDatePackage
WebServiceConfigCRTest.javaAPI DocGlassfish v2 API6607Fri May 04 22:24:04 BST 2007com.sun.enterprise.management.ext.wsmgmt

WebServiceConfigCRTest

public final class WebServiceConfigCRTest extends com.sun.enterprise.management.AMXTestBase

Fields Summary
Constructors Summary
public WebServiceConfigCRTest()

    
Methods Summary
public static com.sun.enterprise.management.CapabilitiesgetCapabilities()

	    return getOfflineCapableCapabilities( false );
	
public voidtestConfigCR()

        assert (getDomainRoot().getWebServiceMgr() != null);

       final Set<J2EEApplicationConfig>   s   =
        getDomainRoot().getQueryMgr().queryJ2EETypeSet( XTypes.J2EE_APPLICATION_CONFIG);

       final Iterator iter = s.iterator();
       while ( iter.hasNext() )
       {

            J2EEApplicationConfig ac  = (J2EEApplicationConfig)iter.next();
            System.out.println("config name is " + ac.getName());
                            
            Map m = ac.getWebServiceEndpointConfigMap();             
            int init  = m.size();
            System.out.println("WebServiceEndpoints found " + init);
            Iterator itr = m.values().iterator();
            while (itr.hasNext()) {
                WebServiceEndpointConfig wsCfg = (WebServiceEndpointConfig)
                itr.next();
                System.out.println("WebServiceEndpoint's name " + 
                        wsCfg.getName());
            }

            /*
             if ( !( ac.getName().equals("jaxrpc-simple") ) ){
                continue;
             }

            ac.createWebServiceEndpointConfig("remove#me", null);

            m = ac.getWebServiceEndpointConfigMap();             
            int afterCreate  = m.size();
            System.out.println("WebServiceEndpoints found " + afterCreate);

            assert ( init +1== afterCreate);
            */
       }
       assert(true);
    
public voidtestWSConfigCR()

        assert (getDomainRoot().getWebServiceMgr() != null);

       final Set<WebServiceEndpointConfig>   s   =
        getDomainRoot().getQueryMgr().queryJ2EETypeSet(
                              XTypes.WEB_SERVICE_ENDPOINT_CONFIG);

       for( final WebServiceEndpointConfig wsc : s )
       {
            Map m = wsc.getTransformationRuleConfigMap();
            int init = m.size();
            System.out.println("Transformation rules found " + init);
            Iterator itr = m.values().iterator();
            while (itr.hasNext()) {
                TransformationRuleConfig trCfg = (TransformationRuleConfig)
                itr.next();
                System.out.println("Transformation Rule's name "+ 
                        trCfg.getName());
            }

            /*

            /* Finish later, creating a transformation rule requires the
             * transformation file to be uploaded to DAS.

            wsc.createTransformationRuleConfig("xrule22",
                "/tmp/req.xsl", false, "request", null);

            m = wsc.getTransformationRuleConfigMap();
            int afterCreate  = m.size();
            System.out.println("Transformation rules found " + afterCreate);

            assert ( init +1== afterCreate);

            wsc.removeTransformationRuleConfig("xrule22");
            m = wsc.getTransformationRuleConfigMap();
            int afterDel  = m.size();
            System.out.println("Transformation rules found " + afterDel);

            assert ( init == afterDel);
            */
       }
       assert(true);