Steffen Krause [
https://community.jboss.org/people/kimba74] created the discussion
"Re: <jaxws:client> configuration not picked up from jbossws-cxf.xml"
To view the discussion, visit:
https://community.jboss.org/message/742675#742675
--------------------------------------------------------------
Alessio,
Yes, I do have a small sample application I used for testing and "debugging". I
can email it to you if you like.
Though I'm a huge fan of annotation based solutions, this is a case where I'm not
to fond of it. The reason, the moment you add annotations to your code you tie yourself
down to one stack implementation only, and in this case of Web Services, the actual
endpoint implementation will have to be aware of the additional classes. Since those
classes could be loaded dynamically at runtime there is no elegant way to propagate them
to the endpoint implementation.
*Use Case:*
* Project X creates a JAR file with an XSD, the corresponding JAXB classes, a WSDL
referencing afore mentioned XSD, and a SEI utilizing the JAXB classes and makes this JAR
available to other projects
* Project X's XSD specifies an "envelope" like structure with the envelops
"payload" element being declared abstract and meant for substitution
* Project A creates an XSD in which they extend the payload's type and create an
element "payloadA" that substitutes the "payload" element from the
main XSD
* Project A also creates the corresponding JAXB classes for their new XSD
* Project A now creates an endpoint implementing the SEI from Project X but expecting the
"payload" element of an incoming request to be "payloadA". Since
"payloadA" is never referenced in the WSDL the JAXBContext will not be able to
unmarshal the incoming request
Back to the annotations, in the above mentioned Use Case the annotation would absolutely
be a viable option. However, if you want to load a JAR containing let's say a
"payloadB" JAXB implementation at runtime because you might not have access to
the actual endpoint implementation you can not relay on the annotation alone. So if you do
introduce an annotation it would be great if this feature couldalso be used via external
configuration file. I do understand your motivation for moving away from the Spring
configuration file as you don't want to be depending on an additional framework just
for reading your config but I believe in a "specialized" case like this you
almost have no other choice unless you approach it via CDI.
Let me know where you want me to email you the example project to.
Thanks for looking into that,
Steffen
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/742675#742675]
Start a new discussion in JBoss Web Services at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]