Hi again,

I understand. The reason why is because I wanted to follow the same approach we are using for web applications, so we can leverage our knowledge and methodology. In our web apps, we define a single servlet controller that receives all requests and then, depending on the URL decides to call one or more classes to perform its job.
So it goes like that:
GetInfor.myapp is sent to the controller that checks the configuration:

<XMLOPERATION
  NAME="GetInfor"
  DESCRIPTION="..."
  CLASSNAME="org.leaf.XMLOperation"
  XSLT_SOURCE="xsl/app.xsl"
>
  <SOURCES GLOBAL_TAG="XML_APP">
    <SOURCE XML_SOURCE="plsql://DBPool/XML$MyPackage.MyProcedure"/>
    <SOURCE XML_SOURCE="xml/MyFile.xml"/>
  </SOURCES>
</XMLOPERATION>

and then calls a PLSQL procedure, gets the XML, joins that XML with the static file and finally converts this to HTML, WML or whatever using the specified XSL.

This works very nicely for us and we are able to re-use the "xml sources" in different operations, and changing the interface of the classes or PLSQL procedures does not affect the URL.

And that was more or less what I was looking for in Web Services. I understand I could create a general "dispatch" operation in a global class and then add an "action" parameter to specify the configured operation I want to perform, but then I would lose the nice thing of having a WSDL that can be checked by web service clients to see exactly the calls that they can make. Or may be there is a way and I don't know it, as I'm a novice in the WS world :). I also wanted to make the "idiom" of calling our web services as "common" as possible, and using the operation name seems to be the usual way of specifying the request.

All in all, I would like to avoid having to have my WS interface tied to the interfaces of my java classes implementing them. As I said, may be I'm still thinking about the web app world and that's the problem ;).

Thanks,
D.




Anne Thomas Manes escribió:

Daniel,

The operation name and the method name do not need to be the same. You use the <operation> definition in the WSDD to map the method name to an operation name (qname). But you can map a method to only one operation.

Also note that when using the java:MSG provider, your operation may have only one input parameter and one return value. It assumes you are using document/literal style, and it always converts the input and output messages into DOM. If you want Axis to perform XML to Java mapping for you, then you want to use the java:RPC provider.

Can you explain to us why you want to be able to define the input and output parameters, but you don't want to let Axis perform your dispatching?

May I also suggest that given the amount of control you want, you should be defining your service using WSDL rather than WSDD.

Anne


Reply via email to