Package org.jboss.soa.esb.addressing

Examples of org.jboss.soa.esb.addressing.EPR


   * input message.
   */
 
  private final static boolean modifyMessage (Message input, Message errorMessage)
  {
    EPR destination = input.getHeader().getCall().getFaultTo();
   
    if ((destination == null) && (input.getHeader().getCall().getReplyTo() != null))
      destination = input.getHeader().getCall().getReplyTo();
   
    if ((destination == null) && (input.getHeader().getCall().getFrom() != null))
View Full Code Here


    @BeforeClass
    public static void before() throws Exception {
        MockCourierFactory.install();
        MockRegistry.install();

        epr1 = new EPR(new URI("test1"));
        epr2 = new EPR(new URI("test2"));
        epr3 = new EPR(new URI("DLS"));
        courier1 = new MockCourier(true);
        courier2 = new MockCourier(true);
        courier3 = new MockCourier(true);

        MockRegistry.register("test", "java", epr1, courier1);
View Full Code Here

 
    public void test() throws Exception {
        JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected.wsdl")));
        EPR epr = new EPR(URI.create("socket://x.y.x:8989/"));

        publisher.setActionConfig(buildActionConfig(true));
        publisher.initializeTransformer();
        String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "socket");
        log.debug(wsdlOut);
View Full Code Here

    public void test_http_rewrite() throws Exception {
        JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected-http-rewrite.wsdl")));
        EPR epr = new EPR(URI.create("http://x.y.x:8989/"));

        publisher.setActionConfig(buildActionConfig(true));

        publisher.initializeTransformer();
        String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
View Full Code Here

    public void test_http_norewrite() throws Exception {
        JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl"))); // expected same as input wsdl
        EPR epr = new EPR(URI.create("http://x.y.x:8989/"));

        publisher.setActionConfig(buildActionConfig(false));
       
        publisher.initializeTransformer();
        String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
View Full Code Here

    }

    private void execTransformTest(Action actionConfig, String expected) throws ConfigurationException, SAXException, IOException, ParserConfigurationException {
        TestWsdlContractPublisher publisher = new TestWsdlContractPublisher();
        publisher.setActionConfig(actionConfig);
        ContractInfo contractInfo = publisher.getContractInfo(new EPR(URI.create("http://x.y.x:8989/")));

        assertTrue("XML Comparison", XMLHelper.compareXMLContent(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData())));
    }
View Full Code Here

    @BeforeClass
    public static void before() throws Exception {
        MockCourierFactory.install();
        MockRegistry.install();

        epr1 = new EPR(new URI("test1"));
        epr2 = new EPR(new URI("test2"));
        epr3 = new EPR(new URI("DLS"));
        courier1 = new MockCourier(true);
        courier2 = new MockCourier(true);
        courier3 = new MockCourier(true);

        MockRegistry.register("test", "java", epr1, courier1);
View Full Code Here

    JAXRRegistryImpl registry = new JAXRRegistryImpl();
    registry.registerService("registry", "Registry Test ServiceName", "Registry Test Service Description");
  }
  @Test
  public void publishServiceBinding() throws ConfigurationException, RegistryException {
    EPR epr = new EPR();
    JAXRRegistryImpl registry = new JAXRRegistryImpl();
    registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
        epr, "EPR description");
    registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
        epr, "EPR description");
View Full Code Here

      for (Iterator serviceBindingIter = serviceBindings.iterator();serviceBindingIter.hasNext();){
        ServiceBinding serviceBinding = (ServiceBinding) serviceBindingIter.next();
        logger.debug("  ServiceBinding Description: " + serviceBinding.getDescription().getValue());
        String xml = serviceBinding.getAccessURI();
        logger.debug("  ServiceBinding URI: " + xml);
        assertEquals(EPRHelper.toXMLString(new EPR()).trim(),xml.trim());
      }
    }
    logger.debug("-------------------------------------------------");
    }
View Full Code Here

            reg.findEPR("x", "y");
            fail("Expected ServiceNotFoundException") ;
        } catch (final ServiceNotFoundException snfe) {
        }

        reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
        assertEquals(1, reg.findEPRs("x", "y").size());
        assertEquals("x://123", reg.findEPR("x", "y").getAddr().getAddress());

        reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
        assertEquals(2, reg.findEPRs("x", "y").size());

        reg.registerEPR("a", "z", "blah", new InVMEpr(new EPR(URI.create("x://12345"))), "blah");
        assertEquals(2, reg.findEPRs("x", "y").size());
        assertEquals(1, reg.findEPRs("a", "z").size());

        assertEquals(2, reg.findAllServices().size());
        assertEquals(1, reg.findServices("x").size());

        // unreg using a valid service + registred EPR... make sure EPR is removed...
        reg.unRegisterEPR("a", "z", new InVMEpr(new EPR(URI.create("x://12345"))));
        assertEquals(0, reg.findEPRs("a", "z").size());

        // unreg all for the service
        assertEquals(2, reg.findEPRs("x", "y").size());
        reg.unRegisterService("x", "y");
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.EPR

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.