You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Lori Van Gulick <lo...@us.ibm.com> on 2006/08/04 22:55:41 UTC
Re: [Axis2] problem with WSDL1.1 and multiple ports per service
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
Re: introduce AxisEndpoint? (was: Re: [Axis2] problem with WSDL1.1 and
multiple ports per service)
Posted by Lori Van Gulick <lo...@us.ibm.com>.
Sanjiva,
It is interesting that you were considering a AxisEndpoint -> AxisService
-> AxisOpertion hierarchy. I can see this would work fine for WSDL 2.0
since all endpoints in a service need to implement the same interface, and
will therefore have the same operations. However I'm having a hard time
seeing how this will work for WSDL 1.1 since, as Jeff points out, a service
can have multiple ports each with a different portType, operations, etc.
Are you envisioning moving the binding info out of AxisService into the new
AxisEndpoint? How do you see the mapping from Axis objects to wsdl
elements? Something like this maybe?
AxisOperation wsdl 1.1 operation wsdl 2.0
operation
AxisService wsdl 1.1 portType wsdl 2.0
interface
AxisEndpoint wsdl 1.1 binding/port wsdl 2.0
endpoint
AxisEndpoint[] wsdl 1.1 service wsdl 2.0
service
That still leaves us with a problem with wsdl files that contain multiple
services. Although maybe all that's required is that we store the wsld
service name on the AxisEndpoint for later reference.
So then would the dispatch code use the AxisEndpoint instead of
AxisService?
I think a big part of the problem here is that WSDL11ToAxisServiceBuilder
gives the AxisService the wsdl service name, implying that it is a
representation of the WSDL service. As you point out, if we have multiple
ports per service, we will end up with AxisService objects with the same
name. I think it would be good if we could agree on a better name for
AxisService that won't result in duplicates.
My patch attempts to work around this by renaming the resulting AxisService
with the portName - but only if you use my new method -
WSDL11ToAllAxisServicesBuilder.populateAllServices(). Just for fun I tried
changing WSDL11ToAxisServiceBuilder to always name the AxisService with the
wsdl portName. There was only one failure in the axis2 tests and that was
because the testcase was expecting the Stub to be named
<serviceName>Stub.java, and it was now named <portName>Stub.java. I'm not
sure how big a impact on users changing the AxisService name would have,
but based on the tests it doesn't look too bad.
Thanks,
Lori.
Lori Van Gulick
WebSphere Development
IBM Austin
(512) 838-7929
Jeff
Barrett/Austin/IB
M@IBMUS To
axis-dev@ws.apache.org
08/07/2006 02:25 cc
PM
Subject
Re: introduce AxisEndpoint? (was:
Please respond to Re: [Axis2] problem with WSDL1.1
axis-dev@ws.apach and multiple ports per service)
e.org
Hi Sanjiva,
I was indeed surpised you hadn't posted an opinion yet :-)
It is interesting that an AxisService correlates to a WSDL portType. From
looking through the code, I came to the different conclusion that an
AxisService currently represented a WSDL port (or endpoint in
WSDL20-speak), or actually a combination of the WSDL service + port +
binding, with the portType being represented only implicitly by virute of
the operations attached to the AxisService.
However, if an AxisService represents a portType as you say, then there's a
problem with supporting WSDL1.1 in that a single WSDL service can have
multiple ports which refer to different portTypes. The fact that an
AxisService can be constructed based on encoutering a WSDL service tag and
uses the name from the WSDL service tag as the name of the AxisService
seems to be a problem in this case. I realize in WSDL2.0 all ports
(endpoints) under a service must implement the same portType (interface),
so the idea of AxisService-as-portType might work; but for WSDL1.1 I think
it is broken.
I do see your point of duplicate operations for multiple ports which are
using the same portType. One way to address that would be to model the
WSDL more closely and (using WSDL20-speak) have something like:
AxisService // WSDL 1.1
Service
AxisEndpoint[] // WSDL 1.1
Port + Binding
AxisInterface // WSDL 1.1
PortType
AxisOperation[]
Where an AxisInterface can be shared across multiple AxisEndpoint
instances, although the AxisEndpoint would probably need to carry binding
information, specific to paramater serialization into the body or a header
for example. This is actually similar to the direction we are going in the
JAX-WS metadata layer (i.e. the *.jaxws.description package) since we want
to keep track of JAX-WS metadata (i.e. annotation) information at a more
granular level.
Ignoring the introduction of an AxisInterface and/or the duplicaton of
AxisOperations, it seems to me you and Lori and basically saying similar
things in that an AxisService should contain multiple AxisEndpoints
corresponding to the ports (or endpoints in WSDL20).
Thanks,
Jeff
IBM Software Group - WebSphere Web Services Development
Phone: 512-838-4587 or Tie Line 678-4587
Internet e-mail and Sametime ID: barrettj@us.ibm.com
Sanjiva Weerawarana
<sa...@opensource.lk>
To
axis-dev@ws.apache.org
08/06/2006 11:48 PM cc
Subject
Please respond to introduce AxisEndpoint? (was: Re:
axis-dev@ws.apache.org [Axis2] problem with WSDL1.1 and
multiple ports per service)
On Fri, 2006-08-04 at 15:55 -0500, Lori Van Gulick wrote:
> 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:
Sorry for missing your original post .. I do have an opinion on it (as
you might suspect ;-)):
> 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.
Yeah this was considered. AxisService basically is like a representation
of an portType rather than a port. Its a place to keep the set of all
operations that are available at an endpoint.
I too have been thinking for several months about adding another thing:
AxisEndpoint, except with one difference from you .. that AxisEndpoint
would come below AxisService! That is:
AxisOperation
collection of messages grouped together
AxisService
collection of operations offered at one spot
AxisEndpoint
the endpoint at which a service is offered
So 1..n AxisEndpoint structures would be created by Axis2 @ runtime to
represent each endpoint it manages. That is, an AxisEndpoint effectively
corresponds to a combination of a transport listener and an AxisService.
Why do we need this? An AxisEndpoint would also be the place where we
keep transport dependent service policies. So if (on the client side)
when we read a WSDL there are multiple ports, then instead of returning
multiple AxisService objects as you did, we'd return multiple
AxisEndpoint objects, with each representing that configured endpoint,
including the TransportListener via which messages come for that
particular service endpoint.
The problem with hacking AxisService to do this is duplication of data-
the list of operations etc. that's in AxisService is the same for all
the endpoints and if we hack it we'd lose that info. Also, dispatch can
get screwed with that; if you have multiple services then each one has
to have a different name .. and something like RM that adds an operation
will behave weirdly.
I haven't thought thru all the ramifications of this change but they
don't seem daunting to me at an abstract level. Reality will likely be
different!
Thoughts?
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: introduce AxisEndpoint? (was: Re: [Axis2] problem with WSDL1.1 and
multiple ports per service)
Posted by Jeff Barrett <ba...@us.ibm.com>.
Hi Sanjiva,
I was indeed surpised you hadn't posted an opinion yet :-)
It is interesting that an AxisService correlates to a WSDL portType. From
looking through the code, I came to the different conclusion that an
AxisService currently represented a WSDL port (or endpoint in
WSDL20-speak), or actually a combination of the WSDL service + port +
binding, with the portType being represented only implicitly by virute of
the operations attached to the AxisService.
However, if an AxisService represents a portType as you say, then there's
a problem with supporting WSDL1.1 in that a single WSDL service can have
multiple ports which refer to different portTypes. The fact that an
AxisService can be constructed based on encoutering a WSDL service tag and
uses the name from the WSDL service tag as the name of the AxisService
seems to be a problem in this case. I realize in WSDL2.0 all ports
(endpoints) under a service must implement the same portType (interface),
so the idea of AxisService-as-portType might work; but for WSDL1.1 I think
it is broken.
I do see your point of duplicate operations for multiple ports which are
using the same portType. One way to address that would be to model the
WSDL more closely and (using WSDL20-speak) have something like:
AxisService // WSDL 1.1
Service
AxisEndpoint[] // WSDL 1.1 Port +
Binding
AxisInterface // WSDL 1.1
PortType
AxisOperation[]
Where an AxisInterface can be shared across multiple AxisEndpoint
instances, although the AxisEndpoint would probably need to carry binding
information, specific to paramater serialization into the body or a header
for example. This is actually similar to the direction we are going in the
JAX-WS metadata layer (i.e. the *.jaxws.description package) since we want
to keep track of JAX-WS metadata (i.e. annotation) information at a more
granular level.
Ignoring the introduction of an AxisInterface and/or the duplicaton of
AxisOperations, it seems to me you and Lori and basically saying similar
things in that an AxisService should contain multiple AxisEndpoints
corresponding to the ports (or endpoints in WSDL20).
Thanks,
Jeff
IBM Software Group - WebSphere Web Services Development
Phone: 512-838-4587 or Tie Line 678-4587
Internet e-mail and Sametime ID: barrettj@us.ibm.com
Sanjiva Weerawarana <sa...@opensource.lk>
08/06/2006 11:48 PM
Please respond to
axis-dev@ws.apache.org
To
axis-dev@ws.apache.org
cc
Subject
introduce AxisEndpoint? (was: Re: [Axis2] problem with WSDL1.1 and
multiple ports per service)
On Fri, 2006-08-04 at 15:55 -0500, Lori Van Gulick wrote:
> 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:
Sorry for missing your original post .. I do have an opinion on it (as
you might suspect ;-)):
> 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.
Yeah this was considered. AxisService basically is like a representation
of an portType rather than a port. Its a place to keep the set of all
operations that are available at an endpoint.
I too have been thinking for several months about adding another thing:
AxisEndpoint, except with one difference from you .. that AxisEndpoint
would come below AxisService! That is:
AxisOperation
collection of messages grouped together
AxisService
collection of operations offered at one spot
AxisEndpoint
the endpoint at which a service is offered
So 1..n AxisEndpoint structures would be created by Axis2 @ runtime to
represent each endpoint it manages. That is, an AxisEndpoint effectively
corresponds to a combination of a transport listener and an AxisService.
Why do we need this? An AxisEndpoint would also be the place where we
keep transport dependent service policies. So if (on the client side)
when we read a WSDL there are multiple ports, then instead of returning
multiple AxisService objects as you did, we'd return multiple
AxisEndpoint objects, with each representing that configured endpoint,
including the TransportListener via which messages come for that
particular service endpoint.
The problem with hacking AxisService to do this is duplication of data-
the list of operations etc. that's in AxisService is the same for all
the endpoints and if we hack it we'd lose that info. Also, dispatch can
get screwed with that; if you have multiple services then each one has
to have a different name .. and something like RM that adds an operation
will behave weirdly.
I haven't thought thru all the ramifications of this change but they
don't seem daunting to me at an abstract level. Reality will likely be
different!
Thoughts?
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
introduce AxisEndpoint? (was: Re: [Axis2] problem with WSDL1.1 and
multiple ports per service)
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Fri, 2006-08-04 at 15:55 -0500, Lori Van Gulick wrote:
> 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:
Sorry for missing your original post .. I do have an opinion on it (as
you might suspect ;-)):
> 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.
Yeah this was considered. AxisService basically is like a representation
of an portType rather than a port. Its a place to keep the set of all
operations that are available at an endpoint.
I too have been thinking for several months about adding another thing:
AxisEndpoint, except with one difference from you .. that AxisEndpoint
would come below AxisService! That is:
AxisOperation
collection of messages grouped together
AxisService
collection of operations offered at one spot
AxisEndpoint
the endpoint at which a service is offered
So 1..n AxisEndpoint structures would be created by Axis2 @ runtime to
represent each endpoint it manages. That is, an AxisEndpoint effectively
corresponds to a combination of a transport listener and an AxisService.
Why do we need this? An AxisEndpoint would also be the place where we
keep transport dependent service policies. So if (on the client side)
when we read a WSDL there are multiple ports, then instead of returning
multiple AxisService objects as you did, we'd return multiple
AxisEndpoint objects, with each representing that configured endpoint,
including the TransportListener via which messages come for that
particular service endpoint.
The problem with hacking AxisService to do this is duplication of data-
the list of operations etc. that's in AxisService is the same for all
the endpoints and if we hack it we'd lose that info. Also, dispatch can
get screwed with that; if you have multiple services then each one has
to have a different name .. and something like RM that adds an operation
will behave weirdly.
I haven't thought thru all the ramifications of this change but they
don't seem daunting to me at an abstract level. Reality will likely be
different!
Thoughts?
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org