Package org.xmlsoap.schemas.ws._2003._03.addressing

Examples of org.xmlsoap.schemas.ws._2003._03.addressing.ObjectFactory


      //create the EPR of the consumer - this EPR object is a specific type for use with the client-side stub
      axis.org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType consumerEprForStub =
         new axis.org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType(  );
      consumerEprForStub.setAddress( new AttributedURI( m_notificationConsumer.getAddress(  ) ) );
      consumerEprForStub.setPortType( new AttributedQName( m_notificationConsumer.getPortType(  ) ) );
      ServiceNameType snt = new ServiceNameType(  );
      snt.setPortName( new NCName( m_notificationConsumer.getServiceName(  ).getPort(  ) ) );
      snt.set_value( m_notificationConsumer.getServiceName(  ) );
      consumerEprForStub.setServiceName( snt );

      // ... this puts the reference property for ResourceID in the EPR
      /*
         MessageElement[] prop            = new MessageElement[1];
View Full Code Here


    private static CustomInfoType convertCustomInfo(Map<String, String> customInfo) {
        if (customInfo == null) {
            return null;
        }

        CustomInfoType ciType = new CustomInfoType();
        for (Entry<String, String> entry : customInfo.entrySet()) {
            CustomInfoType.Item cItem = new CustomInfoType.Item();
            cItem.setKey(entry.getKey());
            cItem.setValue(entry.getValue());
            ciType.getItem().add(cItem);
        }

        return ciType;
    }
View Full Code Here

            origType.setIp("Unknown ip address");
        }
        eventType.setOriginator(origType);

        String path = System.getProperty("karaf.home");
        CustomInfoType ciType = new CustomInfoType();
        CustomInfoType.Item cItem = new CustomInfoType.Item();
        cItem.setKey("path");
        cItem.setValue(path);
        ciType.getItem().add(cItem);
        eventType.setCustomInfo(ciType);

        return eventType;
    }
View Full Code Here

        EventType eventType = new EventType();
        eventType.setEventType(EventEnumType.REQ_OUT);
        URL messageContentFile = this.getClass().getResource("/testmessage.xml").toURI().toURL();
        eventType.setContent(new DataHandler(messageContentFile ));
       
        CustomInfoType ciType = new CustomInfoType();
        CustomInfoType.Item prop1 = new CustomInfoType.Item();
        prop1.setKey("mykey1");
        prop1.setValue("myValue1");
        ciType.getItem().add(prop1);
        CustomInfoType.Item prop2 = new CustomInfoType.Item();
        prop2.setKey("mykey2");
        prop2.setValue("myValue2");
        ciType.getItem().add(prop2);
        eventType.setCustomInfo(ciType);
       
        MessageInfoType mit = new MessageInfoType();
        mit.setFlowId("uuid");
        eventType.setMessageInfo(mit);
View Full Code Here

 
  @Test
  public void testEventMapper() throws IOException {
    Event event = new Event();
    event.setContent("testContent");
    EventType eventOut = EventMapper.map(event);
    DataHandler dh = eventOut.getContent();
    String outContent = getContent(dh);
    Assert.assertEquals(event.getContent(), outContent);
    // TODO test the other properties
  }
View Full Code Here

     *
     * @param event the event
     * @return the event type
     */
    public static EventType map(Event event) {
        EventType eventType = new EventType();
        eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
        eventType.setEventType(convertEventType(event.getEventType()));
        OriginatorType origType = mapOriginator(event.getOriginator());
        eventType.setOriginator(origType);
        MessageInfoType miType = mapMessageInfo(event.getMessageInfo());
        eventType.setMessageInfo(miType);
        eventType.setCustomInfo(convertCustomInfo(event.getCustomInfo()));
        eventType.setContentCut(event.isContentCut());
        if (event.getContent() != null) {
            DataHandler datHandler = getDataHandlerForString(event);
            eventType.setContent(datHandler);
        }
        return eventType;
    }
View Full Code Here

        if (monitoringService == null) {
            initWsClient(context);
        }

        EventType serverStartEvent = createEventType(EventEnumType.SERVER_START);
        putEvent(serverStartEvent);

        LOG.info("Send SERVER_START event to SAM Server successful!");
    }
View Full Code Here

        if (monitoringService == null) {
            initWsClient(context);
        }

        EventType serverStopEvent = createEventType(EventEnumType.SERVER_STOP);
        putEvent(serverStopEvent);

        LOG.info("Send SERVER_STOP event to SAM Server successful!");
    }
View Full Code Here

     *
     * @param type the EventEnumType
     * @return the event type
     */
    private EventType createEventType(EventEnumType type) {
        EventType eventType = new EventType();
        eventType.setTimestamp(Converter.convertDate(new Date()));
        eventType.setEventType(type);

        OriginatorType origType = new OriginatorType();
        origType.setProcessId(Converter.getPID());
        try {
            InetAddress inetAddress = InetAddress.getLocalHost();
            origType.setIp(inetAddress.getHostAddress());
            origType.setHostname(inetAddress.getHostName());
        } catch (UnknownHostException e) {
            origType.setHostname("Unknown hostname");
            origType.setIp("Unknown ip address");
        }
        eventType.setOriginator(origType);

        String path = System.getProperty("karaf.home");
        CustomInfoType ciType = new CustomInfoType();
        CustomInfoType.Item cItem = new CustomInfoType.Item();
        cItem.setKey("path");
        cItem.setValue(path);
        ciType.getItem().add(cItem);
        eventType.setCustomInfo(ciType);

        return eventType;
    }
View Full Code Here

        conduit.setClient(clientConfig);

        simpleJdbcTemplate.update("delete from EVENTS");

        List<EventType> events = new ArrayList<EventType>();
        EventType eventType = new EventType();
        eventType.setEventType(EventEnumType.REQ_OUT);
        URL messageContentFile = this.getClass().getResource("/testmessage.xml").toURI().toURL();
        eventType.setContent(new DataHandler(messageContentFile ));
       
        CustomInfoType ciType = new CustomInfoType();
        CustomInfoType.Item prop1 = new CustomInfoType.Item();
        prop1.setKey("mykey1");
        prop1.setValue("myValue1");
        ciType.getItem().add(prop1);
        CustomInfoType.Item prop2 = new CustomInfoType.Item();
        prop2.setKey("mykey2");
        prop2.setValue("myValue2");
        ciType.getItem().add(prop2);
        eventType.setCustomInfo(ciType);
       
        MessageInfoType mit = new MessageInfoType();
        mit.setFlowId("uuid");
        eventType.setMessageInfo(mit);
       
        events.add(eventType);
        String result = monitoringService.putEvents(events);
        Assert.assertEquals("success", result);
       
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws._2003._03.addressing.ObjectFactory

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.