axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Egholm Nielsen <mar...@egholm-nielsen.dk>
Subject Method without parameter generates faulty client in .NET
Date Tue, 08 Feb 2005 09:35:26 GMT
Hi there,

I'm generating a wsdl with Axis 1.2rc2 (with parameters --style DOCUMENT 
--use LITERAL) for a simple interface with a method with no parameters:

package somepackage;
public interface EmptyArgInterface
{
   public int getSomething();
}

Then I import the wsdl as a new webreference in .NET, and that works 
without warnings.
However, when I invoke the method #getSomething() the generated SOAP doc 
contains no reference to the method:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body />
</soap:Envelope>

I tried with another client framework, as well, and the same empty body 
occured.
The wsdl is given below, and as can be seen, there is no <xsd:part /> 
for the message-element describing the request...

    <wsdl:message name="getSomethingRequest">
    </wsdl:message>

Does anybody has an idea of why this does not work (in either of the two 
independent clients)?
Maybe the wsdl should look different at that point?

Best regards,
  Martin Egholm

==== WSDL ====

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://somepackage" 
xmlns:impl="http://somepackage" xmlns:intf="http://somepackage" 
xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)-->
  <wsdl:types>
   <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://somepackage" elementFormDefault="qualified">
    <element name="getSomethingReturn" type="xsd:int"/>
   </schema>
  </wsdl:types>
    <wsdl:message name="getSomethingResponse">
       <wsdl:part name="getSomethingReturn" 
element="impl:getSomethingReturn"/>
   </wsdl:message>
    <wsdl:message name="getSomethingRequest">
    </wsdl:message>
    <wsdl:portType name="EmptyArgInterface">
       <wsdl:operation name="getSomething">
          <wsdl:input name="getSomethingRequest" 
message="impl:getSomethingRequest"/>
          <wsdl:output name="getSomethingResponse" 
message="impl:getSomethingResponse"/>
       </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="BlahSoapBinding" type="impl:EmptyArgInterface">
       <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="getSomething">
          <wsdlsoap:operation soapAction=""/>
          <wsdl:input name="getSomethingRequest">
             <wsdlsoap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="getSomethingResponse">
             <wsdlsoap:body use="literal"/>
          </wsdl:output>
       </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="EmptyArgInterfaceService">
       <wsdl:port name="Blah" binding="impl:BlahSoapBinding">
          <wsdlsoap:address location="http://localhost/Blah"/>
       </wsdl:port>
    </wsdl:service>
</wsdl:definitions>



Mime
View raw message