Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No such method error

 
Rizwan Patel
Ranch Hand
Posts: 59
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I request everyone to please, please help me out of this problem mentioning below.
Scenario :
I had Develop and deployed simple webservice consisting of two operations
1.Public void sayHelloBackOneWay(java.lang.String)
-It prints one line at server
2.Public String sayHi(java.lang.String)
-It prints one line at server
-return one string to the client.

I had also written the client side to invoke this method through stub.

Tools : eclips3.1,Axis2.1, jakarta-tomcat-5,

Problem :
The method 1(sayHelloBackOneWay) execute successfully as it did not return any value to client and also print the output at serverside.

The problem arises when i call the second method (sayHi) as it return one string to the client, but it prints the output on the server side.

Code :



Output log:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder: method <init>(Ljavax/xml/stream/XMLStreamReader V not found
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:53)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:160)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at hello.HelloImplStub.sayHi(HelloImplStub.java:196)
at hello.ClientVersion2.main(ClientVersion2.java:23)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If this was my problem I would be looking at the Apache StAXSOAPModelBuilder sourc code to see where that method call is used.

Note that the javax.xml.stream.XMLStreamReader class is new in Java 1.6, what version do you have installed?

Bill
 
Rizwan Patel
Ranch Hand
Posts: 59
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the java1.5 version.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tools : eclips3.1,Axis2.1, jakarta-tomcat-5,


I am assuming you mean Axis2 - the latest version is 1.4 - note that the original Axis project stopped significant development in 2006.

The Axis2 web pages say only that it requires Java 1.4 so I am mystified as to where the method signature in StAXSOAPModelBuilder specifying XMLStreamReader is coming from.

Bill
[ January 30, 2008: Message edited by: William Brogden ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic