You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Glynn, Eoghan" <eo...@iona.com> on 2007/04/24 18:34:52 UTC

createdFromAPI attribute


Folks,

After tearing my hair out for the last hour as to why some
<jaxws:client> config seemed no longer to be working as before, it looks
like the abstract="true" attribute on this element needs to be replaced
by createdFromAPI="true".

What does createdFromAPI mean in this context? That the proxy is created
via Service.getPort(), or?

Also is this the only change required to restore the previous semantics?

Whoever made the change, probably a good idea to also update any system
tests and/or demos that use this config, prior to the release. A quick
grep suggests this applies to the coloc demo and system tests at least,
maybe others too.

Cheers,
Eoghan 


Re: createdFromAPI attribute

Posted by Dan Diephouse <da...@envoisolutions.com>.
Lets say I do:

<jaxws:endpoint id="abstractendpoint">
  <jaxws:features>
    <wsa:addressing/>
  </jaxws:features>
</jaxws:endpoint>

<jaxws:endpoint id="myEndpoint" parent="abstractendpoint" address="..."
implementor="...">

If we automatically appended .jaxws-endpoint to ids, the parent attribute on
the endpoint would no longer be relavent as it would have to be
abstractendpoint.jaxws-endpoint. It was also be very confusing to spring
users to have their id changing on them I think.

- Dan

