Title: Bug in beta 2 JWS (exposing private methods)

I've noticed a change between beta 1 and beta 2 in the way jws files work:

- In beta 1, only public, non-static methods were exported to the wsdl.
- In beta 2, *all* methods are exported to the wsdl, even private methods.

This is a repost of a question I posted last week. This time I'll add an example. :-)

For example, if I add the following method to StockQuoteService.jws:

  private float getPrivateQuote(String symbol) throws Exception
  {
        return getQuote(symbol);
  }

Then my WSDL looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/StockQuoteService.jws" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="http://localhost:8080/axis/StockQuoteService.jws-impl" xmlns:intf="http://localhost:8080/axis/StockQuoteService.jws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <wsdl:message name="getQuoteResponse">
    <wsdl:part name="return" type="xsd:float"/>
  </wsdl:message>
  <wsdl:message name="getQuoteRequest">
    <wsdl:part name="symbol" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="getPrivateQuoteResponse">
    <wsdl:part name="return" type="xsd:float"/>
  </wsdl:message>
  <wsdl:message name="Exception">
  </wsdl:message>
  <wsdl:message name="getPrivateQuoteRequest">
    <wsdl:part name="symbol" type="xsd:string"/>
  </wsdl:message>
  <wsdl:portType name="StockQuoteService">
    <wsdl:operation name="getPrivateQuote" parameterOrder="symbol">
      <wsdl:input message="intf:getPrivateQuoteRequest"/>
      <wsdl:output message="intf:getPrivateQuoteResponse"/>
      <wsdl:fault message="intf:Exception" name="Exception"/>
    </wsdl:operation>
    <wsdl:operation name="getQuote" parameterOrder="symbol">
      <wsdl:input message="intf:getQuoteRequest"/>
      <wsdl:output message="intf:getQuoteResponse"/>
      <wsdl:fault message="intf:Exception" name="Exception"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="StockQuoteServiceSoapBinding" type="intf:StockQuoteService">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getPrivateQuote">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input>
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="getPrivateQuote" use="encoded"/>

      </wsdl:input>
      <wsdl:output>
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/StockQuoteService.jws" use="encoded"/>

      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getQuote">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input>
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="getQuote" use="encoded"/>
      </wsdl:input>
      <wsdl:output>
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/StockQuoteService.jws" use="encoded"/>

      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="StockQuoteServiceService">
    <wsdl:port binding="intf:StockQuoteServiceSoapBinding" name="StockQuoteService">
      <wsdlsoap:address location="http://localhost:8080/axis/StockQuoteService.jws"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



Cheers,

      Chris

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Chris Knauft
Principal Software Architect
LION bioscience
9880 Campus Point Dr.
San Diego, CA 92121

Office: 858-410-6536
Fax: 858-410-6641


Reply via email to