0
ClassLoader cl = Thread.currentThread().getContextClassLoader();

JaxWsDynamicClientFactory dcf =JaxWsDynamicClientFactory.newInstance();
org.apache.cxf.endpoint.Client clientA = dcf.createClient(wsdlfile);
Thread.currentThread().setContextClassLoader(cl);
Object res=clientA.invoke("helloWorld",new Object[]{"Dog"});

It's giving me result like [Ljava.lang.Object;@1332b63
I didn't getting the original value, Its Apache CXF, so if anybody can help me for fetching the value from res in String representation.

reVerse
  • 35,075
  • 22
  • 89
  • 84

1 Answers1

0

The value you are getting is the object's value, based on the default toString() implementation.

A good recommendation for you is to override the toString() method. See this post for more information.

Or if you have any getters for the object, you could reach the desired values by doing myObject.getValueForSomething().

Community
  • 1
  • 1
mattias
  • 2,079
  • 3
  • 20
  • 27
  • I had used the toString() implementation techn. but its not affecting the code , I am getting the same result .... – Mind Dots Nov 15 '14 at 12:03
  • @MindDots: I don't really understand what you mean. Also I fail to find where you try to print out the values. Maybe you need to share more code. Do you have any getters on the object on which you are trying to print whatever it is you're trying to print out? – mattias Nov 15 '14 at 12:18
  • the res variable of Object kind giving me value like [Ljava.lang.Object;@190725e but i wanting the actual value not The hashCode representation of an Object... – Mind Dots Nov 15 '14 at 12:27
  • @MindDots: Edit your question and put everything you want/think we need there. – mattias Nov 15 '14 at 12:34