on ‎2012 Oct 23 3:44 PM
Hi,
We have a requirement in CRM B2B web shop where we need to access third party web service. We have all the required JARS related to webservice. I am working on NWDS 7.3. I am calling this service from one of the Z Class method created in home/shr/ext.
I have added external JARS by creating a new External library DC under SHRWEB and added dependency between home/shr/ext and newly created external libaray DC.
I have followed the below SAP help for this
http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/content.htm
I was able to deploy the application successfully but am getting NoClassFound Exception for one of the class which is there in jar file while calling this service, means the JARS are not available for the application.
Can any one please suggest how to resolve this issue.
Thanks,
Rajinikanth G
Request clarification before answering.
Easy to solve this one.
You assigned your library to your Java Component, which is correct. This only allows the build envionment to locate your class and compile your code into a jar file.
This jar file is referenced by your web-application (DC) and all depending jar files of your java DC are not added automatically. The war app therefore just knews your java DC jar file, but not the external library => Class not found exception.
You have to assign the external lib to your war file as well, then it becomes automatically stored in the lib folder within the *.war file, that you have added.
You can also use somehow the application-config.xml of the ear project to referece some libraries of other deployments (which would require also more work to make the external lib available in a different way), but this is a bit too complicate if you anyway just run a single web-application scenario.
Happy coding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Andreas.
How to add external jars to *.war. I already tried adding External Library DC as Used DC for crm/isa/b2b (where we have *.war). I did not see external jars in lib folder of *.war even fter adding External Library DC as Used DC for crm/isa/b2b.
Please suggest.
Thanks,
Rajinikanth G
Thank you Andreas.
With the above, Now i am not getting NoClassFound Exception.
But now i am getting this exception - "
javax.xml.rpc.ServiceException: Error processing WSDL document: javax.xml.rpc.ServiceException: Cannot find service " for the third party web service.
Can you please suggest how to resolve this issue. I will create a new post if required.
Thanks,
Rajinikanth G
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.