Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DB5D6200C7E for ; Tue, 23 May 2017 15:47:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D9FA5160BC3; Tue, 23 May 2017 13:47:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 31714160BB6 for ; Tue, 23 May 2017 15:47:12 +0200 (CEST) Received: (qmail 11365 invoked by uid 500); 23 May 2017 13:47:11 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 11346 invoked by uid 99); 23 May 2017 13:47:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2017 13:47:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 070541AFBB1 for ; Tue, 23 May 2017 13:47:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=carmanconsulting-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id eICfX4Y9Os6m for ; Tue, 23 May 2017 13:47:08 +0000 (UTC) Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C97A260D87 for ; Tue, 23 May 2017 13:47:07 +0000 (UTC) Received: by mail-yw0-f174.google.com with SMTP id p73so63743997ywp.0 for ; Tue, 23 May 2017 06:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carmanconsulting-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qVk+peEeY2YnCvOVk9gsHmBEEYb5zvb5gDI7zBMsQzM=; b=D5mAdgPUbM/yMhjyt/Z7jH9b4c6hrsmHqlxvstJnj2zZYJ7m/jCyThix8vHO6f1TXu hzSye/UcQfTSe9AIT6Tn32KL/iJ/OaLUWnrZH+02l8g6RE0PslnQeJ5BZWs/jaGKp0eF gRgeY1zrfSLXC0lm8Rug7Og8dd+T3Wx/BzxDm653YzyDcp92aVyoa6MEI6kMIqM4LyMY gbtS3Mt/8a/4i564OBL/WLZbT5dydfIcw9uvZeVcL8SRWPPr5jl0Wwd5XPT0ftBwgSfo sCYNlf5Fvr0iRSJc+OG3soNVf8b8yj3ph9eXv3ixbLJVCg9lMnwDBiQ8HhMP62ki8jQB ASpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qVk+peEeY2YnCvOVk9gsHmBEEYb5zvb5gDI7zBMsQzM=; b=SKpeO5kVg9ZFN/tF9q4aZ5z8FpAMvtijhKnRepF3HFjyKC4ZM4KDg4TSBI/CdSUxo/ cpd4jF0UUcF5mNgr5AIHyzZvP25MJOafo6TNwt3DQ3J7I99i+Z/seZ1BBAmWkjcxywD3 z6iVfUZTHt0HycemXihHevGnk2R1lI398i+KpsS1TiISro1v4ZNDtC9iZ4e0/4ISVdHe e2xtPGagkOEnvDa6MsPaWKDL291Y9rBkCib4tKL69NXGfMQOijeViHNGRnHKn3EkPCbp JjwgOmOrJCIAiZXBaoFB6pVIAguP6yX3/FJFjMxtvbuddiFSMT+ZaeV4EixKw872PkfD R9fA== X-Gm-Message-State: AODbwcA5Vr1n/Wr7ITgCJTtbhWzUakqBxpK2oVqv7BNAfDYmzWL8Ql62 bq84GzycRT3I9zPWrxErdRV+OnBQmbJwWOA= X-Received: by 10.129.85.68 with SMTP id j65mr24988843ywb.309.1495547220657; Tue, 23 May 2017 06:47:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: James Carman Date: Tue, 23 May 2017 13:46:49 +0000 Message-ID: Subject: Re: Getting Full Address of Server? To: dev@cxf.apache.org Content-Type: multipart/alternative; boundary="001a113f1eaad533260550313859" archived-at: Tue, 23 May 2017 13:47:13 -0000 --001a113f1eaad533260550313859 Content-Type: text/plain; charset="UTF-8" That's what I figured. Just thought I'd check in with the experts. If I were to want to provide a patch, do you even think it's possible? On Tue, May 23, 2017 at 9:33 AM Sergey Beryozkin wrote: > Right, if the endpoint address is relative (=> Servlet transport) then > CXF does not know until the runtime what the container host, port or > context is > > Sergey > > > On 23/05/17 14:02, James Carman wrote: > > I tried various attempts at getting what need: > > > > final Server server = sf.create(); > > > > if(server.getDestination() instanceof AbstractHTTPDestination) { > > AbstractHTTPDestination httpDestination = > > (AbstractHTTPDestination)server.getDestination(); > > LOGGER.info("publishedEndpointUrl: {}", > > httpDestination.getEndpointInfo().getProperty("publishedEndpointUrl")); > > LOGGER.info("AbstractHTTPDestination.getPath(): {}", > > httpDestination.getPath()); > > LOGGER.info("AbstractHTTPDestination.getServer().getRedirectURL(): > {}", > > httpDestination.getServer().getRedirectURL()); > > } > > > LOGGER.info("server.getDestination().getAddress().getAddress().getValue(): > > {}", server.getDestination().getAddress().getAddress().getValue()); > > LOGGER.info("server.getEndpoint().getEndpointInfo().getAddress(): {}", > > server.getEndpoint().getEndpointInfo().getAddress()); > > > > > > Which only yielded: > > > > > > 2017-05-23T09:00:57,340 | INFO | pool-40-thread-1 | > > DefaultJaxrsServerFactory | 140 - org.microbule.core - 0.3.0.SNAPSHOT | > > publishedEndpointUrl: null > > 2017-05-23T09:00:57,340 | INFO | pool-40-thread-1 | > > DefaultJaxrsServerFactory | 140 - org.microbule.core - 0.3.0.SNAPSHOT | > > AbstractHTTPDestination.getPath(): /hello > > 2017-05-23T09:00:57,341 | INFO | pool-40-thread-1 | > > DefaultJaxrsServerFactory | 140 - org.microbule.core - 0.3.0.SNAPSHOT | > > AbstractHTTPDestination.getServer().getRedirectURL(): null > > 2017-05-23T09:00:57,342 | INFO | pool-40-thread-1 | > > DefaultJaxrsServerFactory | 140 - org.microbule.core - 0.3.0.SNAPSHOT | > > server.getDestination().getAddress().getAddress().getValue(): /hello > > 2017-05-23T09:00:57,342 | INFO | pool-40-thread-1 | > > DefaultJaxrsServerFactory | 140 - org.microbule.core - 0.3.0.SNAPSHOT | > > server.getEndpoint().getEndpointInfo().getAddress(): /hello > > > > > > On Tue, May 23, 2017 at 3:27 AM Dennis Kieselhorst > wrote: > > > >>> Is there a way to ascertain the full address of a server created with > >>> JAXRSServerFactoryBean? For example, if I only set the address to > >> "/foo", > >>> is there any way to know that the full address is actually " > >>> http://10.1.1.1/cxf/foo"? > >> > >> You can get the Address from EndpointInfo or use the > publishedEndpointUrl > >> property. > >> > >> Regards > >> Dennis > >> > > > --001a113f1eaad533260550313859--