You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/10/09 07:31:46 UTC

[1/4] camel git commit: Add publishedEndpointUrl to cxfrs doc

Repository: camel
Updated Branches:
  refs/heads/master 8874ee1e8 -> e9e862b3d


Add publishedEndpointUrl to cxfrs doc

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fc289158
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fc289158
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fc289158

Branch: refs/heads/master
Commit: fc28915869afd924a39e21e0c8d2c4d276dc2f81
Parents: 6dec17b
Author: David Santos <da...@gmail.com>
Authored: Fri Oct 7 12:10:56 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Oct 9 09:22:31 2016 +0200

----------------------------------------------------------------------
 components/camel-cxf/src/main/docs/cxfrs-component.adoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fc289158/components/camel-cxf/src/main/docs/cxfrs-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/docs/cxfrs-component.adoc b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
index ba4ff42..6970c07 100644
--- a/components/camel-cxf/src/main/docs/cxfrs-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
@@ -116,6 +116,7 @@ The CXF-RS component supports 29 endpoint options which are listed below:
 | performInvocation | advanced | false | boolean | When the option is true Camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.
 | propagateContexts | advanced | false | boolean | When the option is true JAXRS UriInfo HttpHeaders Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.
 | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+| publishedEndpointUrl | producer |  | String | This option can override the endpointUrl that published from the WADL which can be accessed with resource address url plus ?_wadl
 |=======================================================================
 {% endraw %}
 // endpoint options: END


[4/4] camel git commit: Add the option to endpoint and use in configuring the factory.

Posted by da...@apache.org.
Add the option to endpoint and use in configuring the factory.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9e862b3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9e862b3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9e862b3

Branch: refs/heads/master
Commit: e9e862b3d474adacdca31d754576a8b52fe549ab
Parents: fc28915
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Oct 9 09:31:17 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Oct 9 09:31:17 2016 +0200

----------------------------------------------------------------------
 .../camel-cxf/src/main/docs/cxfrs-component.adoc   |  4 ++--
 .../camel/component/cxf/jaxrs/CxfRsEndpoint.java   | 17 +++++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e9e862b3/components/camel-cxf/src/main/docs/cxfrs-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/docs/cxfrs-component.adoc b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
index 6970c07..b1b7ee8 100644
--- a/components/camel-cxf/src/main/docs/cxfrs-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
@@ -81,7 +81,7 @@ The CXF-RS component supports 1 options which are listed below.
 
 
 // endpoint options: START
-The CXF-RS component supports 29 endpoint options which are listed below:
+The CXF-RS component supports 30 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -99,6 +99,7 @@ The CXF-RS component supports 29 endpoint options which are listed below:
 | skipFaultLogging | common | false | boolean | This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.
 | bindingStyle | consumer | Default | BindingStyle | Sets how requests and responses will be mapped to/from Camel. Two values are possible: SimpleConsumer: This binding style processes request parameters multiparts etc. and maps them to IN headers IN attachments and to the message body. It aims to eliminate low-level processing of org.apache.cxf.message.MessageContentsList. It also also adds more flexibility and simplicity to the response mapping. Only available for consumers. Default: The default style. For consumers this passes on a MessageContentsList to the route requiring low-level processing in the route. This is the traditional binding style which simply dumps the org.apache.cxf.message.MessageContentsList coming in from the CXF stack onto the IN message body. The user is then responsible for processing it according to the contract defined by the JAX-RS method signature. Custom: allows you to specify a custom binding through the binding option.
 | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| publishedEndpointUrl | consumer |  | String | This option can override the endpointUrl that published from the WADL which can be accessed with resource address url plus _wadl
 | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
 | exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange.
 | hostnameVerifier | producer |  | HostnameVerifier | The hostname verifier to be used. Use the notation to reference a HostnameVerifier from the registry.
@@ -116,7 +117,6 @@ The CXF-RS component supports 29 endpoint options which are listed below:
 | performInvocation | advanced | false | boolean | When the option is true Camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.
 | propagateContexts | advanced | false | boolean | When the option is true JAXRS UriInfo HttpHeaders Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.
 | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
-| publishedEndpointUrl | producer |  | String | This option can override the endpointUrl that published from the WADL which can be accessed with resource address url plus ?_wadl
 |=======================================================================
 {% endraw %}
 // endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/e9e862b3/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index cb5dff4..097c442 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -85,6 +85,8 @@ public class CxfRsEndpoint extends DefaultEndpoint implements HeaderFilterStrate
     private String modelRef;
     @UriParam(label = "consumer", defaultValue = "Default")
     private BindingStyle bindingStyle = BindingStyle.Default;
