Package org.jboss.soa.esb.addressing

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


 
  public void testGetAddr ()
  {
    try
    {
      EPR epr = new EPR(new URI("urn:foo/bar"));
   
      assertEquals(epr.getAddr().getAddress(), "urn:foo/bar");
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
View Full Code Here


    }
  }
 
  public void testSetAddr ()
  {
    EPR epr = new EPR();
   
    epr.setAddr(new PortReference("http://localhost"));

    try
    {
      assertEquals(epr.getAddr().getAddress(), "http://localhost");
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
View Full Code Here

     
      PortReference pr = PortReferenceHelper.fromXML(in);     
      StreamHelper.checkEndTag(in, XMLUtil.QNAME_FROM_TAG) ;
      StreamHelper.checkParentFinished(in) ;
     
      EPR basicEpr = new EPR(pr);
      EmailEpr nEpr = new EmailEpr(basicEpr);

      assertEquals(nEpr.getAddr().getAddress(), email.getAddr().getAddress());
    }
    catch (Exception ex)
View Full Code Here

 
  public void testEquals ()
  {
    try
    {
      EPR epr1 = new EPR(new URI("http://localhost"));
      EPR epr2 = new EPR(new URI("http://localhost"));
      EPR epr3 = new EPR(new URI("http://localhost:8080"));
     
      assertEquals(epr1.equals(epr2), true);
      assertEquals(epr1.equals(epr3), false);
    }
    catch (Exception ex)
View Full Code Here

    public void setUp() throws Exception
    {
        MockCourierFactory.install();
        MockRegistry.install();
        mockCourier = new MockCourier(true, true);
        MockRegistry.register(SERVICE_CATEGORY, SERVICE_NAME, new EPR(new URI("jms://localhost:8080/queue1")), mockCourier);
    }
View Full Code Here

   
    String xmlString = EPRHelper.toXMLString(email);
   
    log.debug("xmlString is: "+xmlString);
   
    EPR epr = EPRHelper.fromXMLString(xmlString);
   
    if (epr instanceof EmailEpr)
    {
    }
    else
View Full Code Here

    public Message playWithMessage(Message message) throws Exception {
        Header msgHeader = message.getHeader();
        Body msgBody = message.getBody();
        Call theCall = msgHeader.getCall();
        EPR theEpr = theCall.getFrom();
        String contents = (String) msgBody.get();
        StringBuffer sb = new StringBuffer();
        sb.append("BEFORE\n");
        sb.append(contents);
        sb.append("\nAFTER");
View Full Code Here

    @Before
    public void setUp() throws Exception {
        MockCourierFactory.install();
        MockRegistry.install();
       
        EPR epr2 = new EPR(new URI("2"));
        courier1 = new MockCourier(false); // Will fail
        courier2 = new MockCourier(true)// Will work
        MockRegistry.register("cat", "servicex", courier1);
        MockRegistry.register("cat", "servicex", epr2, courier2);
     }
View Full Code Here

      MessageImpl nImpl = (MessageImpl) io.readObject();
     
      o.close();
     
      EPR theEpr = nImpl.getHeader().getCall().getTo();

      assertEquals(theEpr instanceof JMSEpr, true);
     
      assertEquals(((JMSEpr) theEpr).getConnectionFactory(), "bar");
    }
View Full Code Here

      MessageImpl nImpl = (MessageImpl) io.readObject();
     
      o.close();
     
      EPR theEpr = nImpl.getHeader().getCall().getTo();

      assertEquals(theEpr instanceof HTTPEpr, true);
     
      assertEquals(theEpr.getURI().toString(), "http://www.foo.bar");
    }
    catch (Exception ex)
    {
      log.error(ex);
     
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.