Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does any one know how to make use of the web service control in a plain java class?  RSS feed

 
gupta prakash
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the BEA Weblogic Server9.2 version. I need to invoke a service using the WebService control from a plain java class. But I am not able to initiate the control and getting the null pointer exception. Why does the control is not getting initialized? please tell me how to initiate the service control.
 
Pawel Nowacki
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "service control"?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BEA WorkShop 9.2: Service Control

"Controls" are a vendor dependent way that BEA uses to abstract away any configuration details. So the web service control is a wrapper that encapsulates the usual ServiceLocator (Service) object creation and Port acquisition that is necessary before the WebMethod invocation. Ultimately the web service control is still the web service proxy that the client uses to access the web service. The use of the @Control annotation also suggests that the control object instance is "injected" by the run-time environment.

This "convenience" comes at a cost - you better know how the environment creates and "configures" these controls when there is a problem.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gupta prakash wrote:Why does the control is not getting initialized?


I presume that you didn't forget the @Control annotation to initiate injection of the service control?


The @Control annotation also means that the class has to run in a "container environment" that is capable of performing the control injection.

It is always important to Tell The Details.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!