on 08-06-2014 2:29 PM
Hello All,
Currently I am trying to create a SOAP web service within a HCP Java application to allow backend systems to consume data stored in HCP.
This is the planned scenario:
1. Create data in HCP - therefor I am using JPA and a oData Model.
2. Backend uses web service to consume data from HCP - with this point I do have some problems.. I do want to create a SOAP web service in order to achieve this.
Is there an easy way to create a SOAP web service in HCP? There are many tutorials in the internet of how to create a SOAP web service in 20 sec´s, but non of these helped me. I do was able to consume a SOAP web service in HCP coming from the ByD, but the other way around seems pretty complicated...
Can I make use of the Eclipse functions to create a web service? (New --> Other... --> Web Services --> Web Service and than choose the Button up Java bean Web Service type)
Have any of you some coding snippets that would probably help me out?
I have unsuccessfully tried to use the @WebService, @SOAPBinding, @WebMethod notation in my java classes...
Thank you,
Swen
Hello Swen,
this should not be so complicated.
Just use some of the Java based frameworks to create your WAR:
List of web service frameworks - Wikipedia, the free encyclopedia
Then deploy it on the SAP HANA Cloud Platform and it should work out of the box.
Best regards,
Dobri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nedelcho,
Yes. All the required jar files are in the lib directory.
Currently I am able to create a web service locally.
But when I deploy that to the cloud server my JPA service is not working any more.
Receiving the following error message:
<?xml version='1.0' encoding='UTF-8'?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en">javax.naming.NamingException: Error while attempting to resolve reference [Root exception is javax.naming.NamingException: Cannot create resource object instance due to exception in the object factory [Root exception is javax.naming.NamingException: Data source 'jdbc/DefaultDB' not available.]]</message></error>
The web.xml contains the following:
Any advice?
Best regards,
Swen
Hello Swen,
Can you please tell me how to resolve this issue?
I am facing same problem with my HCP application "javax.naming.NamingException: Error while attempting to resolve reference [Root exception is javax.naming.NamingException: Cannot create resource object instance due to exception in the object factory [Root exception is javax.naming.NamingException: Data source 'jdbc/DefaultDB' not available.]]" when trying to access the Odata Service.
Thanks and Regards,
Sriram
Hi Swen,
could you please tell me how you were able to consume a SOAP web service in HCP coming from ByD? I´ve got some issues consuming soap webservices....
Many thanks in advance!
Best regards,
Rufat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faheem,
HCP only offers the possibility to deploy the Java Based WebService Client application in order to consume e.g. in SAP UI5/Fiori APP.
It is not possible to expose the SOAP based Webservices directly. You need to develop a Java Client application (with entitiy classes) and use servlets for the communication with ByDesign.
For example NetBeans offers you the possibility to generate Java Clients based on the SOAP WSDL which you need to import. Then, you need to adapt these clients.
If you don´t want to develop java based clients, SAP HCI offers now the possibility to expose SOAP based Webservices as OData. Then, after generating the OData you should be able to consume those. I don´t have practical experience with HCI OData exposition but only read about it. It is a brand new feature. Have a look here:
Best regards,
Rufat
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.