+    @UriParam(label = "consumer")
+    private String publishedEndpointUrl;
     @UriParam(label = "advanced")
     private HeaderFilterStrategy headerFilterStrategy;
     @UriParam(label = "advanced")
@@ -318,6 +320,10 @@ public class CxfRsEndpoint extends DefaultEndpoint implements HeaderFilterStrate
             factory.getFeatures().addAll(getFeatures());
         }
 
+        if (publishedEndpointUrl != null) {
+            factory.setPublishedEndpointUrl(publishedEndpointUrl);
+        }
+
         // we need to avoid flushing the setting from spring or blueprint
         if (!interceptorHolder.getInInterceptors().isEmpty()) {
             factory.setInInterceptors(interceptorHolder.getInInterceptors());
@@ -441,6 +447,17 @@ public class CxfRsEndpoint extends DefaultEndpoint implements HeaderFilterStrate
         return resolvePropertyPlaceholders(address);
     }
 
+    public String getPublishedEndpointUrl() {
+        return publishedEndpointUrl;
+    }
+
+    /**
+     * This option can override the endpointUrl that published from the WADL which can be accessed with resource address url plus ?_wadl
+     */
+    public void setPublishedEndpointUrl(String publishedEndpointUrl) {
+        this.publishedEndpointUrl = publishedEndpointUrl;
+    }
+
     /**
      * This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.
      */


[3/4] camel git commit: Add publishedEndpointUrl capability to rsServer

Posted by da...@apache.org.
Add publishedEndpointUrl capability to rsServer

Endpoint definition allows to specify publishedEndpointUrl, but this attribute is not available in rsServer element. This attribute (publishedEndpointUrl) is used by WadlGenerator to compose baseUri resource in the WADL. If you are deploying a REST service in an internal net but exposed to internet (through reverse proxy, for example) , WADL should inform such publishing address (in a similar way that you can do it with WSDL in camel-cxf).

Actually, since no publishedEndpointUrl can be used in rsServer definition, baseUri is built with HTTP request information. That means internal network information could be leaked in a reverse proxy scenario.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/46699f94
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/46699f94
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/46699f94

Branch: refs/heads/master
Commit: 46699f94c0f0bb4c2300b8650e78bc6ffc03377a
Parents: 8874ee1
Author: David Santos <da...@gmail.com>
Authored: Fri Oct 7 09:19:13 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Oct 9 09:22:31 2016 +0200

----------------------------------------------------------------------
 .../camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/46699f94/components/camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd b/components/camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd
index f5efdf3..b2f7165 100644
--- a/components/camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd
+++ b/components/camel-cxf/src/main/resources/schema/blueprint/camel-cxf.xsd
@@ -98,6 +98,7 @@
           <xsd:attribute name="staticSubresourceResolution" type="xsd:boolean"/>
           <xsd:attribute name="loggingFeatureEnabled" type="xsd:boolean"/>
           <xsd:attribute name="loggingSizeLimit" type="xsd:integer" />
+          <xsd:attribute name="publishedEndpointUrl" type="xsd:string" />
         </xsd:extension>
       </xsd:complexContent>
     </xsd:complexType>
@@ -175,4 +176,4 @@
     </xsd:sequence>
     <xsd:attribute name="id" type="xsd:string"/>
   </xsd:complexType>
-</xsd:schema>
\ No newline at end of file
+</xsd:schema>


[2/4] camel git commit: Update cxfEndpoint.xsd

Posted by da...@apache.org.
Update cxfEndpoint.xsd

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6dec17b1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6dec17b1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6dec17b1

Branch: refs/heads/master
Commit: 6dec17b15219a2ac1cced9014383869f1a4eb695
Parents: 46699f94
Author: David Santos <da...@gmail.com>
Authored: Fri Oct 7 09:56:58 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Oct 9 09:22:31 2016 +0200

----------------------------------------------------------------------
 components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6dec17b1/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd b/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
index 72f9741..12dcc0e 100644
--- a/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
+++ b/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
@@ -98,6 +98,7 @@
           <xsd:attribute name="loggingFeatureEnabled" type="xsd:boolean"/>
           <xsd:attribute name="loggingSizeLimit" type="xsd:integer" />
           <xsd:attribute name="skipFaultLogging" type="xsd:boolean" />
+          <xsd:attribute name="publishedEndpointUrl" type="xsd:string" />
         </xsd:extension>
       </xsd:complexContent>
     </xsd:complexType>