on 06-29-2011 12:46 AM
Hi All,
I have created a WSDL for a ECC FM.
Created a Deployable WebService Project using the WSDL. It gives a EAR and a JAR file.
Deployed the EAR generated to the server.
Then I have created a J2EE Web module
Added the JAR from the Webservice Project
and below code to call the web service
Name of the webservice proxy is getperner
//Call the webservice
InitialContext ctx = new InitialContext();
ZgetpernerService fetch_perner =
(ZgetpernerService) ctx.lookup(
"java:comp/env/sap.com.getperner");
Zgetperner port =
(Zgetperner) fetch_perner.getLogicalPort(
"ZgetPerner_Bind",
Zgetperner.class);
Usr01DohrGetemployeeResponse res = port.usr01DohrGetemployee(input);
strPerner = res.getEmployeenumber();
When I run the application it gives the below error:
com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:comp, the whole lookup name is java:comp/env/sap.com.getperner.
I have added the Web J2EE module into an EAR project.
I have followed the approach given in below article:
[Deployable Webservice Usage in NetWeaver|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e19a?QuickLink=index&overridelayout=true]
Need help in resolving the issue.
Regards,
Sumit
Hi,
When you use "java:comp/env " you are referencing your code to an entry in web-j2ee-engine.xml file.
Do you have the correct entry in the file? (this is page 13 in the guide).
Can you publish your web-j2ee-engine.xml ?
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
JNDI Name usually, 'vendornmae/earproject/ejbbean ',
vendor name - if you create your project locally, it will be usually sap.com, if you are using NWDI, it will start with your company name.
If you have the access for visual admin you can check the correct JNDI name and specify that JNDI name during the lookup
Go to visual admin> cluster>services-->JNDI Service.
For more reference you can check this links:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c
Hope this helps you.
Regards,
Saleem Mohammad.
Edited by: Jason Lax on Dec 28, 2011 2:38 PM (Fixed broken link)
Hi Omri,
Below is my Web-j2ee-engine-xml:
<web-j2ee-engine>
<server-component-ref>
<description>
</description>
<name>perner_proxy</name>
<type>interface</type>
<jndi-name>/wsclients/proxies/sap.com/zrfcproxy/sap.com.getperner</jndi-name>
</server-component-ref>
</web-j2ee-engine>
I am using below code for lookup:
InitialContext ctx = new InitialContext();
ZgetpernerService fetch_perner =
(ZgetpernerService) ctx.lookup(
"java:comp/env/zrfcproxy/sap.com.getperner");
This does not work and give the same exception meintion in my post.
Please suggest.
Regards,
Sumit
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.