on 07-13-2006 10:26 PM
Hi All,
I have a requirement which is to create a JAVA web service in NWDS which can service a .NET internet Application take some data from .NET and
put it into the SAP by calling a RFC Module...
I have written a class which has two methods
it simply connects to SAP & processes the RFC Module...
This class works fine if i run it as a
standalone java application with a main
method.. <b>but it fails</b> when i deploy it as a web service and try to run it through a Standalone
Client ... it is able to create the
WSDL and the methods are also visible but it
fails from the code where JCO logic starts...
I am getting the error message as
<b>Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.
wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
javax.xml.rpc.soap.SOAPFaultException: com/sap/mw/jco/JCO$Exception
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.buildFaultException(MimeHttpBinding.java:651)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.processDocumentFault(MimeHttpBinding.java:742)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1240)
at proxy.ConfigBindingStub.setCustomerMasterRFC(ConfigBindingStub.java:81)
at proxy.ConfigBindingStub.setCustomerMasterRFC(ConfigBindingStub.java:112)
at proxy.DealerClient.main(DealerClient.java:25)</b>
I am using sapjco.jar in the project properties dialog box but it is not there when the EAR is generated & deployed..
Can this be a problem ??? If yes where should i put
this sapjco.jar
Please help me out as i am really facing a hard time finding out the reason for this
Hi Maksim,
Thankyou so much maksim for the jar file path
you had given , the first error is gone
when i put the jar file in project
properties.
But i am still getting some errors
because of the JCO library methods that
i am using ... all other simple web services
work fine in my system but i am getting
following errors
<b>javax.xml.rpc.soap.SOAPFaultException: com/sap/mw/jco/JCO
at com.sap.engine.services.webservices.jaxrpc.
wsdl2java.soapbinding.MimeHttpBinding.
buildFaultException(MimeHttpBinding.java:651)
at com.sap.engine.services.webservices.jaxrpc.
wsdl2java.soapbinding.MimeHttpBinding.
processDocumentFault(MimeHttpBinding.java:742)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1240)
at proxy.ConfigBindingStub.setEclipseData(ConfigBindingStub.java:80)
at proxy.ConfigBindingStub.setEclipseData(ConfigBindingStub.java:96)
at com.carrier.isa.Client.main(Client.java:29)</b>
when i put a simple code like
<b>JCO.Client aConnection=null;
IRepository aRepository=null;
try {
System.out.println("Creating a client");
aConnection=JCO.createClient(
SAP_CLIENT,
USER_ID,
PASSWORD,
LANGUAGE,
HOST_NAME,
SYSTEM_NUMBER);</b> System.out.println(aConnection.toString());
ArrayList array=new ArrayList();
array.add("Tarun");
array.add("Abhay");
array.add("Sujit");
array.add("Sandy");
array.add("Sachin");
returnStr=array.get(2).toString()"--"test;
}
catch(Exception e)
{
e.printStackTrace();
}
return returnStr;
}
the code above is just a snippet of the whole .
I have sapjco.jar in project properties in NWDS or eclipse but this jar is missing when
i build an EAR in the Web services perspective..
Can the missing of this jar in the
project EAR be the cause of problem ...
if yes let me know where should i add it ...
Also, I created a simple java project so i
am not having any WEB-INF folder ...
do i need to create a web project instead ..
Please help me as you did earlier ..
I would be highly obliged ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tarun
*****************
Can the missing of this jar in the
project EAR be the cause of problem ...
if yes let me know where should i add it ...
Answer: <b>NO</b>
*****************
Also, I created a simple java project so i
am not having any WEB-INF folder ...
do i need to create a web project instead ..
Answer: <b>Simple Java Project will not have WEB-INF folder.
Web Project will sure have WEB-INF folder</b>
********************************
Are you missing any XML jar file ???
Check ?
The follwoing are some of the jar that i find in my NWDS:
boot.jar
iq-lib.jar
tc_sec_wssec_lib.jar
util.jar
webservice_api.jar
webservice_lib.jar
SapIdeWebServiceToolsSoap.jar
Try these !!!!
Thanks
Jack
<b>Allot points if my post helps !!!!</b>
Message was edited by: Jack
Hi Maksim,
Thankyou so much maksim for the jar file path you had given , the first error is gone when i put the jar file in project properties.
But i am still getting some errors because of the JCO library methods that i am using ... all other simple web services work fine in my system but i am getting following errors
<b>javax.xml.rpc.soap.SOAPFaultException: com/sap/mw/jco/JCO
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.buildFaultException(MimeHttpBinding.java:651)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.processDocumentFault(MimeHttpBinding.java:742)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1240)
at proxy.ConfigBindingStub.setEclipseData(ConfigBindingStub.java:80)
at proxy.ConfigBindingStub.setEclipseData(ConfigBindingStub.java:96)
at com.carrier.isa.Client.main(Client.java:29)</b>
when i put a simple code like
<b>JCO.Client aConnection=null;
IRepository aRepository=null;
try {
System.out.println("Creating a client");
aConnection=JCO.createClient(
SAP_CLIENT,
USER_ID,
PASSWORD,
LANGUAGE,
HOST_NAME,
SYSTEM_NUMBER);</b> System.out.println(aConnection.toString());
ArrayList array=new ArrayList();
array.add("Tarun");
array.add("Abhay");
array.add("Sujit");
array.add("Sandy");
array.add("Sachin");
returnStr=array.get(2).toString()"--"test;
}
catch(Exception e)
{
e.printStackTrace();
}
return returnStr;
}
the code above is just a snippet of the whole .
I have sapjco.jar in project properties in NWDS or eclipse but this jar is missing when
i build an EAR in the Web services perspective..
Can the missing of this jar in the
project EAR be the cause of problem ...
if yes let me know where should i add it ...
Also, I created a simple java project so i
am not having any WEB-INF folder ...
do i need to create a web project instead ..
Please help me as you did earlier ..
I would be highly obliged ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to put the required jar files into the WEB-INF/lib directory of your war file, for run time execution.
regards,
Sujesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tarun,
try to add <NWDS_INSTALL_FOLDER>/SAP/JDT/eclipse/plugins/com.sap.tc.ap/comp/SAP-JEE/DCs/sap.com/com.sap.guid/_comp/gen/default/public/default/lib/java/guidgenerator.jar to class path of your standalone proxy.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.