Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

set endpoint url by Reflection

 
S Varre
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to set endpoint using java reflection, see here is my PortProxy class looks




I am trying like below but its not working, please correct me right way



 
L Foster
Ranch Hand
Posts: 209
11
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give a more explicit, detailed message than "not working". Are you getting null response? Are you getting an exception? etc.
 
S Varre
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Foster, Appreciated your quick response. I am trying to set endpoint url to the proxy using java reflection, do you have any idea how to set enpoint url by using java reflection for given class.
See my code below - Reflection way, endpoint is not setting


 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a particular reason you're trying to use reflection for this task, instead of just instantiating an object of a known class and calling its setEndpoint method?
 
S Varre
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have more web service clients providers data from out back end systems, Front end applications will be consuming those web service by setting endpoints dynamically by calling common utility method by passing portproxy class & endpoint url which return portproxy object with endpoint. shown below



and

common utilty method is like below



Above common method is not giving right portproxy with endpoint.

If any one knows about java reflect for above case please guide me, much appreciated.

Thanks.
S Varre.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!