05-17-2019 11:04 AM - edited 02-03-2024 7:49 PM
I need to learn how to call the S/4 SOAP API for posting journal entries within a java application that would run on SAP Cloud Platform. I found a blog on using Apache Axis2 for S/4 SOAP APIs (Deep Dive 18 with SAP S/4HANA Cloud SDK: Convenient Consumption of SAP S/4HANA SOAP APIs), and have generated a stub from the asynchronous version's wsdl. However, when I attempt to execute my test java servlet on an SAP Cloud Platform subaccount, I get:
2019 05 17 20:28:00#+00#ERROR#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/postjournalentry-application].[com.cfindustries.scpjava.HelloWorldServlet]##anonymous#https-jsse-nio-8041-exec-5#na#hc8b40d36#postjournalentryapplication#web#hc8b40d36#na#na#na#na#Servlet.service() for servlet [com.cfindustries.scpjava.HelloWorldServlet] in context with path [/postjournalentry-application] threw exception org.apache.axis2.deployment.DeploymentException: org.apache.axis2.transport.local.LocalTransportSender
From the logging statements I placed in the program, it appears this is happening when it tries to execute " _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext, _service);" (configurationContext is null).
Hi Steve
I think the deployment exception means you are missing jar files. Can you share your pom file and the updates you made?
Thanks,
Marty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Marty. Since posting my original message, I had added axis2-transport-http and axis2-transport-local to the plug-ins in the pom, changed the passed Axis2 configuration context from null to ConfigurationContextFactory.createEmptyConfigurationContext(), and changed the target to be the URL of the communication arrangement for posting journal entries asynchronously of our S/4HANA Cloud sandbox. I am now getting "The system cannot infer the transport information from the https://my301840-api.s4hana.ondemand.com/sap/bc/srt/scs_ext/sap/journalentrybulkcreationreques URL." I will investigate this on my own, however, in case you have a quick answer, I've attached the pom, as well as the servlet and the stub in a zip file.
Hi Steve
Not sure, but in the wsdl the soap endpoint should be--maybe this will work?
Thanks,
Marty
Hi Steve,
Do you have any luck with soap asynchronous call? Do you mind share your approach?
I am trying to post clearing and in SAP Business Hub, it only provides Async endpoint.
The only class available in SDK to make soap call is SoapRequest and it does not have capability to register callback handler. I played around with Axis and hit the dead end.
Anyone else face the same issue? Please let me know if there is work around.
marty.mccormick
Thanks
Anthony
As an alternative to Axis2, I am trying to use JAXM - we would like to get the asynchronous version of the journal entry posting API to work. According to the JAXM documentation (https://docs.oracle.com/cd/E19644-01/817-5452/wsgjaxm.html#wp41528), a "messaging provider" is required for asynchronous calls.
I see that I would need to use the ProviderConnectionFactory for asynchronous calls (http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM4.html), but I don't know how to obtain (or set up) a "messaging provider": Is there a certain "messaging provider" that SAP would advise we use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.