axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agripel <pienar_ser...@yahoo.com>
Subject Multiple operations service
Date Mon, 28 Dec 2009 13:33:26 GMT

I have a wsdl that implements a number of operations (add, substract ,
multiply , etc) and i want to create clients for all the services.However i
can only make a call to the first operation of my service (add ) , and i`m
not able to call any of the other operations of my service.
This is how the wsdl looks like:

<wsdl:definitions name="T12" targetNamespace="http://www.example.org/T12/">
−
<wsdl:types>
−
<xsd:schema targetNamespace="http://www.example.org/T12/">
−
<xsd:element name="addRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
<xsd:element name="y" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="addResponse" type="xsd:int">

      </xsd:element>
−
<xsd:element name="substractRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
<xsd:element name="y" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="substractResponse" type="xsd:int">

      </xsd:element>
−
<xsd:element name="multiplyRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
<xsd:element name="y" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="multiplyResponse" type="xsd:int">

      </xsd:element>
−
<xsd:element name="divideRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
<xsd:element name="y" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="divideResponse" type="xsd:int">

      </xsd:element>
−
<xsd:element name="powRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
<xsd:element name="y" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="powResponse" type="xsd:int">

      </xsd:element>
−
<xsd:element name="sqrRequest">
−
<xsd:complexType>
−
<xsd:sequence>
<xsd:element name="x" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="sqrResponse" type="xsd:int">

      </xsd:element>
</xsd:schema>
</wsdl:types>
−
<wsdl:message name="addRequest">
<wsdl:part name="parameters" element="tns:addRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="divideResponse">
<wsdl:part name="parameters" element="tns:divideResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="powResponse">
<wsdl:part name="parameters" element="tns:powResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="sqrResponse">
<wsdl:part name="parameters" element="tns:sqrResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="substractRequest">
<wsdl:part name="parameters" element="tns:substractRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="addResponse">
<wsdl:part name="parameters" element="tns:addResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="multiplyRequest">
<wsdl:part name="parameters" element="tns:multiplyRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="multiplyResponse">
<wsdl:part name="parameters" element="tns:multiplyResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="substractResponse">
<wsdl:part name="parameters" element="tns:substractResponse">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="sqrRequest">
<wsdl:part name="parameters" element="tns:sqrRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="divideRequest">
<wsdl:part name="parameters" element="tns:divideRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:message name="powRequest">
<wsdl:part name="parameters" element="tns:powRequest">
    </wsdl:part>
</wsdl:message>
−
<wsdl:portType name="T12">
−
<wsdl:operation name="add">
<wsdl:input message="tns:addRequest">
    </wsdl:input>
<wsdl:output message="tns:addResponse">
    </wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="substract">
<wsdl:input message="tns:substractRequest">
    </wsdl:input>
<wsdl:output message="tns:substractResponse">
    </wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="multiply">
<wsdl:input message="tns:multiplyRequest">
    </wsdl:input>
<wsdl:output message="tns:multiplyResponse">
    </wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="divide">
<wsdl:input message="tns:divideRequest">
    </wsdl:input>
<wsdl:output message="tns:divideResponse">
    </wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="pow">
<wsdl:input message="tns:powRequest">
    </wsdl:input>
<wsdl:output message="tns:powResponse">
    </wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="sqr">
<wsdl:input message="tns:sqrRequest">
    </wsdl:input>
<wsdl:output message="tns:sqrResponse">
    </wsdl:output>
</wsdl:operation>
</wsdl:portType>
−
<wsdl:binding name="T12SOAP" type="tns:T12">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="add">
<soap:operation soapAction="http://www.example.org/T12/add"/>
−
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
−
<wsdl:service name="T12">
−
<wsdl:port name="T12SOAP" binding="tns:T12SOAP">
<soap:address location="http://192.168.10.102:8080/axis2/services/T12/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

And this is how i try to make a call to the other operations :
	public static void main(String[] args) throws RemoteException {
		// TODO Auto-generated method stub
		BasicConfigurator.configure();
		
		T12Stub service = new T12Stub("http://localhost:8080/axis2/services/T12");
		SubstractRequest request = new SubstractRequest();
		
        int x = 1;
		int y = 2;
		
		request.setX(x);
		request.setY(y);
		
		SubstractResponse response = service.substract(substractRequest0)
		System.out.println(response.getSubstractResponse());

	}
The problem is that 
-- 
View this message in context: http://old.nabble.com/Multiple-operations-service-tp26943084p26943084.html
Sent from the Axis - User mailing list archive at Nabble.com.


Mime
View raw message