• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set endpoint url by Reflection

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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



 
Ranch Hand
Posts: 270
15
Android Angular Framework Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic