This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new cba50ce Update asn1-dataformat.adoc (#5942)
cba50ce is described below
commit cba50ce7b3fba4ebf43b8a2ecbe751b9bfbbe5b2
Author: Leylow Lujuo <[email protected]>
AuthorDate: Mon Aug 9 07:13:28 2021 +0300
Update asn1-dataformat.adoc (#5942)
Replace from `body` to `bodyAs`
---
components/camel-asn1/src/main/docs/asn1-dataformat.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-asn1/src/main/docs/asn1-dataformat.adoc
b/components/camel-asn1/src/main/docs/asn1-dataformat.adoc
index 1223c82..57e8ae1 100644
--- a/components/camel-asn1/src/main/docs/asn1-dataformat.adoc
+++ b/components/camel-asn1/src/main/docs/asn1-dataformat.adoc
@@ -43,7 +43,7 @@ In such example, note that you need to set
`usingIterator=true`
[source,java]
-----------------------------------------------------------------------
-from("direct:unmarshal").unmarshal(asn1).split(body(Iterator.class)).streaming().to("mock:unmarshal");
+from("direct:unmarshal").unmarshal(asn1).split(bodyAs(Iterator.class)).streaming().to("mock:unmarshal");
-----------------------------------------------------------------------
In the last example we unmarshal BER file payload to plain old Java Objects
using Split EIP. The reason for applying Split EIP is already mentioned in the
previous example. Please note and keep in mind that reason. In such example we
also need to set the fully qualified name of the class or <YourObject>.class
reference through data format.
@@ -56,7 +56,7 @@ The nice thing about this example, you will get POJO instance
at the mock endpoi
from("direct:unmarshaldsl")
.unmarshal()
.asn1("org.apache.camel.dataformat.asn1.model.testsmscbercdr.SmsCdr")
- .split(body(Iterator.class)).streaming()
+ .split(bodyAs(Iterator.class)).streaming()
.to("mock:unmarshaldsl");
-----------------------------------------------------------------------