*
The moose likes Web Services and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark ""rpc" not supported even though actually calling document style webservice." Watch ""rpc" not supported even though actually calling document style webservice." New topic
Author

"rpc" not supported even though actually calling document style webservice.

Sandesh Jadhav
Greenhorn

Joined: Nov 01, 2008
Posts: 14
Hi,

I created a simple 'document/literal' style webservice in Eclipse for addition of two numbers. And now m trying to create a simple java client which would call webservice. When I try to run the client it says "rpc" not supported even though m calling the document style web service. I know RPC/encoded style is not WS-I complient.

Here is an exception
Exception in thread "main" operation style: "rpc" not supported
at com.sun.xml.rpc.client.dii.BasicCall.unsupportedOperationStyleException(BasicCall.java:583)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:515)



here is my wsdl file,

AddNumbers.wsdl



<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://DefaultNamespace" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://DefaultNamespace" xmlns:intf="http://DefaultNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)

-->
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="a" type="xsd:int" />
<element name="b" type="xsd:int" />
<element name="addReturn" type="xsd:int" />
</schema>
</wsdl:types>
- <wsdl:message name="addRequest">
<wsdl:part element="impl:a" name="a" />
<wsdl:part element="impl:b" name="b" />
</wsdl:message>
- <wsdl:message name="addResponse">
<wsdl:part element="impl:addReturn" name="addReturn" />
</wsdl:message>
- <wsdl:portType name="AddNumbers">
- <wsdlperation name="add" parameterOrder="a b">
<wsdl:input message="impl:addRequest" name="addRequest" />
<wsdlutput message="impl:addResponse" name="addResponse" />
</wsdlperation>
</wsdl:portType>
- <wsdl:binding name="AddNumbersSoapBinding" type="impl:AddNumbers">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdlperation name="add">
<wsdlsoapperation soapAction="" />
- <wsdl:input name="addRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
- <wsdlutput name="addResponse">
<wsdlsoap:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
- <wsdl:service name="AddNumbersService">
- <wsdl:port binding="impl:AddNumbersSoapBinding" name="AddNumbers">
<wsdlsoap:address location="http://node112:7081/WebServicesTest/services/AddNumbers" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>




Am I missing something here?

Appreciate your help...

Sandesh



 
jQuery in Action, 2nd edition
 
subject: "rpc" not supported even though actually calling document style webservice.
 
Similar Threads
how to call web services.
WSDL2Java Question
The AXIS engine could not find a target service to invoke
DataHandler error in WSDL
Use the simpliest web server ever