on 07-17-2006 7:09 PM
I have created a simple web service which
has JCO code in it...I deployed this web
service using NWDS web services perspective..
I created a client to call this web
service method which has JCO code in it ...
but it throws the exception as follows
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 proxy2.ConfigBindingStub.setCustomerMasterRFC(ConfigBindingStub.java:80)
at proxy2.ConfigBindingStub.setCustomerMasterRFC(ConfigBindingStub.java:111)
at proxy2.TestDealerClient.main(TestDealerClient.java:26)
This code works fine if i run it as a standalone java class by adding a main method...
Please let me know the solution asap...i
have a critical requirement for my client..
Thanks in advance..
I have send you some screenprints of
debug screens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am sending you the log file in an
attached zip ... please check and let me know your response
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I the catch block i had e.printstacktrace() thats it...
How can i view the logs of this web service where can i find it ... Even Breakpoint does not help here ..
It also throws same message...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tarun,
1) log you can find somwhere here C:\usr\sap\J2E\JC00\j2ee\cluster\server0\log\defaultTrace.trc (my local WAS installation)
2) what do you mean "Even Breakpoint does not help here .. "? You can set breakpoint on e.printStacktrace() and when execution flow will reach this breakpoint you can select varialbe "e" in "Variables" view and see all details. At least what kind of error do you have.
Best regards, Maksim Rashchynski.
Hi Maksim
Well that error is gone maksim but it just
throws that message it belive , It still doen't
connects to the SAP from web service...
I can explain the steps i did to create
and deploy web service...
I created a simpple java project in NWDS with a
class EclipseService.java in it.
Added the sapjco.jar in the project properties
to avoid compilation error.
Switch to web services perspective and
created a web service with the endpoint as the EclipseService class and exposing the method setEclipseData.
Build an EAR using the mouse click option in
WS persptve
Deployed EAR onto J2EE engine from same menu.
Obviously this EAR doe not have sapjco.jar in it.
After deploying my web service comes into the folowing folder with the directory structure as shown below
C:\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\EclipseService
So -- EclipseService
|_ servlet_jsp
|_EclipseService\Config\root\web-inf\
" " work
|_ webservices_container
( descriptors)
jars
wsdl
For your better understanding I have
send you the screenprints to your email address..
Please let me know if i am missing any
jar or anything has to be added there ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim
This is the code it cannot be simpler than this
import java.util.ArrayList;
import java.util.Properties;
import com.sap.mw.jco.IRepository;
import com.sap.mw.jco.JCO;
public class EclipseService {
public String setEclipseData(String test){
String returnStr="Default";
String SAP_CLIENT = "130";
String USER_ID = "username";
String PASSWORD = "password";
String LANGUAGE = "EN";
String HOST_NAME = "161.145.174.12";
String SYSTEM_NUMBER = "00";
JCO.Client aConnection=null;
IRepository aRepository=null;
try {
returnStr="Creating a client";
aConnection=JCO.createClient( SAP_CLIENT, USER_ID, PASSWORD, LANGUAGE, HOST_NAME, SYSTEM_NUMBER);
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;
}
}
Now if i comment the JCO code it works fine
and otherwise it throws that SOAP fault
exception...
Environment that i am using is
NWDS or Eclipse
SDM
SAP J2EE Engine Version 6.4
Pleaaaaaaaaaase help me out ....
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I tried by putting all the JAR files
mentioned in the above post but it didn't work .
still it is throwing the same exception.
I added them in the project proreties folder.
I opened the EAR file which gets generated from
NWDS..it doesn't conatin those jars...
Now this EAR is the one that is deployed on
SAP J2EE Engine and from where it will pick
those jar files when it is deployed in the SAP
J2EE engine...
Has anyone encountered such problem anytime...
Please Please help me out !!!
I will give him full points who can resolve
this issue....
Or let me know some alternative
I repeat the requirement :-
I have to create a JAVA webservice which
should have JCO code in it , the role of this
JCO code will be to pass some data to SAP RFCs
Let me know pleaseeeeeeeeee !!!!
the
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did what you told me to do but it still
gives the same message ... please help me out
the requirement is so simple here only problem
is with some library or jar that has to be included there's nothing wrong in my code..only
packaging the code approprately is what is
required here
please help !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check whether you have added the following jars in the application's build path:
jaxrpc-api.jar
tc_sec_compat.jar
tc_sec_destinations_interface.jar
tc_sec_destinations_service.jar
tc_sec_https.jar,tc_sec_jaas.jar
tc_sec_saml_util.jar
tc_sec_ssf.jar
tc_sec_userstore_lib.jar
webservices_api.jar
webservices_lib.jar
sapxmltoolkit.jar
If not, add them first. Then also do the following:
Right click Project->Properties->Web Dynpro References
1. add tcsecdestinations~interface in the Interface Reference
2. add tcsecdestinations~service in the Service Reference
Hope this will work out.
Regards,
Srinivasan T
<b>Helpful answer=>points</b>
Hi Tarun,
Call getCause() for caught exception and analyse com.sap.mw.jco.JCO.Exception. You will get information what`s wrong with JCo call.
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 |
---|---|
87 | |
10 | |
10 | |
10 | |
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.