Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set endpoint url to portproxy class by java Reflection

S Varre
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have more than 50 web services, web service clients provides data from out back end systems to front-end applications, 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. I am try utilize java reflection to initialize and set endpoint url to portproxy, then application will use available proxy object to get data from back end systems. Can you find where i am doing wrong here

Portproxy class ( WDSL file generated by JAX-RPC and client is generated by JAX-WS)

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

In above code Option 1 is working fine. But Option 2 is failing, it is not giving endpoint url. Can you please guide me where i am doing wrong.

S Varre.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic