We have a .NET 1.1 web service which we're trying to use from Java using stubs generated by Axis 1.2 RC2 (with the WSDL2Java tool).
We are calling a method ('QueryExecute') on the web service which takes three parameters, one of which is used to return a value ('pRecordSet'). If an error occurs when executing the method, it returns a QueryExecuteResult; if the method worked as expected, a QueryExecuteResult will not be returned in the response. Here is the WSDL for the method and the response: <s:element name="QueryExecute"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="SessionID" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Query" type="tns:csDtoQueryItem" /> <s:element minOccurs="0" maxOccurs="1" name="pRecordSet" type="tns:csDtoRecordSet" /> </s:sequence> </s:complexType> </s:element> <s:element name="QueryExecuteResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="QueryExecuteResult" type="tns:csDtoQueryFeedBackList" /> <s:element minOccurs="0" maxOccurs="1" name="pRecordSet" type="tns:csDtoRecordSet" /> </s:sequence> </s:complexType> </s:element> When we call this method, we get the following error: Didn't find specified return QName {http://localhost/AgoraWS/Serducts}QueryExecuteResult! This is thrown from the following piece of code at line 2513 in Call: // If we were looking for a particular QName for the return and // still didn't find it, throw an exception if (findReturnParam) { String returnParamName = returnParamQName.toString(); throw new AxisFault(Messages.getMessage("noReturnParam", returnParamName)); } We have debugged Axis and what seems to be happening is that the OperationDesc object representing the method which is used in the Call has a ParameterDesc for the return which contains QueryExecuteResult; this causes a problem as when the Call searches for the return parameters, it cannot find QueryExecuteResult in the return parameters in the response - the pRecordSet return parameter is the only return parameter present. We can execute this method using a .NET-generated client and it works as expected, with no errors. Unfortunately, we don't have control over the web service, so have to work with what we're given! Does anyone have a clue why this doesn't work using the Axis stubs, or how to resolve it? It seems that Axis isn't taking into account the 'minOccurs="0"' for the QueryExecuteResult; is that the root of the problem? Many thanks for any insight! Alistair This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Please notify the sender by e-mail or telephone. We utilise an anti-virus system and therefore any files sent via e-mail will have been checked for known viruses. You are however advised to run your own virus check before opening any attachments received as we will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received. Any views expressed by an individual within this e-mail do not necessarily reflect the views of Systems Union Group plc or any of its subsidiary companies.