on 01-09-2007 8:46 AM
After getting useful pointers to deployment issues for the web service deployable proxy () here, I am now having a different issue with the deployed proxy.
1. I have non DC versions of the Web service deployable proxy and the client EJB code for which the lookup code from the EJB client code works absolutely fine.
Ref section <b>Implement the session bean</b> on page 40 of the PDF <b>Providing and Consuming Web Services</b>on this URL : https://www.sdn.sap.com/irj/go/km/docs/library/nw/netweaverdevelopersguide2004s/sap%20netweaver%20developer's%20Guide%202004s/UsingJava_00_PDFsList.ca
2. For the dc version of the two i.e. Deployable proxy and the Client EJB , my code
fails giving a class cast exception at the statement
CreditLimitCheck obj = (CreditLimitCheck)
ctx.lookup("java:comp/env/CreditLimitCheckProxy");
the JNDI registry of the server shows following
wsclients [Context]
proxies [Context]
<VENDOR_NAME> [Context]
<DEPLOYABLE PROXY APPLICATION NAME> [Context]
+ <FULLY QULIFIED CLASS NAME OF THE WS PROXY>
+ [Class Name] : <FULLY QULIFIED CLASS NAME OF THE WS PROXY><b>Impl</b>
Note the Class name is appended with Impl which is not a class available at compile time.
I can see the DC & NON DC version of deployable proxy having the same kind of JNDI registry entries , only difference being the Vendor name getting changed from <b>sap.com</b> to the one for my SWC setup.
The question here being, same code in NON DC setup works fine , but the same put inside DC gives me a class cast exception. Has anybody faced similar situation with deployable proxy DCs?
Rgds,
Amol
Hi Amol,
This can be done in DC projects also i believe. Just go to ejb-j2ee-engine.xml of the client ejb and add jndi mapping with the following values:
Application Local JNDI name - CreditLimitProxy
Server Component Type - Interface
Server Component JNDI Name - /wsclients/proxies/sap.com/CreditLimitCheckProxy/com.sap.demo.proxy.CreditLimitCheckProxy
Please try out and let us know
Regards
Sidharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sidharth,
A quick question ...
The description for server Component Type in the referenced PDF is
<b>Server component type Choose the type of the reference. The types can be
service or interface depending on the component type that is referenced.</b>
My current value for Server component Type in the DC project is <b>Service</b>. I wonder if this could be the reason of ClassCastException..Will try and let you know.
Regards,
Amol
I had the same problem and found the issue. This post is to help anyone else that runs across it.
If you get to this point you probably did the following:
Set up a deployable proxy DC.
Added all the entries to the various xml files.
Had a problem with deployment of the ear due to the reference type being set to 'hard'.
Changed the reference type to 'weak' to get the deployment to work.
The Reference type really needs to be set to 'hard'.
The issue is that the Reference target name needs to be set to the deployable proxy name. For example, if the proxy DC is named 'testprxy' then the Reference target needs to have this name. If you are using NWDI tracks (not a local DC), then the name will include the SC name (ex. abc~testprxy where abc is the SC name).
Also, the provider name should be the same as the vendor name used for the DC.
If the proxy DC full path name is: com.myco.abc.proxies.TestProxy -
Summary of names and paths to use for the various entries:
In ejb-j2ee-engine.xml - Server component JNDI name
/wsclients/proxies/myco.com/abc~testprxy/com.myco.abc.proxies.TestProxy
In application-j2ee-engine.xml - Reference target
abc~testprxy (or just testprxy if it is a local DC)
Use any name for the Application local JNDI name in the ejb-j2ee-engine.xml. But this is the only place in the xml files where this name is used.
If you use MyTestProxy as the Application local JNDI name, then the reference in code for the context lookup would be 'java:comp/env/MyTestProxy'.
Just remember local DCs don't have an SC name to include (which was 'abc~' in the examples above).
When in doubt about the JNDI name (full path), use Visual Administrator to look at the JNDI registry (start at wsclients which is at the bottom of the list).
Hope this helps.
-Cindy
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.