I receive the following error when trying to view the the wsdll file. I
thought that signature rule is being followed correctly. can any one point
out what Is wrong with the code?
Thanks,
Aria
-AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - org.apache.axis.InternalException: java.lang.Exception: Method
'publishCatalog' 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
'publishCatalog' does not match any of the valid signatures for
message-style service methods
faultActor: null
faultNode: null
faultDetail:
stackTrace: org.apache.axis.InternalException: java.lang.Exception:
Method 'publishCatalog' does not match any of the valid signatures for
message-style service methods
at
org.apache.axis.description.ServiceDesc.checkMessageMethod(ServiceDesc.java:
726)
at
org.apache.axis.description.ServiceDesc.createOperationForMethod(ServiceDesc
.java:1058
here is the code:
package clientaxis.Battle.message;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import java.util.Vector;
import java.util.Date;
import java.text.SimpleDateFormat;
import org.apache.axis.MessageContext ;
import org.apache.axis.utils.XMLUtils;
import org.apache.axis.message.SOAPBodyElement;
import java.io.*;
public class CatalogPublisherService {
public Element[] publishCatalog(MessageContext context,
Vector soapBodyElements) throws Exception {
Element soapBody = (Element) soapBodyElements.get(0);
NodeList productList = soapBody.getElementsByTagName("PRODUCT");
//Get the count of <PRODUCT> elements in the NodeList
int productCount = productList.getLength();
//Call back-end code
//Start Building Response Document
//Get a DocumentBuilder objec
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
//Start creating the Response
//Creat a new DOM Document
Document responseDoc = builder.newDocument();
//Create the namespace aware root Element <CATALOGUPDATE>
Element resRoot = responseDoc.createElementNS("http://
www.wrox.com/axis/catalogupdate","CATALOGUPDATE");
resRoot.setPrefix("CU");
//Create the ITEMCOUNT element
Element itemCount = responseDoc.createElement("ITEMCOUNT");
Text itemCountText = responseDoc.createTextNode(String.valueOf
(productCount));
//Create the DATE RECEIVED element
Element dateReceived = responseDoc.createElement("DATERECEIVED");
SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yyyy");
String date = fmt.format(new Date());
Text dateReceivedText = responseDoc.createTextNode(date);
//Append the child elements appropriately
resRoot.appendChild(itemCount);
itemCount.appendChild(itemCountText);
resRoot.appendChild(dateReceived);
dateReceived.appendChild(dateReceivedText);
Element[] result = new Element[1];
result[0] = resRoot;
return(result);
}
}