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 2019/04/29 09:52:41 UTC

[camel] branch master updated: Fixed camel-as2 endpoint syntax

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 4285209  Fixed camel-as2 endpoint syntax
4285209 is described below

commit 4285209028e064d32e4cf1c7bd18418199b1ac2a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Apr 29 11:52:07 2019 +0200

    Fixed camel-as2 endpoint syntax
---
 .../camel-as2-component/src/main/docs/as2-component.adoc          | 8 ++++----
 .../java/org/apache/camel/component/as2/AS2Configuration.java     | 4 ++--
 .../src/main/java/org/apache/camel/component/as2/AS2Endpoint.java | 2 +-
 components/readme.adoc                                            | 2 +-
 examples/camel-example-as2/README.md                              | 2 +-
 .../src/main/resources/META-INF/spring/camel-context.xml          | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
index 411d47e..3352516 100644
--- a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
+++ b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
@@ -55,22 +55,23 @@ The AS2 component supports 2 options, which are listed below.
 The AS2 endpoint is configured using URI syntax:
 
 ----
-as2:apiName
+as2:apiName/methodName
 ----
 
 with the following path and query parameters:
 
-==== Path Parameters (1 parameters):
+==== Path Parameters (2 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *apiName* | *Required* What kind of operation to perform |  | AS2ApiName
+| *methodName* | *Required* What sub operation to use for the selected operation |  | String
 |===
 
 
-==== Query Parameters (32 parameters):
+==== Query Parameters (31 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -91,7 +92,6 @@ with the following path and query parameters:
 | *from* (common) | The value of the From header of AS2 message. |  | String
 | *inBody* (common) | Sets the name of a parameter to be passed in the exchange In Body |  | String
 | *mdnMessageTemplate* (common) | The template used to format MDN message |  | String
-| *methodName* (common) | *Required* What sub operation to use for the selected operation |  | String
 | *requestUri* (common) | The request URI of EDI message. | / | String
 | *server* (common) | The value included in the Server message header identifying the AS2 Server. | Camel AS2 Server Endpoint | String
 | *serverFqdn* (common) | The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint. | camel.apache.org | String
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
index 7fdaf379..1ba8f60 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
@@ -38,10 +38,10 @@ import org.apache.http.entity.ContentType;
 public class AS2Configuration {
 
     @UriPath
-    @Metadata(required = true)
+    @Metadata(required = true, enums = "client,server")
     private AS2ApiName apiName;
 
-    @UriParam
+    @UriPath
     @Metadata(required = true)
     private String methodName;
 
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
index bec1d01..25f4f1a 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
@@ -49,7 +49,7 @@ import org.apache.http.entity.ContentType;
 /**
  * Component used for transferring data secure and reliable over the internet using the AS2 protocol.
  */
-@UriEndpoint(scheme = "as2", firstVersion = "2.22.0", title = "AS2", syntax = "as2:apiName", label = "AS2")
+@UriEndpoint(scheme = "as2", firstVersion = "2.22.0", title = "AS2", syntax = "as2:apiName/methodName", label = "AS2")
 public class AS2Endpoint extends AbstractApiEndpoint<AS2ApiName, AS2Configuration> {
 
     @UriParam
diff --git a/components/readme.adoc b/components/readme.adoc
index 2e69822..64ca5f3 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -32,7 +32,7 @@ Number of Components: 294 in 231 JAR artifacts (0 deprecated)
 `apns:name` | 2.8 | For sending notifications to Apple iOS devices.
 
 | link:camel-as2/camel-as2-component/src/main/docs/as2-component.adoc[AS2] (camel-as2) +
-`as2:apiName` | 2.22 | Component used for transferring data secure and reliable over the internet using the AS2 protocol.
+`as2:apiName/methodName` | 2.22 | Component used for transferring data secure and reliable over the internet using the AS2 protocol.
 
 | link:camel-asterisk/src/main/docs/asterisk-component.adoc[Asterisk] (camel-asterisk) +
 `asterisk:name` | 2.18 | The asterisk component is used to interact with Asterisk PBX Server.
diff --git a/examples/camel-example-as2/README.md b/examples/camel-example-as2/README.md
index 86a0d9b..62dcfea 100644
--- a/examples/camel-example-as2/README.md
+++ b/examples/camel-example-as2/README.md
@@ -5,7 +5,7 @@
 This example shows how to work with AS2 and Camel.
 
 The Camel AS2 example is a demo of the camel-as2 component to show how to route messages between AS2 endpoints,
-with endpoints consuming and producting AS2 messages over HTTP request.  
+with endpoints consuming and producing AS2 messages over HTTP request.  
 
 ### Build
 
diff --git a/examples/camel-example-as2/src/main/resources/META-INF/spring/camel-context.xml b/examples/camel-example-as2/src/main/resources/META-INF/spring/camel-context.xml
index 0c3584d..ec64c7b 100644
--- a/examples/camel-example-as2/src/main/resources/META-INF/spring/camel-context.xml
+++ b/examples/camel-example-as2/src/main/resources/META-INF/spring/camel-context.xml
@@ -34,7 +34,7 @@
 		xmlns="http://camel.apache.org/schema/spring">
         <route id="server-route">
           <from
-              uri="as2://server/listen?requestUriPattern=/&amp;serverPortNumber=8888"/>
+              uri="as2://server/listen?requestUri=/&amp;serverPortNumber=8888"/>
           <to uri="bean:examine-as2-server-endpoint-exchange"/>
         </route>
         <route id="triger-clients-route">