axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris" <chris.had...@cobia.net>
Subject RE: Service Naming: removing implementation class name from WSDL
Date Wed, 04 Feb 2004 16:34:14 GMT
Matt - 

You need to specify a custom WSDL port type in the WSDD.

For example,

<parameter name="wsdlPortType" value="MessagePortType"/>

<parameter name="wsdlTargetNamespace"
value="http://www.oreilly.com/axis/MessageService"/>

<parameter name="wsdlServiceElement" value="MessageService"/>

<parameter name="wsdlServicePort" value="MessagePort"/>

<parameter name="className"
value="com.oreilly.axis.ch04.server.message.MessageRPCSkeleton"/>

Axis will generate a service with a /definitions/service@name of
'MessageService' and a /definitions/service/port@name of 'MessagePort'
and a /definitions/portType@name of 'MessagePortType' even though the
implementation skeleton class is 'MessageRPCSkeleton'.   The actual
implementation class definition is hidden behind the skeleton.....


cheers,

/Chris
http://cvs.apache.org/~haddadc


-----Original Message-----
From: Matt Munz [mailto:mmunz@apelon.com] 
Sent: Wednesday, February 04, 2004 8:55 AM
To: axis-user@ws.apache.org
Subject: RE: Service Naming: removing implementation class name from
WSDL

Any ideas yet?  Perhaps the dev list is better suited to answer this
question?

  - Matt

-----Original Message-----
From: Matt Munz 
Sent: Monday, February 02, 2004 5:12 PM
To: axis-user@ws.apache.org
Subject: Service Naming: removing implementation class name from WSDL

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