[
https://issues.apache.org/jira/browse/CAMEL-16932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17412677#comment-17412677
]
Andrea Cosentino commented on CAMEL-16932:
------------------------------------------
If you have question about this, or you think there is space to improvement,
open another issue. The information has been provided. There is the zulip chat
for discussing about how you can do something, but if something has been
resolved and the answer has been given, you can, for sure, re-open the issue,
but now you're talking about something different. The chain of certificates is
a different question. Your question about endpoint-dsl too. Mixing everything
in the comments will create only confusion. That's why I resolved the issue
again.
> Configuration properties (AS2Configuration) of an AS2 client endpoint are
> ignored
> ---------------------------------------------------------------------------------
>
> Key: CAMEL-16932
> URL: https://issues.apache.org/jira/browse/CAMEL-16932
> Project: Camel
> Issue Type: Bug
> Components: camel-as2
> Affects Versions: 3.11.0
> Reporter: Dmitrii Kriukov
> Priority: Minor
> Fix For: 3.12.0
>
>
> Code snippet - creation of endpoint:
> private Endpoint configureAs2ClientEndpoint() throws Exception {
> org.apache.http.entity.ContentType contentTypeEdifact =
> org.apache.http.entity.ContentType.create("application/edifact", (Charset)
> null);
> String methodName = "send";
> AS2ApiName as2ApiNameClient = AS2ApiName.CLIENT;
> AS2Configuration endpointConfiguration = new AS2Configuration();
> endpointConfiguration.setApiName(as2ApiNameClient);
> endpointConfiguration.setMethodName(methodName);
> endpointConfiguration.setRequestUri("/as2/HttpReceiver");
> endpointConfiguration.setAs2MessageStructure(AS2MessageStructure.PLAIN);
> endpointConfiguration.setAs2Version(as2Version);
> endpointConfiguration.setAs2To("mendelsontestAS2");
> endpointConfiguration.setAs2From("mycompanyAS2");
> endpointConfiguration.setEdiMessageType(contentTypeEdifact);
> endpointConfiguration.setFrom("dk2kEdi");
> //endpointConfiguration.setTargetPortNumber(8080);
> //endpointConfiguration.setTargetHostname("testas2.mendelson-e-c.com");
> AS2Component as2Component = new AS2Component();
> as2Component.setCamelContext(camelContext);
> as2Component.setConfiguration(endpointConfiguration);
> Endpoint clientEndpoint =
> as2Component.createEndpoint("as2://client/send?targetHostName=testas2.mendelson-e-c.com"
> +
> "&targetPortNumber=8080" + // http
> "&inBody=ediMessage" +
> "&requestUri=/as2/HttpReceiver");
> return clientEndpoint;
> }
>
> When I invoke this endpoint in a route, I get an exception:
> org.apache.camel.RuntimeCamelException: Missing properties for send, need one
> or more from [as2MessageStructure, subject, ediMessageTransferEncoding,
> encryptingCertificateChain, ediMessageContentType, encryptingAlgorithm,
> requestUri, signingPrivateKey, signedReceiptMicAlgorithms, as2To, as2From,
> signingAlgorithm, compressionAlgorithm, from, signingCertificateChain,
> dispositionNotificationTo]
> at
> org.apache.camel.support.component.AbstractApiProducer.findMethod(AbstractApiProducer.java:151)
> at
> org.apache.camel.support.component.AbstractApiProducer.process(AbstractApiProducer.java:71)
> at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172)
> at
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:463)
> at
> org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:179)
> at
> org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:184)
> at
> org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:398)
> at
> org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:245)
> at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> at
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
> at
> org.apache.camel.component.jetty.MultiPartFilter.doFilter(MultiPartFilter.java:50)
> at
> org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:45)
> at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> at java.base/java.lang.Thread.run(Thread.java:832)
>
> Do I miss some configuration steps in the code snippet? I guess the entire
> endpointConfiguration is ignored and only a couple of settings from the uri
> aren't reported missing.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)