I've generated a web service stub using wsdl2java on Axis2 1.5.6 and I'm creating the Stub and injecting it into my code in my Spring context.
I'd like to log the endpoint URL that the stub is using, but I can't seem to find a way to access it.
The closest I can find is:
stub._getServiceClient().getServiceContext().getTargetEPR().getAddress()
But that throws a null pointer exception.
I believe this will get you what you want.
stub._getServiceClient().getOptions().getTo().getAddress();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With