Package org.jboss.soa.esb.addressing.eprs

Examples of org.jboss.soa.esb.addressing.eprs.HTTPEpr


    JcrMessageURIGenerator jmurig = new JcrMessageURIGenerator();
    Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
   
    msg1.getBody().add("bar");
    try {
      msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
      msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
    } catch (URISyntaxException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
View Full Code Here


  public void testMessageToFile () throws Exception
  {
    Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
   
        msg1.getBody().add("bar");
    msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
    msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
   
    log.debug("Saving: "+msg1.getHeader().getCall());
   
    File f = CourierUtil.messageToLocalFile(new File("."), msg1);
View Full Code Here

  public void testMessageFromFile () throws Exception
  {
    Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
   
    msg1.getBody().add("bar");
    msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
    msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
   
    Assert.assertEquals(msg1.getHeader().getCall().getTo().getAddr().toString(), "PortReference < http://foo.bar >");
   
    File theFile = new File(".");
View Full Code Here

    DefaultMessageURIGenerator dmurig = new DefaultMessageURIGenerator();
    Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
     
    msg1.getBody().add("bar");
    try {
      msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
      msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
    } catch (URISyntaxException e1) {
      fail(e1.getMessage());
    }
   
View Full Code Here

    DefaultMessageURIGenerator dmurig = new DefaultMessageURIGenerator();
    Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
     
    msg1.getBody().add("bar");
    try {
      msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
      msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
    } catch (URISyntaxException e1) {
      fail(e1.getMessage());
    }
     
View Full Code Here

     * @throws ConfigurationException For configuration error
     * @throws RegistryException For registry error when register this EPR
     */
    private void registerEndpoint() throws ConfigurationException, RegistryException {
      try {
      endpointReference = new HTTPEpr(new URI(protocol + "://"+ address + ":" + port + this.httpContext));
      endpointReference.getAddr().addExtension("is-gateway", "true");
    } catch (Exception e) {
      throw new RegistryException("Tomcat gateway listener registration failed", e);
    }
      String serviceDescription = getConfig().getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG);
View Full Code Here

  public void testConstructor ()
  {
    try
    {
      String url1 = "http://www.local.bar:8080";
      new HTTPEpr(url1);
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
View Full Code Here

  public void testSetGet ()
  {
    try
    {
      String url1 = "http://www.local.bar:8080";
      HTTPEpr epr = new HTTPEpr(url1);
     
      assertEquals(epr.getURL().toString(), url1);
     
      String url2 = "http://foo.com";
      epr.setURL(new URL(url2));
     
      assertEquals(epr.getURL().toString(), url2);
                       
                        String uri = "http://foo.com";
                        epr.setURI(new URI(uri));
                       
                        assertEquals(epr.getURI().toString(), uri);
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
View Full Code Here

  public void testSerializedMessageToString () throws Exception
  {
    Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
   
    msg.getHeader().getCall().setAction(new URI("urn:foo"));
    msg.getHeader().getCall().setFrom(new HTTPEpr("http://foo.bar"));
   
    msg.getBody().add("foobar");
    msg.getBody().add("qwerty", "uiop");
    msg.getBody().add(BytesBody.BYTES_LOCATION, "hello world".getBytes());
   
View Full Code Here

  public void testXMLMessageToString () throws Exception
  {
    Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
   
    msg.getHeader().getCall().setAction(new URI("urn:foo"));
    msg.getHeader().getCall().setFrom(new HTTPEpr("http://foo.bar"));
   
    msg.getBody().add("foobar");
    msg.getBody().add("qwerty", "uiop");
    msg.getBody().add(BytesBody.BYTES_LOCATION, "hello world".getBytes());
   
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.eprs.HTTPEpr

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.