You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by bu...@apache.org on 2003/12/29 16:25:58 UTC

DO NOT REPLY [Bug 25799] New: - WSIFException trying to match WSDL method to class method using java binding

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25799>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25799

WSIFException trying to match WSDL method to class method using java binding

           Summary: WSIFException trying to match WSDL method to class
                    method using java binding
           Product: Axis-WSIF
           Version: 2.0
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Basic Architecture
        AssignedTo: wsif-dev@ws.apache.org
        ReportedBy: jeremy.clarke@alphatech.com


Creating a webservice that will currently use java binding on a local server.  
You can see the WSDL attached at the bottom:

The Java service provides an interface with a single method:

public interface ClusterService extends java.rmi.Remote { 
    public com.alphatech.m2cs.ontology.AgentType clusterActions
(com.alphatech.m2cs.ontology.AgentType agent)throws java.rmi.RemoteException;
}

AgentType is a type we have created in a seperate .xsd file.  

When we run a test to access the method using WSIF the following WSIFException 
is thrown:

org.apache.wsif.WSIFException: Method clusterActions(interface 
com.alphatech.m2cs.ontology.AgentType) was not found in portType 
{http://webservices.clusterservice.geoclusterservice.test/}ClusterService

We managed to find a solution to the Exception in WSIFClientProxy.java.  In the 
method findMatchingOperation in the following code block:
=======
 else if (types[argIndex].equals(DataHandler.class))
                        // There is no (simple or complex) type mapping for 
                        // this argument. If it's a DataHandler, then assume
                        // it's a mime type, since we do automatic registering
                        // of DataHandlers for Mime types. We should really look
                        // in the WSDL binding to make sure it is a mime part.
                        //
                    foundThisArg = true;
=======

If you set this variable to false the Exception is not thrown and the program 
works correctly.  We believe the class type is not being compared correctly.  

One thing that might cause the error is the fact that when we access the method 
we pass a Factory instance of AgentType (AgentImpl) to the method 
clusterActions.  

Please email me for more detail if needed.

Jeremy



WSDL FILE
---------------------------
<?xml version="1.0"?>
<definitions 
targetNamespace="http://webservices.clusterservice.geoclusterservice.test/" 
xmlns:tns="http://webservices.clusterservice.geoclusterservice.test/" 
xmlns:ontology="http://alphatech.com/m2cs/ontology" 
xmlns:xsd="http://www.w3.org/1999/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/" 
xmlns:java="http://schemas.xmlsoap.org/wsdl/java/" 
xmlns="http://schemas.xmlsoap.org/wsdl/">
	<!-- type defs -->

	<types>
			
		 <xsd:schema 
			 
targetNamespace="http://webservices.clusterservice.geoclusterservice.test/"
			xmlns:ontology="http://alphatech.com/m2cs/ontology">
	     	 
	       	<xsd:import namespace="http://alphatech.com/m2cs/ontology"
	         
	schemaLocation="file://D:/project/webservices_DACC_devel/BMC3_PCT_MAIN/o
ntology/source/xml/entities-and-plans.xsd"/>
	      </xsd:schema>
	   
	</types> 

	<!-- message declns -->
	<message name="ClusterActionsRequestMessage">
		<part name="inAgent" type="ontology:AgentType" />
	</message>
	<message name="ClusterActionsResponseMessage">
		<part name="outAgent" type="ontology:AgentType" />
	</message>
	<!-- port type declns -->
	<portType name="ClusterService">
		<operation name="clusterActions">
			<input name="ClusterActionsRequest" 
message="tns:ClusterActionsRequestMessage"/>
			<output name="ClusterActionsResponse" 
message="tns:ClusterActionsResponseMessage"/>
		</operation>
	</portType>
	<!-- binding declns -->
	<binding name="JavaBinding" type="tns:ClusterService">
		<java:binding/>
		<format:typeMapping encoding="Java" style="Java">
			<format:typeMap typeName="ontology:AgentType" 
formatType="com.alphatech.m2cs.ontology.AgentType" />
		</format:typeMapping>
		<operation name="clusterActions">
			<java:operation methodName="clusterActions" 
parameterOrder="inAgent" methodType="instance" returnPart="outAgent"/>
			<input name="ClusterActionsRequest"/>
			<output name="ClusterActionsResponse"/>
		</operation>
	</binding>
	<!-- service decln -->
	<service name="GeoClusterService">
		<port name="JavaPort" binding="tns:JavaBinding">
			<java:address 
className="com.alphatech.m2cs.webservices.clusterservice.geoclusterservice.GeoCl
usterService"/>
		</port>
	</service>
</definitions>