File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes No such method error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "No such method error" Watch "No such method error" New topic
Author

No such method error

Rizwan Patel
Ranch Hand

Joined: Jan 03, 2008
Posts: 59

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)


scjp 1.5, OCPJWSD 5
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5


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

Joined: Jan 03, 2008
Posts: 59

I am using the java1.5 version.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No such method error