You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anne Thomas Manes <an...@manes.net> on 2004/06/24 14:01:43 UTC

RE: Wsdd Operation question

None of the Web services specifications (SOAP, WSDL, WS-I) discuss this
area. It falls to the SOAP engine to map a WSDL <operation> to a specific
method. I would expect, though, that you could map different operations to
the same method.
 
I'm not an expert on the WSDD, but looking at the WSDD reference
(http://www.osmoticweb.com/axis-wsdd/), I don't see a way to specify a
method name, so I'm assuming that the WSDD operation @name attribute maps to
the method name. If that's the case, then I'd say that Axis does not support
mapping of multiple operations to the same method.
 
The WS-I Basic Profile disallows overloaded WSDL operations. I suggest that
it's a best practice to also not use overloaded Java methods.
 
But I agree with you that this is a shortcoming of the product. I recommend
adding another attribute in the WSDD operation element that allows you to
specify a method name. (The value of the method attribute should default to
the value of the name attribute.) I suggest you submit an enhancement
request.
 
Anne
 
 
  _____  

From: Leena Janardanan [mailto:ljanardanan@blackpearl.com] 
Sent: Wednesday, June 23, 2004 5:31 PM
To: axis-user@ws.apache.org
Subject: Wsdd Operation question
 
All, 
        I have a question regarding the <operation> tag in the wsdd, and
well, probably an Axis limitation. 
        Is it possible to have two WSDL operations, say,   getBooks() and
getAuthors() map to the same Java method, say execute() ? In other words,
when i receive SOAP requests for getBooks  or getAuthors, i want the same
execute() method on my impl class called. Is this possible in Axis (1.2) ?
I have done this in weblogic.
        As far as i know, this implies that there will be two operation tags
in the wsdd that look like this: 
  <operation name="execute" qname="ns1:getBooks" returnQName="xsd:string"
returnType="xsd:string" xmlns:ns1="namespace here"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
  <operation name="execute" qname="ns1:getAuthors" returnQName="xsd:string"
returnType="xsd:string" xmlns:ns1="namespace here"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
        and this isnt valid.  Is there ANY way to do what i want to do ? 
        I have been able to get ONE such operation to work, but when i put
both in the WSDD, i get this error from Axis :
 faultString: org.apache.axis.InternalException: java.lang.Exception: The
OperationDesc for invoke1 was not synchronized to a method of
service.ServiceImpl
        
        This is really urgent, so any help at all is appreciated. 
                Thanks in advance, 
                        Leena.