axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Munz" <mm...@apelon.com>
Subject Service Naming: removing implementation class name from WSDL
Date Mon, 02 Feb 2004 22:12:27 GMT
Hi all,

  How can I make sure that the name of my web service implementation class does not get into
the WSDL?[1]  Consider the following case.

  I have a class named SampleBean[2] that I want to be the implementation class for my web
service, named BeanMessage.[3]  Why do I see "SampleBean" in the WSDL?[4]  When I generate
Java client proxies, they also expose the implementation class name to the user.[5]

  My desire is that only "BeanMessage" will be used for the naming of all the elements (WSDL,
client proxies, etc.) that are currently named "SampleBean".  Not only is this simpler, but
it hides an implementation detail (the name of the service class) from the client, allowing
me the flexibility to change service classes later without regenerating client proxies.

  I imagine this is a common problem.  Any suggestions?

[1] custom WSDL generation is not preferred ;)
[2] 
public class SampleBean
{
  public SampleBean(){}
  
  public String getMessage() 
  {
      return "Hello World."; 
  }
}
[3]
<service name="BeanMessage" provider="java:RPC">
  <parameter name="className" 
    value="com.apelon.webservice.test.SampleBean" />
    <parameter name="allowedMethods" value="*" />    
</service>
[4]
<wsdl:portType name="SampleBean">
  <wsdl:operation name="getMessage">
    <wsdl:input message="impl:getMessageRequest" name="getMessageRequest"/>
    <wsdl:output message="impl:getMessageResponse" name="getMessageResponse"/>
  </wsdl:operation>
</wsdl:portType>
[5]
BeanMessage/
  BeanMessageSoapBindingStub.java
  SampleBean.java
  SampleBeanService.java
  SampleBeanServiceLocator.java

  - Matt


Mime
View raw message