Examples of HTTPEpr


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

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

  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

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

  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

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

    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

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

    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

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

     * @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

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

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

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

  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

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

  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

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

  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
Copyright © 2018 www.massapi.com. 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.