Container running the Oxalis image return soap error for header StandardBusinessDocument #203
Replies: 10 comments 1 reply
-
Hi, That is strange indeed, maybe a typo somewhere ? Did you validate it with an xmlvaliator just to be sure structure is not incorrect ? Error message is clearly referrring to the SBDH. Regards, Richard |
Beta Was this translation helpful? Give feedback.
-
Hello Richard, thanks for your quick response! I just tested again and got the same response. The XML is attached to this comment. I find this strange, as the testbed states the following for the current step: The AccessPoint under test is expected to return the same document that was sent to the AP in the previous test case. Before the document is sent it needs to be modified in terms of sender and receiver. Sender will now be 0192:810418052, and receiver will be 0088:TBCNTRL00002. The changes needs to be applied both in the SBDH envelope as in the payload of the SBDH, no other changes should be made to the document and it is essential that the Document ID (Invoice number or Order number of the payload) is kept intact. |
Beta Was this translation helpful? Give feedback.
-
Hi, If I copy paste your xml it is valid in my situation, however, it seems your file is in UTF-8 encoding, please try saving it as ASCII and could you please try again ? Regards, Richard |
Beta Was this translation helpful? Give feedback.
-
Hello again, just tried ASCII charset with the same result. Also tried using as2 instead of as4, tried the following Content types in the API headers for the POST call: "Application/xml", "Application/xml+soap", "Text/xml" and "Text/xml+soap". Just to be clear, I am building the Oxalis Access Point from the norstella/oxalis:latest image on dockerhub. Google and ChatGPT both suggests using soap specific envelop prefixes, but that would violate the format of all the Peppob Bis 3.0 documents I have seen. |
Beta Was this translation helpful? Give feedback.
-
Could you give us some more background, version of oxalis used, command used for sending etc. Regards, Richard |
Beta Was this translation helpful? Give feedback.
-
Judging by the oxalis-standalone-5.5.1-SNAPSHOT.jar, I'd assume it is version 5.5.1. My code for reading the content from the xml file and sending it to the oxalis API is pasted below. One question: is there some way I can configure the access point to automatically process files placed in the outbound folder? Here is my code for sending. It is Java 20. If you want my sender and receiver addresses as well as the real URL for my endpoint I can send it to you directly. `import java.io.*; public class SendPeppolDocument {
} |
Beta Was this translation helpful? Give feedback.
-
Does it work via the stand-alone integration ? Oxalis 5.5.x is only compatible with java8. https://github.com/OxalisCommunity/oxalis/blob/master/doc/installation.md |
Beta Was this translation helpful? Give feedback.
-
@alfchristensen : First of all it is Not an issue but discussion topic. So I am changing it to discussion, unless you will pin-point it as bug. As a guidance, I have following suggestion:
Note: I recommend please go through instructions, previously posted issues and zero-in on issue before posting anything as bug. Though you are free to open it as discussion item and community will reply back. Thanks for using Oxalis. Wishing you best of luck for Testbed certification !!! |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input Aaron! I found your norstella/oxalis:latest image on dockerhub and thought it might be a good place to start. As the error I got was from a required header, it seemed like a bug to me. The classification of the situation is not my primary concern, however. I'll try and follow up on Richards answer, and build from source code. |
Beta Was this translation helpful? Give feedback.
-
@alfchristensen - if I read your posted code correctly, you just create a pure HttpURLConnection to your AS4 Oxalis endpoint and try to write bytes there? Unfortunately, it is not how AS4 protocol works :) You cannot use pure connections, that is where the whole Oxalis Standalone with Apache CXF come up. XML documents should be encrypted, signed, wrapped into envelope etc... A lot of code should be written, so better start at first from reading https://github.com/OxalisCommunity/Oxalis-AS4/blob/master/docs/peppol-test-bed/index.md to see how to execute the sending step, and then look into its code (quite complex) to see how to construct TransmissionRequest, get an instance of Transmitter and make a request itself... |
Beta Was this translation helpful? Give feedback.
-
Hi!
I am running the Oxalis docker image as a container on Azure. Everything works as expected with the first test, and I get the document in a folder under /oxalis/inbound. When I try to send the document back with swapped sender and receiver, the Oxalis container shows the stack trace error below regarding the StandardBusinessDocumentHeader having invalid soap version. It is the exact same document I received, with swapped sender and receiver 4 places. Any help or insight would be greatly appreciated.
2023-05-01T22:09:35.676207144Z May 01, 2023 10:09:35 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging 2023-05-01T22:09:35.676249245Z WARNING: Interceptor for has thrown exception, unwinding now 2023-05-01T22:09:35.676261045Z org.apache.cxf.binding.soap.SoapFault: "http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader", the namespace on the "StandardBusinessDocument" element, is not a valid SOAP version. 2023-05-01T22:09:35.676265845Z at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:132) 2023-05-01T22:09:35.676271045Z at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:175) 2023-05-01T22:09:35.676275045Z at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:70) 2023-05-01T22:09:35.676278945Z at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) 2023-05-01T22:09:35.676282946Z at org.apache.cxf.transport.MultipleEndpointObserver.onMessage(MultipleEndpointObserver.java:98) 2023-05-01T22:09:35.676286946Z at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) 2023-05-01T22:09:35.676290546Z at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) 2023-05-01T22:09:35.676306946Z at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) 2023-05-01T22:09:35.676310846Z at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) 2023-05-01T22:09:35.676314446Z at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) 2023-05-01T22:09:35.676318246Z at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304) 2023-05-01T22:09:35.676322046Z at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) 2023-05-01T22:09:35.676325846Z at javax.servlet.http.HttpServlet.service(HttpServlet.java:665) 2023-05-01T22:09:35.676329446Z at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279) 2023-05-01T22:09:35.676333046Z at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290) 2023-05-01T22:09:35.676336747Z at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280) 2023-05-01T22:09:35.676340347Z at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184) 2023-05-01T22:09:35.676345647Z at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89) 2023-05-01T22:09:35.676349547Z at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) 2023-05-01T22:09:35.676353347Z at io.opentracing.contrib.web.servlet.filter.TracingFilter.doFilter(TracingFilter.java:189) 2023-05-01T22:09:35.676357047Z at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) 2023-05-01T22:09:35.676360747Z at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) 2023-05-01T22:09:35.676364347Z at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) 2023-05-01T22:09:35.676368047Z at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2023-05-01T22:09:35.676371547Z at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2023-05-01T22:09:35.676375147Z at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) 2023-05-01T22:09:35.676378947Z at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 2023-05-01T22:09:35.676382647Z at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) 2023-05-01T22:09:35.676386347Z at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 2023-05-01T22:09:35.676390048Z at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) 2023-05-01T22:09:35.676393848Z at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 2023-05-01T22:09:35.676397448Z at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) 2023-05-01T22:09:35.676405048Z at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 2023-05-01T22:09:35.676408748Z at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59) 2023-05-01T22:09:35.676412548Z at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2023-05-01T22:09:35.676416348Z at org.eclipse.jetty.server.Server.handle(Server.java:516) 2023-05-01T22:09:35.676419948Z at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 2023-05-01T22:09:35.676423748Z at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 2023-05-01T22:09:35.676427248Z at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 2023-05-01T22:09:35.676430848Z at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 2023-05-01T22:09:35.676434348Z at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 2023-05-01T22:09:35.676437948Z at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 2023-05-01T22:09:35.676441749Z at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 2023-05-01T22:09:35.676445749Z at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 2023-05-01T22:09:35.676449549Z at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 2023-05-01T22:09:35.676453349Z at java.lang.Thread.run(Thread.java:748)
Beta Was this translation helpful? Give feedback.
All reactions