on 08-22-2011 2:43 PM
Hi,
i'm trying to use a web service (based on a business object) in a EJB. So i first copied the WSDL-Url at the bottom ([Screenshot #1|http://img812.imageshack.us/img812/4125/15826689.jpg]). On the second step i imported the WSDL in my EJB-Project ([Screenshot #2|http://img143.imageshack.us/img143/9310/85106464.jpg]). Tested the web service using the web service explorer and it works ([Screenshot 3|http://img841.imageshack.us/img841/3087/75396466.jpg]).Then i generate the web service client ([Screenshot #4|http://img847.imageshack.us/img847/7182/45773935.jpg]). Then i defined a field with the WebServiceRef annotation ([Screenshot #5|http://img202.imageshack.us/img202/8056/14298644.jpg]).
But on running this code i get a nullpointer exception:
Using following line: "service.getNoAuthOverHTTP_1().create();"
http://pastebin.com/raw.php?i=yPz5N6Ew
As second idea i instantiated it directly:
Using following line: "new D253CustomerPROFILENOAUTHService();"
http://pastebin.com/raw.php?i=Xz4siGz1
I dont get my service injected there and i dont know why - its always null. Maybe someone can help me with this?
(I posted the logs on pastebin because they contain bbcodes...)
Best Regards
Michael
The problem was that i was accessing the ejb (which is holding the webservice as a field) from a web project (jsp) over an dependency. If i called the specific method of the ejb (using the ejb explorer) directly it works fine.
In another thread with the same problem () the "solution" was to lookup the ejb - which is working for me too.
Isn't there any nicer solution to this problem as lookup the ejb? Why isn't it possible to set a dependency to an ejb-project and to use a bean which holds the webservice?!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.