On 5/8/07, Tully, Gary <Ga...@iona.com> wrote:
>
>
> Hi Dan,
> Apologies for coming late to this but could you expand on:
>
> > If we went with #1 this would break parent/child
> > relationships for the normal spring case ("why isn't my ID
> > what I specified it to be?!?!").
>
> I must be missing something here but why is the parent child
> relationship relevant to beans that are auto-generated from features? In
> the normal spring case the equivalent auto-generated beans would not
> exist without the suffixes.
>
> Thanks for your time,
> Gary.
>
>
> > -----Original Message-----
> > From: Dan Diephouse [mailto:dan@envoisolutions.com]
> > Sent: 24 April 2007 17:41
> > To: cxf-dev@incubator.apache.org
> > Subject: Re: <jaxws:client> createdFromAPI attribute
> >
> > Hiya,
> >
> > In one of my previous commit messages I detailed this change
> > and why it needed to be done. In essence if you have a
> > <jaxws:client> and a <jaxws:endpoint> with the same id, they
> > conflict. In essence there were two solutions.
> >
> > 1. Change the bean definitions parsers to automatically
> > append ".jaxws-client" and ".jaxws-endpoint" to the bean
> > names 2. Force people to append those to the ID themselves.
> >
> > As appending .jaxws-client to each ID seemed rather
> > redundant, I opted for choice #1. From here there were two choices:
> > 1. Automatically change the id if abstract=true 2. Create
> > some other mechanism to automatically change the id - i.e.
> > createdFromAPI = true
> >
> > If we went with #1 this would break parent/child
> > relationships for the normal spring case ("why isn't my ID
> > what I specified it to be?!?!"). So I opted for solution #2.
> >
> > createdFromAPI simply means that the user created that bean
> > using our APIs - i.e. Endpoint.publish or Service.getPort. If
> > you have better suggestions, I would welcome them - I asked
> > for some in my commit message.
> >
> > I updated all the tests to use createdFromAPI and also all
> > the demos. the coloc demo was added after these changes, so I
> > did not review that one.
> >
> > - Dan
> >
> > On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
> > >
> > >
> > >
> > > Folks,
> > >
> > > After tearing my hair out for the last hour as to why some
> > > <jaxws:client> config seemed no longer to be working as before, it
> > > looks like the abstract="true" attribute on this element
> > needs to be
> > > replaced by createdFromAPI="true".
> > >
> > > What does createdFromAPI mean in this context? That the proxy is
> > > created via Service.getPort(), or?
> > >
> > > Also is this the only change required to restore the
> > previous semantics?
> > >
> > > Whoever made the change, probably a good idea to also update any
> > > system tests and/or demos that use this config, prior to
> > the release.
> > > A quick grep suggests this applies to the coloc demo and
> > system tests
> > > at least, maybe others too.
> > >
> > > Cheers,
> > > Eoghan
> > >
> > >
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: createdFromAPI attribute

Posted by Fred Dushin <fr...@dushin.net>.
Dan, is what you are proposing that we have the config along the  
lines of:

<http:conduit id="{http://apache.org/hello_world_soap_http}SoapPort">
     ...
</http:conduit>

as opposed to

<http:conduit id="{http://apache.org/hello_world_soap_http} 
SoapPort.http-conduit">
     ...
</http:conduit>

(and similarly for http:destination)?

I was wondering about this, myself, as I was re-factoring some of my  
SSL config to use the new config syntax (Yes, I'm that late).

I like the idea of removing the "-conduit"/"-designation" designators  
in the id fields, when the Element effectively already encodes the  
role of the element -- I agree, it seems redundant, and if that is  
the proposal, then I think it would be more succinct if we removed it.

Not sure how this affects migration.  Apparently, there are already  
significant changes in the config between 1.0 and 2.0, so now is the  
time to do, IMO.  Cut the cord while you can, right?

-Fred

On Apr 24, 2007, at 1:12 PM, Dan Diephouse wrote:

> And yet one other thing, I didn't do this for conduits/ 
> destinations. Maybe
> we should though? Since they already have .http-conduit/.http- 
> destination
> appended to them, we could do it in a way such that it was backward
> compatible.
>
>> >
>> > As appending .jaxws-client to each ID seemed rather redundant, I  
>> opted
>> > for choice #1. From here there were two choices:
>> > 1. Automatically change the id if abstract=true
>> > 2. Create some other mechanism to automatically change the id -  
>> i.e.
>> > createdFromAPI = true

Re: createdFromAPI attribute

Posted by Dan Diephouse <da...@envoisolutions.com>.
And yet one other thing, I didn't do this for conduits/destinations. Maybe
we should though? Since they already have .http-conduit/.http-destination
appended to them, we could do it in a way such that it was backward
compatible.

Regards,
- Dan

On 4/24/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> Also, I'm in the process of updating all the docs over the next couple
> days as this change and several others over the past few weeks have made
> them out of date.
>
> - Dan
>
> On 4/24/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> >
> > Hiya,
> >
> > In one of my previous commit messages I detailed this change and why it
> > needed to be done. In essence if you have a <jaxws:client> and a
> > <jaxws:endpoint> with the same id, they conflict. In essence there were two
> > solutions.
> >
> > 1. Change the bean definitions parsers to automatically append
> > ".jaxws-client" and ".jaxws-endpoint" to the bean names
> > 2. Force people to append those to the ID themselves.
> >
> > As appending .jaxws-client to each ID seemed rather redundant, I opted
> > for choice #1. From here there were two choices:
> > 1. Automatically change the id if abstract=true
> > 2. Create some other mechanism to automatically change the id - i.e.
> > createdFromAPI = true
> >
> > If we went with #1 this would break parent/child relationships for the
> > normal spring case ("why isn't my ID what I specified it to be?!?!"). So I
> > opted for solution #2.
> >
> > createdFromAPI simply means that the user created that bean using our
> > APIs - i.e. Endpoint.publish or Service.getPort. If you have better
> > suggestions, I would welcome them - I asked for some in my commit message.
> >
> > I updated all the tests to use createdFromAPI and also all the demos.
> > the coloc demo was added after these changes, so I did not review that one.
> >
> > - Dan
> >
> > On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
> > >
> > >
> > >
> > > Folks,
> > >
> > > After tearing my hair out for the last hour as to why some
> > > <jaxws:client> config seemed no longer to be working as before, it
> > > looks
> > > like the abstract="true" attribute on this element needs to be
> > > replaced
> > > by createdFromAPI="true".
> > >
> > > What does createdFromAPI mean in this context? That the proxy is
> > > created
> > > via Service.getPort(), or?
> > >
> > > Also is this the only change required to restore the previous
> > > semantics?
> > >
> > > Whoever made the change, probably a good idea to also update any
> > > system
> > > tests and/or demos that use this config, prior to the release. A quick
> > > grep suggests this applies to the coloc demo and system tests at
> > > least,
> > > maybe others too.
> > >
> > > Cheers,
> > > Eoghan
> > >
> > >
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
>
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: createdFromAPI attribute

Posted by Dan Diephouse <da...@envoisolutions.com>.
Also, I'm in the process of updating all the docs over the next couple days
as this change and several others over the past few weeks have made them out
of date.

- Dan

On 4/24/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> Hiya,
>
> In one of my previous commit messages I detailed this change and why it
> needed to be done. In essence if you have a <jaxws:client> and a
> <jaxws:endpoint> with the same id, they conflict. In essence there were two
> solutions.
>
> 1. Change the bean definitions parsers to automatically append
> ".jaxws-client" and ".jaxws-endpoint" to the bean names
> 2. Force people to append those to the ID themselves.
>
> As appending .jaxws-client to each ID seemed rather redundant, I opted for
> choice #1. From here there were two choices:
> 1. Automatically change the id if abstract=true
> 2. Create some other mechanism to automatically change the id - i.e.
> createdFromAPI = true
>
> If we went with #1 this would break parent/child relationships for the
> normal spring case ("why isn't my ID what I specified it to be?!?!"). So I
> opted for solution #2.
>
> createdFromAPI simply means that the user created that bean using our APIs
> - i.e. Endpoint.publish or Service.getPort. If you have better
> suggestions, I would welcome them - I asked for some in my commit message.
>
> I updated all the tests to use createdFromAPI and also all the demos. the
> coloc demo was added after these changes, so I did not review that one.
>
> - Dan
>
> On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
> >
> >
> >
> > Folks,
> >
> > After tearing my hair out for the last hour as to why some
> > <jaxws:client> config seemed no longer to be working as before, it looks
> > like the abstract="true" attribute on this element needs to be replaced
> > by createdFromAPI="true".
> >
> > What does createdFromAPI mean in this context? That the proxy is created
> > via Service.getPort(), or?
> >
> > Also is this the only change required to restore the previous semantics?
> >
> >
> > Whoever made the change, probably a good idea to also update any system
> > tests and/or demos that use this config, prior to the release. A quick
> > grep suggests this applies to the coloc demo and system tests at least,
> > maybe others too.
> >
> > Cheers,
> > Eoghan
> >
> >
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog




-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

RE: createdFromAPI attribute

Posted by "Tully, Gary" <Ga...@iona.com>.
Hi Dan, 
Apologies for coming late to this but could you expand on:

> If we went with #1 this would break parent/child 
> relationships for the normal spring case ("why isn't my ID 
> what I specified it to be?!?!").

I must be missing something here but why is the parent child
relationship relevant to beans that are auto-generated from features? In
the normal spring case the equivalent auto-generated beans would not
exist without the suffixes.

Thanks for your time,
Gary.
 

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 24 April 2007 17:41
> To: cxf-dev@incubator.apache.org
> Subject: Re: <jaxws:client> createdFromAPI attribute
> 
> Hiya,
> 
> In one of my previous commit messages I detailed this change 
> and why it needed to be done. In essence if you have a 
> <jaxws:client> and a <jaxws:endpoint> with the same id, they 
> conflict. In essence there were two solutions.
> 
> 1. Change the bean definitions parsers to automatically 
> append ".jaxws-client" and ".jaxws-endpoint" to the bean 
> names 2. Force people to append those to the ID themselves.
> 
> As appending .jaxws-client to each ID seemed rather 
> redundant, I opted for choice #1. From here there were two choices:
> 1. Automatically change the id if abstract=true 2. Create 
> some other mechanism to automatically change the id - i.e.
> createdFromAPI = true
> 
> If we went with #1 this would break parent/child 
> relationships for the normal spring case ("why isn't my ID 
> what I specified it to be?!?!"). So I opted for solution #2.
> 
> createdFromAPI simply means that the user created that bean 
> using our APIs - i.e. Endpoint.publish or Service.getPort. If 
> you have better suggestions, I would welcome them - I asked 
> for some in my commit message.
> 
> I updated all the tests to use createdFromAPI and also all 
> the demos. the coloc demo was added after these changes, so I 
> did not review that one.
> 
> - Dan
> 
> On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
> >
> >
> >
> > Folks,
> >
> > After tearing my hair out for the last hour as to why some 
> > <jaxws:client> config seemed no longer to be working as before, it 
> > looks like the abstract="true" attribute on this element 
> needs to be 
> > replaced by createdFromAPI="true".
> >
> > What does createdFromAPI mean in this context? That the proxy is 
> > created via Service.getPort(), or?
> >
> > Also is this the only change required to restore the 
> previous semantics?
> >
> > Whoever made the change, probably a good idea to also update any 
> > system tests and/or demos that use this config, prior to 
> the release. 
> > A quick grep suggests this applies to the coloc demo and 
> system tests 
> > at least, maybe others too.
> >
> > Cheers,
> > Eoghan
> >
> >
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

RE: createdFromAPI attribute

Posted by "Glynn, Eoghan" <eo...@iona.com>.

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 24 April 2007 17:41
> To: cxf-dev@incubator.apache.org
> Subject: Re: <jaxws:client> createdFromAPI attribute
> 
> Hiya,
> 
> In one of my previous commit messages I detailed this change 
> and why it needed to be done. In essence if you have a 
> <jaxws:client> and a <jaxws:endpoint> with the same id, they 
> conflict. In essence there were two solutions.
> 
> 1. Change the bean definitions parsers to automatically 
> append ".jaxws-client" and ".jaxws-endpoint" to the bean 
> names 2. Force people to append those to the ID themselves.


We discussed this previously on the list and I thought the conclusion
was to go with the ".jaxws-client/endpoint" suffices, so as to be
consistent with the HTTP config bean names.

I'm not too hung up on either approach (suffix or createFromAPI attr),
but I think it really does need to be consistent ... i.e. either all
beans change over to createFromAPI, or all go with the suffix, but not a
mixture of approaches (which would be a recipe for user confusion).


> As appending .jaxws-client to each ID seemed rather 
> redundant, I opted for choice #1. From here there were two choices:
> 1. Automatically change the id if abstract=true 2. Create 
> some other mechanism to automatically change the id - i.e.
> createdFromAPI = true
> 
> If we went with #1 this would break parent/child 
> relationships for the normal spring case ("why isn't my ID 
> what I specified it to be?!?!"). So I opted for solution #2.
> 
> createdFromAPI simply means that the user created that bean 
> using our APIs - i.e. Endpoint.publish or Service.getPort. If 
> you have better suggestions, I would welcome them - I asked 
> for some in my commit message.
> 
> I updated all the tests to use createdFromAPI and also all 
> the demos. the coloc demo was added after these changes, so I 
> did not review that one.


Well the coloc system test definitely pre-dated your merge, and then the
recently added coloc demo simply cloned the un-updated config from the
system test.

But no matter, it's a trivial change, which I'll commit now.

/Eoghan

 
> - Dan
> 
> On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
> >
> >
> >
> > Folks,
> >
> > After tearing my hair out for the last hour as to why some 
> > <jaxws:client> config seemed no longer to be working as before, it 
> > looks like the abstract="true" attribute on this element 
> needs to be 
> > replaced by createdFromAPI="true".
> >
> > What does createdFromAPI mean in this context? That the proxy is 
> > created via Service.getPort(), or?
> >
> > Also is this the only change required to restore the 
> previous semantics?
> >
> > Whoever made the change, probably a good idea to also update any 
> > system tests and/or demos that use this config, prior to 
> the release. 
> > A quick grep suggests this applies to the coloc demo and 
> system tests 
> > at least, maybe others too.
> >
> > Cheers,
> > Eoghan
> >
> >
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

Re: createdFromAPI attribute

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya,

In one of my previous commit messages I detailed this change and why it
needed to be done. In essence if you have a <jaxws:client> and a
<jaxws:endpoint> with the same id, they conflict. In essence there were two
solutions.

1. Change the bean definitions parsers to automatically append
".jaxws-client" and ".jaxws-endpoint" to the bean names
2. Force people to append those to the ID themselves.

As appending .jaxws-client to each ID seemed rather redundant, I opted for
choice #1. From here there were two choices:
1. Automatically change the id if abstract=true
2. Create some other mechanism to automatically change the id - i.e.
createdFromAPI = true

If we went with #1 this would break parent/child relationships for the
normal spring case ("why isn't my ID what I specified it to be?!?!"). So I
opted for solution #2.

createdFromAPI simply means that the user created that bean using our APIs -
i.e. Endpoint.publish or Service.getPort. If you have better suggestions, I
would welcome them - I asked for some in my commit message.

I updated all the tests to use createdFromAPI and also all the demos. the
coloc demo was added after these changes, so I did not review that one.

- Dan

On 4/24/07, Glynn, Eoghan <eo...@iona.com> wrote:
>
>
>
> Folks,
>
> After tearing my hair out for the last hour as to why some
> <jaxws:client> config seemed no longer to be working as before, it looks
> like the abstract="true" attribute on this element needs to be replaced
> by createdFromAPI="true".
>
> What does createdFromAPI mean in this context? That the proxy is created
> via Service.getPort(), or?
>
> Also is this the only change required to restore the previous semantics?
>
> Whoever made the change, probably a good idea to also update any system
> tests and/or demos that use this config, prior to the release. A quick
> grep suggests this applies to the coloc demo and system tests at least,
> maybe others too.
>
> Cheers,
> Eoghan
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog