You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Andrew Clegg <an...@gmail.com> on 2008/11/06 12:56:01 UTC

Proposal -- removing irrelevent services from WSDL

Hey folks,

I have a WSDL-first project which contains several service definitions, each
with a separate binding to a separate port type.

When I go to the 'services' page for the WAR in Tomcat, I get a bunch of
links like:

http://myserver:8080/MyWar/services/ServiceOne?wsdl

http://myserver:8080/MyWar/services/ServiceTwo?wsdl

etc.

Exactly the same WSDL, but published to different URLs.

What would be really neat is if CXF could trim out the unused services,
bindings and port type definitions when it publishes the WSDL.

I know it already does some editing as the soap:address location attributes
are correct. Would the maintainers be interested in a patch to do this if I
volunteered? I *think* Axis2 does this, if I remember correctly, so there
might be some usable code in there.

Interestingly, I just noticed the soap:operation soapAction attributes are
not updated the same way as soap:address is. They still have the localhost
test URLs which I hardcoded into my WSDL. Is this intentional, or a bug, or
a sign I've misconfigured something? (Does anything even use this?)

Andrew.


-- 
View this message in context: http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20359717.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: Proposal -- removing irrelevent services from WSDL

Posted by Andrew Clegg <an...@gmail.com>.
I have seen (broken) clients that assume a 1-wsdl-1-service relationship and
get confused with more than one. eg the public services registry at
embraceregistry.net does this, although the developers have acknowledged
this as a bug.

More importantly though, it's something that I have to explain in my user
docs in order for it to make sense. If a wsdl is published for a given
service, they don't expect to see other services defined in there. They
don't expect to see multiple identical wsdls in different locations and with
different names. This makes it seem like a wrinkle.

I could publish a static master wsdl elsewhere, or individual ones, but that
would require separate upkeep, and wouldn't benefit from CXF's address
rewriting if the service moved.

Agreed that it should be optional though.

Andrew. 


Sergey Beryozkin-3 wrote:
> 
> Hi
> 
>>
>> Okay, thanks.
>>
>> No particular opinion about the WSDL pruning proposal then?
> 
> IMHO it makes sense. If the endpoint exposes only one of many services
> described in a wsdl there seems to be no need in keeping the 
> rest of them in a published wsdl. That said it might be a bit expensive to
> ensure the 'unused' services are stripped.
> 
> Is there any other reason in yourself being proposing it, other thna in a
> published wsdl be verbose ? Say, a client code has issues 
> figuring out which service definition to use or something like that ?
> 
> One possible complication here is that one service might return references
> to transient services also defined in this wsdl. Say, 
> Bank return WSA refs to Account services. There might be no direct link
> between these 2 services at a wsdl level so if a Bank 
> endpoint is published and its published wsdl instance won't contain a
> definition for Account then it might cause some issues at a 
> point when Account reference is used at a client side ? I'm not sure if it
> actually will, but it's something which may need to be 
> looked at...
> 
> Cheers, Sergey
> 
>>
>> Andrew.
>>
>>
>>
>> Andi Abes wrote:
>>>
>>> The soapAction is the logical name of the operation - so CXF is very
>>> correct in not touching it.
>>> A good practice is not to use hostnames for it, but rather URI's that
>>> represent the logical purpose of the operation.
>>>
>>> The soap:address is obviously used to connect to the service, hence it
>>> must be updated.
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Andrew Clegg [mailto:andrew.clegg@gmail.com]
>>>> Sent: Thursday, November 06, 2008 6:56 AM
>>>> To: dev@cxf.apache.org
>>>> Subject: Proposal -- removing irrelevent services from WSDL
>>>>
>>>>
>>>> Hey folks,
>>>>
>>>> I have a WSDL-first project which contains several service
>>> definitions,
>>>> each
>>>> with a separate binding to a separate port type.
>>>>
>>>> When I go to the 'services' page for the WAR in Tomcat, I get a bunch
>>> of
>>>> links like:
>>>>
>>>> http://myserver:8080/MyWar/services/ServiceOne?wsdl
>>>>
>>>> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
>>>>
>>>> etc.
>>>>
>>>> Exactly the same WSDL, but published to different URLs.
>>>>
>>>> What would be really neat is if CXF could trim out the unused
>>> services,
>>>> bindings and port type definitions when it publishes the WSDL.
>>>>
>>>> I know it already does some editing as the soap:address location
>>>> attributes
>>>> are correct. Would the maintainers be interested in a patch to do this
>>> if
>>>> I
>>>> volunteered? I *think* Axis2 does this, if I remember correctly, so
>>> there
>>>> might be some usable code in there.
>>>>
>>>> Interestingly, I just noticed the soap:operation soapAction attributes
>>> are
>>>> not updated the same way as soap:address is. They still have the
>>> localhost
>>>> test URLs which I hardcoded into my WSDL. Is this intentional, or a
>>> bug,
>>>> or
>>>> a sign I've misconfigured something? (Does anything even use this?)
>>>>
>>>> Andrew.
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://www.nabble.com/Proposal----removing-
>>>> irrelevent-services-from-WSDL-tp20359717p20359717.html
>>>> Sent from the cxf-dev mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20376006.html
>> Sent from the cxf-dev mailing list archive at Nabble.com.
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20378113.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: Proposal -- removing irrelevent services from WSDL

Posted by Bharath Ganesh <bh...@gmail.com>.
+1.

I personally have seen this many times. Many operations in WSDL which don't
work. This will be a good feature I guess. May be we can have an option to
retain the old behavior.

On Fri, Nov 7, 2008 at 3:09 PM, Sergey Beryozkin <
sergey.beryozkin@progress.com> wrote:

> Hi
>
>
>> Okay, thanks.
>>
>> No particular opinion about the WSDL pruning proposal then?
>>
>
> IMHO it makes sense. If the endpoint exposes only one of many services
> described in a wsdl there seems to be no need in keeping the rest of them in
> a published wsdl. That said it might be a bit expensive to ensure the
> 'unused' services are stripped.
>
> Is there any other reason in yourself being proposing it, other thna in a
> published wsdl be verbose ? Say, a client code has issues figuring out which
> service definition to use or something like that ?
>
> One possible complication here is that one service might return references
> to transient services also defined in this wsdl. Say, Bank return WSA refs
> to Account services. There might be no direct link between these 2 services
> at a wsdl level so if a Bank endpoint is published and its published wsdl
> instance won't contain a definition for Account then it might cause some
> issues at a point when Account reference is used at a client side ? I'm not
> sure if it actually will, but it's something which may need to be looked
> at...
>
> Cheers, Sergey
>
>
>
>> Andrew.
>>
>>
>>
>> Andi Abes wrote:
>>
>>>
>>> The soapAction is the logical name of the operation - so CXF is very
>>> correct in not touching it.
>>> A good practice is not to use hostnames for it, but rather URI's that
>>> represent the logical purpose of the operation.
>>>
>>> The soap:address is obviously used to connect to the service, hence it
>>> must be updated.
>>>
>>>
>>>
>>>  -----Original Message-----
>>>> From: Andrew Clegg [mailto:andrew.clegg@gmail.com]
>>>> Sent: Thursday, November 06, 2008 6:56 AM
>>>> To: dev@cxf.apache.org
>>>> Subject: Proposal -- removing irrelevent services from WSDL
>>>>
>>>>
>>>> Hey folks,
>>>>
>>>> I have a WSDL-first project which contains several service
>>>>
>>> definitions,
>>>
>>>> each
>>>> with a separate binding to a separate port type.
>>>>
>>>> When I go to the 'services' page for the WAR in Tomcat, I get a bunch
>>>>
>>> of
>>>
>>>> links like:
>>>>
>>>> http://myserver:8080/MyWar/services/ServiceOne?wsdl
>>>>
>>>> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
>>>>
>>>> etc.
>>>>
>>>> Exactly the same WSDL, but published to different URLs.
>>>>
>>>> What would be really neat is if CXF could trim out the unused
>>>>
>>> services,
>>>
>>>> bindings and port type definitions when it publishes the WSDL.
>>>>
>>>> I know it already does some editing as the soap:address location
>>>> attributes
>>>> are correct. Would the maintainers be interested in a patch to do this
>>>>
>>> if
>>>
>>>> I
>>>> volunteered? I *think* Axis2 does this, if I remember correctly, so
>>>>
>>> there
>>>
>>>> might be some usable code in there.
>>>>
>>>> Interestingly, I just noticed the soap:operation soapAction attributes
>>>>
>>> are
>>>
>>>> not updated the same way as soap:address is. They still have the
>>>>
>>> localhost
>>>
>>>> test URLs which I hardcoded into my WSDL. Is this intentional, or a
>>>>
>>> bug,
>>>
>>>> or
>>>> a sign I've misconfigured something? (Does anything even use this?)
>>>>
>>>> Andrew.
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>>
>>> http://www.nabble.com/Proposal----removing-
>>>
>>>> irrelevent-services-from-WSDL-tp20359717p20359717.html
>>>> Sent from the cxf-dev mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20376006.html
>> Sent from the cxf-dev mailing list archive at Nabble.com.
>>
>>
>

Re: Proposal -- removing irrelevent services from WSDL

Posted by Sergey Beryozkin <se...@progress.com>.
Hi

>
> Okay, thanks.
>
> No particular opinion about the WSDL pruning proposal then?

IMHO it makes sense. If the endpoint exposes only one of many services described in a wsdl there seems to be no need in keeping the 
rest of them in a published wsdl. That said it might be a bit expensive to ensure the 'unused' services are stripped.

Is there any other reason in yourself being proposing it, other thna in a published wsdl be verbose ? Say, a client code has issues 
figuring out which service definition to use or something like that ?

One possible complication here is that one service might return references to transient services also defined in this wsdl. Say, 
Bank return WSA refs to Account services. There might be no direct link between these 2 services at a wsdl level so if a Bank 
endpoint is published and its published wsdl instance won't contain a definition for Account then it might cause some issues at a 
point when Account reference is used at a client side ? I'm not sure if it actually will, but it's something which may need to be 
looked at...

Cheers, Sergey

>
> Andrew.
>
>
>
> Andi Abes wrote:
>>
>> The soapAction is the logical name of the operation - so CXF is very
>> correct in not touching it.
>> A good practice is not to use hostnames for it, but rather URI's that
>> represent the logical purpose of the operation.
>>
>> The soap:address is obviously used to connect to the service, hence it
>> must be updated.
>>
>>
>>
>>> -----Original Message-----
>>> From: Andrew Clegg [mailto:andrew.clegg@gmail.com]
>>> Sent: Thursday, November 06, 2008 6:56 AM
>>> To: dev@cxf.apache.org
>>> Subject: Proposal -- removing irrelevent services from WSDL
>>>
>>>
>>> Hey folks,
>>>
>>> I have a WSDL-first project which contains several service
>> definitions,
>>> each
>>> with a separate binding to a separate port type.
>>>
>>> When I go to the 'services' page for the WAR in Tomcat, I get a bunch
>> of
>>> links like:
>>>
>>> http://myserver:8080/MyWar/services/ServiceOne?wsdl
>>>
>>> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
>>>
>>> etc.
>>>
>>> Exactly the same WSDL, but published to different URLs.
>>>
>>> What would be really neat is if CXF could trim out the unused
>> services,
>>> bindings and port type definitions when it publishes the WSDL.
>>>
>>> I know it already does some editing as the soap:address location
>>> attributes
>>> are correct. Would the maintainers be interested in a patch to do this
>> if
>>> I
>>> volunteered? I *think* Axis2 does this, if I remember correctly, so
>> there
>>> might be some usable code in there.
>>>
>>> Interestingly, I just noticed the soap:operation soapAction attributes
>> are
>>> not updated the same way as soap:address is. They still have the
>> localhost
>>> test URLs which I hardcoded into my WSDL. Is this intentional, or a
>> bug,
>>> or
>>> a sign I've misconfigured something? (Does anything even use this?)
>>>
>>> Andrew.
>>>
>>>
>>> --
>>> View this message in context:
>> http://www.nabble.com/Proposal----removing-
>>> irrelevent-services-from-WSDL-tp20359717p20359717.html
>>> Sent from the cxf-dev mailing list archive at Nabble.com.
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20376006.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
> 


RE: Proposal -- removing irrelevent services from WSDL

Posted by Andrew Clegg <an...@gmail.com>.
Okay, thanks.

No particular opinion about the WSDL pruning proposal then?

Andrew.



Andi Abes wrote:
> 
> The soapAction is the logical name of the operation - so CXF is very
> correct in not touching it. 
> A good practice is not to use hostnames for it, but rather URI's that
> represent the logical purpose of the operation.
> 
> The soap:address is obviously used to connect to the service, hence it
> must be updated.
> 
> 
> 
>> -----Original Message-----
>> From: Andrew Clegg [mailto:andrew.clegg@gmail.com]
>> Sent: Thursday, November 06, 2008 6:56 AM
>> To: dev@cxf.apache.org
>> Subject: Proposal -- removing irrelevent services from WSDL
>> 
>> 
>> Hey folks,
>> 
>> I have a WSDL-first project which contains several service
> definitions,
>> each
>> with a separate binding to a separate port type.
>> 
>> When I go to the 'services' page for the WAR in Tomcat, I get a bunch
> of
>> links like:
>> 
>> http://myserver:8080/MyWar/services/ServiceOne?wsdl
>> 
>> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
>> 
>> etc.
>> 
>> Exactly the same WSDL, but published to different URLs.
>> 
>> What would be really neat is if CXF could trim out the unused
> services,
>> bindings and port type definitions when it publishes the WSDL.
>> 
>> I know it already does some editing as the soap:address location
>> attributes
>> are correct. Would the maintainers be interested in a patch to do this
> if
>> I
>> volunteered? I *think* Axis2 does this, if I remember correctly, so
> there
>> might be some usable code in there.
>> 
>> Interestingly, I just noticed the soap:operation soapAction attributes
> are
>> not updated the same way as soap:address is. They still have the
> localhost
>> test URLs which I hardcoded into my WSDL. Is this intentional, or a
> bug,
>> or
>> a sign I've misconfigured something? (Does anything even use this?)
>> 
>> Andrew.
>> 
>> 
>> --
>> View this message in context:
> http://www.nabble.com/Proposal----removing-
>> irrelevent-services-from-WSDL-tp20359717p20359717.html
>> Sent from the cxf-dev mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Proposal----removing-irrelevent-services-from-WSDL-tp20359717p20376006.html
Sent from the cxf-dev mailing list archive at Nabble.com.


RE: Proposal -- removing irrelevent services from WSDL

Posted by Andi Abes <aa...@progress.com>.
The soapAction is the logical name of the operation - so CXF is very
correct in not touching it. 
A good practice is not to use hostnames for it, but rather URI's that
represent the logical purpose of the operation.

The soap:address is obviously used to connect to the service, hence it
must be updated.



> -----Original Message-----
> From: Andrew Clegg [mailto:andrew.clegg@gmail.com]
> Sent: Thursday, November 06, 2008 6:56 AM
> To: dev@cxf.apache.org
> Subject: Proposal -- removing irrelevent services from WSDL
> 
> 
> Hey folks,
> 
> I have a WSDL-first project which contains several service
definitions,
> each
> with a separate binding to a separate port type.
> 
> When I go to the 'services' page for the WAR in Tomcat, I get a bunch
of
> links like:
> 
> http://myserver:8080/MyWar/services/ServiceOne?wsdl
> 
> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
> 
> etc.
> 
> Exactly the same WSDL, but published to different URLs.
> 
> What would be really neat is if CXF could trim out the unused
services,
> bindings and port type definitions when it publishes the WSDL.
> 
> I know it already does some editing as the soap:address location
> attributes
> are correct. Would the maintainers be interested in a patch to do this
if
> I
> volunteered? I *think* Axis2 does this, if I remember correctly, so
there
> might be some usable code in there.
> 
> Interestingly, I just noticed the soap:operation soapAction attributes
are
> not updated the same way as soap:address is. They still have the
localhost
> test URLs which I hardcoded into my WSDL. Is this intentional, or a
bug,
> or
> a sign I've misconfigured something? (Does anything even use this?)
> 
> Andrew.
> 
> 
> --
> View this message in context:
http://www.nabble.com/Proposal----removing-
> irrelevent-services-from-WSDL-tp20359717p20359717.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


Re: Proposal -- removing irrelevent services from WSDL

Posted by Daniel Kulp <dk...@apache.org>.
This is something I'm kind of "on the fence" about.   There are definitely use 
cases where having the other services/ports in the wsdl so this behavior 
definitely would need to be optional.

The usecases that I have in mind:

1) Clustering/Failover - the clustering/failover stuff kind of relies on this.   
If the other nodes in the cluster are defined in the wsdl, if something 
should occur to this node, the clients would automatically fail over to one 
of the other ports.  Thus, they need to be there for that to work.

2) Other transports - If the service is exposed via multiple 
transports/bindings, the client could be created via the HTTP wsdl, but then 
select one of the other transports/bindings.   For example, the wsdl may have 
both an HTTP transport and a JMS transport.    The client may want to select 
the JMS port to take advantage of the async API's and stuff for scalability.   

Anyway, it's a good idea, but it would definitely need to be optional.

Dan



On Thursday 06 November 2008 6:56:01 am Andrew Clegg wrote:
> Hey folks,
>
> I have a WSDL-first project which contains several service definitions,
> each with a separate binding to a separate port type.
>
> When I go to the 'services' page for the WAR in Tomcat, I get a bunch of
> links like:
>
> http://myserver:8080/MyWar/services/ServiceOne?wsdl
>
> http://myserver:8080/MyWar/services/ServiceTwo?wsdl
>
> etc.
>
> Exactly the same WSDL, but published to different URLs.
>
> What would be really neat is if CXF could trim out the unused services,
> bindings and port type definitions when it publishes the WSDL.
>
> I know it already does some editing as the soap:address location attributes
> are correct. Would the maintainers be interested in a patch to do this if I
> volunteered? I *think* Axis2 does this, if I remember correctly, so there
> might be some usable code in there.
>
> Interestingly, I just noticed the soap:operation soapAction attributes are
> not updated the same way as soap:address is. They still have the localhost
> test URLs which I hardcoded into my WSDL. Is this intentional, or a bug, or
> a sign I've misconfigured something? (Does anything even use this?)
>
> Andrew.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog