• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis Fault

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had compiled a portfolio web service. It is also deployed.But when i tried to test that service then the following error is coming:
Fault - ; nested exception is:
org.apache.axis.InternalException: java.lang.Exception: Method 'portfolio' does not match any of the valid signatures for message-style service methods
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.InternalException: java.lang.Exception: Method 'portfolio' does not match any of the valid signatures for message-style service methods
faultActor:
faultNode:
faultDetail:
can anybody could tell me that how can i correct this problem.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's your method signature like? Have you tried all four signatures (Axis claims to support four different type of document-style method signatures)?
 
shelly sharma
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had used the message signature as follows in the portfolio.java file:
public static Element[] portfolio(Vector xmlDocument) throws Exception
{
Document requestMessage =
((Element)xmlDocument.get(0)).getOwnerDocument();
Document responseMessage = (Document)requestMessage.cloneNode(true);
Element[] result = new Element[1];
result[0] = portfolio(requestMessage.getDocumentElement(),
responseMessage.getDocumentElement());
return result;
}
Is there any mistake in the syntax of the message signature.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the Axis User Guide:

There are four valid signatures for your message-style service methods:
public Element[] method(Element[] bodies);
public SOAPBodyElement[] method (SOAPBodyElement[] bodies);
public Document method(Document body);
public void method(SOAPEnvelope req, SOAPEnvelope resp);
The first two will pass your method arrays of either DOM Elements or SOAPBodyElements - the arrays will contain one element for each XML element inside the <soap:body> in the envelope.
The third signature will pass you a DOM Document representing the <soap:body>, and expects the same in return.
The fourth signature passes you two SOAPEnvelope objects representing the request and response messages. This is the signature to use if you need to look at or modify headers in your service method. Whatever you put into the response envelope will automatically be sent back to the caller when you return. Note that the response envelope may already contain headers which have been inserted by other Handlers.

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is late, but the fix for this problem is as follows:

public static Element[] portfolio(Element[] xmlDocument) throws Exception
{
//Document requestMessage =
((Element)xmlDocument.get(0)).getOwnerDocument();
Document requestMessage = xmlDocument[0].getOwnerDocument();
Document responseMessage = (Document)requestMessage.cloneNode(true);
...

}
reply
    Bookmark Topic Watch Topic
  • New Topic