axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lori Van Gulick <lor...@us.ibm.com>
Subject Re: [Axis2] problem with WSDL1.1 and multiple ports per service
Date Fri, 04 Aug 2006 20:55:41 GMT

Hi,

I have opened a JIRA for this problem - AXIS2-965.  It contains a patch
which basically extends WSDL11ToAxisServiceBuilder to take a wsld input
file and return a List of AxisService objects.  The specific changes are:

org.apache.axis2.description.WSDL11ToAxisServiceBuilder
I did some restructuring in the populateService method so that all the
processing that is not specific to an AxisService is only done one time per
wsdl when called from my new class.  I moved this code to a new method,
setup().  I also made some methods and fields protected instead of private
so they can be accessed by subclasses.  Existing users of
WSDL11ToAxisServiceBuilder will not see any change in function.

org.appache.axis2.description.WSDL11ToAllAxisServicesBuilder
This is the new class that extends WSDL11ToAxisServiceBuilder.  It has a
public method, popluateAllServices() which operates as follows
      calls the setup() method on the parent.
      iterates through all the services and all the ports in the wsdl,
      setting serviceName and portName on the parent.
      calls up to populateService() on the parent.  This will return an
      AxisService specific to the service and port name specified.
      changes the name on the AxisService to the port name instead of the
      service name  - needed to uniquely identify the AxisService object
      when there are multiple ports per service.
      returns the List of AxisService objects, one for each port in the
      wsdl

I have also made similar changes to the WSDL20 versions of these files.

I have added a testcase,
org.apache.axis2.description.WSDLToAllServicesBuilderTest, that tests both
the WSDL11 and WSDL20 implementations.

Please let me know if you have any comments or concerns.

Thanks,
Lori.

Lori Van Gulick
WebSphere Development
IBM Austin
(512) 838-7929


                                                                           
             Lori Van                                                      
             Gulick/Austin/IBM                                             
             @IBMUS                                                     To 
                                       axis-dev@ws.apache.org              
             07/24/2006 03:38                                           cc 
             PM                                                            
                                                                   Subject 
                                       [Axis2] problem with WSDL1.1 and    
             Please respond to         multiple ports per service          
             axis-dev@ws.apach                                             
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

I have been investigating a problem with using WSDL11ToAxisService. WSDL 11
allows multiple services per wsdl file, and multiple ports per service.
Currently unless a service and port name are specified, WSDL11ToAxisService
will only return the first port on the first service. In order to get all
the services and ports we would have to pre-parse the wsdl file and call
WSDL11ToAxisService with each port in turn. What we would like to be able
to do is call it once with the wsdl and have it return an object which
contains the entire structure of the wsdl. I have been considering a couple
of ideas to accomplish this and I would like your feedback.

My first thought was that it seems like there should be another object
representing the port that would sit between AxisService and AxisOperation
(e.g. "AxisPort" - or if you prefer the WSDL 2.0 terminology
"AxisEndpoint"). I was wondering if this has ever been considered in the
past? This would allow WSDL11ToAxisService.polulateService to return a
single AxisService that would contain, as children, all the ports defined
to that service in the wsdl.

I realize that adding an AxisPort object at this point. is a potentially
disruptive change that may cause some unwanted overhead to existing code
(although I think the change could probably be done transparently). So as
an alternative I am considering adding something like this:

Add a new class(e.g WSDL11ToAllAxisServices) that would open the wsdl to
extract all the service and port names, call the existing
WSDL11ToAxisService for each port in the wsdl, modify the name of the
resulting AxisService to identify the service/port combination, and return
a List of these AxisService objects (or possibly an AxisServiceGroup). We
would then treat AxisService objects as essentially representing the port
instead of the service.

Perhaps there is some existing method of retrieving all the ports in a wsdl
that I am overlooking? It seems to me that others would also need this
functionality. I would love to hear some additional ideas.

Thanks,
Lori.

Lori Van Gulick
WebSphere Development
IBM Austin
(512) 838-7929
Mime
View raw message