Package org.apache.juddi

Examples of org.apache.juddi.InitialContextInfo


      if (tModelInstanceInfo.getTmodelKey().equals(JNDI_RMI_TRANSPORT_KEY)) {
        if (log.isDebugEnabled()) log.debug("Found transport tModelKey " + tModelInstanceInfo.getTmodelKey());
        String instanceParmsStr = tModelInstanceInfo.getInstanceParms();
        if (instanceParmsStr!=null) {
          if (log.isDebugEnabled()) log.debug("Found instanceParms with value: " + instanceParmsStr);
          InitialContextInfo icInfo = (InitialContextInfo) JAXBMarshaller.unmarshallFromString(instanceParmsStr, JAXBMarshaller.PACKAGE_JUDDI);
          Properties properties = new Properties();
          for (Property property: icInfo.getContextProperty()) {
            if (log.isDebugEnabled()) {
              log.debug("Initial Context Property from instanceParms " +
                     property.getName() + ":" + property.getValue());
           
            properties.put(property.getName(), property.getValue());
View Full Code Here


      if (tModelInstanceInfo.getTmodelKey().equals(JNDI_RMI_TRANSPORT_KEY)) {
        if (log.isDebugEnabled()) log.debug("Found transport tModelKey " + tModelInstanceInfo.getTmodelKey());
        String instanceParmsStr = tModelInstanceInfo.getInstanceParms();
        if (instanceParmsStr!=null) {
          if (log.isDebugEnabled()) log.debug("Found instanceParms with value: " + instanceParmsStr);
          InitialContextInfo icInfo = (InitialContextInfo) JAXBMarshaller.unmarshallFromString(instanceParmsStr, JAXBMarshaller.PACKAGE_JUDDI);
          Properties properties = new Properties();
          for (Property property: icInfo.getContextProperty()) {
            if (log.isDebugEnabled()) {
              log.debug("Initial Context Property from instanceParms " +
                     property.getName() + ":" + property.getValue());
           
            properties.put(property.getName(), property.getValue());
View Full Code Here

      List<Property> properties= new ArrayList<Property>();
      Property property1 = new Property(Context.INITIAL_CONTEXT_FACTORY,"value1");
      properties.add(property1);
      Property property2 = new Property(Context.PROVIDER_URL,"value2");
      properties.add(property2);
      InitialContextInfo contextInfo = new InitialContextInfo();
      contextInfo.setProperty(properties);
      JAXBContext jc = JAXBContext.newInstance(InitialContextInfo.class);
      Marshaller m = jc.createMarshaller();
      m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
          m.marshal(contextInfo, System.out);
    } catch (JAXBException e) {
View Full Code Here

               "</initialContextInfo>";
     
      StringReader reader = new StringReader(INITIAL_CONTEXT_XML);
      JAXBContext jc = JAXBContext.newInstance(InitialContextInfo.class);
      Unmarshaller um = jc.createUnmarshaller();
      InitialContextInfo icInfo = (InitialContextInfoum.unmarshal(new StreamSource(reader), InitialContextInfo.class).getValue();
      assertEquals("name1", icInfo.getContextProperty().get(0).getName());
      assertEquals("name2", icInfo.getContextProperty().get(1).getName());
      assertEquals("value2", icInfo.getContextProperty().get(1).getValue());
    } catch (JAXBException jaxbe) {
      jaxbe.printStackTrace();
      fail("No exception should be thrown");
    }
  }
View Full Code Here

                    "</instanceDetails>";
 
      InstanceDetails details = (InstanceDetails) JAXBMarshaller.unmarshallFromString(instanceDetailsStr,JAXBMarshaller.PACKAGE_UDDIAPI);
      String instanceParmsStr = details.getInstanceParms();
      if (instanceParmsStr!=null) {
        InitialContextInfo icInfo = (InitialContextInfo) JAXBMarshaller.unmarshallFromString(instanceParmsStr, JAXBMarshaller.PACKAGE_JUDDI);
        assertEquals("name1" , icInfo.getContextProperty().get(0).getName());
        assertEquals("name2" , icInfo.getContextProperty().get(1).getName());
        assertEquals("value2", icInfo.getContextProperty().get(1).getValue());
      } else {
        fail("We should have data in instanceParmsStr.");
      }
    } catch (JAXBException jaxbe) {
      jaxbe.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.juddi.InitialContextInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.