Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityResolver cannot be specified for Webservice templates [SWS-692] #786

Closed
gregturn opened this issue Feb 14, 2011 · 4 comments
Closed

EntityResolver cannot be specified for Webservice templates [SWS-692] #786

gregturn opened this issue Feb 14, 2011 · 4 comments
Assignees

Comments

@gregturn
Copy link
Member

@gregturn gregturn commented Feb 14, 2011

Neil Stamps opened SWS-692 and commented

It is not possible to define an EntityResolver for webservice templates, resulting in failure of services with external public document references in closed environments (without internet).

A mechanism similar to the spring.schemas for webservice/http interfaces would seem a sensible addition to the spring framework. This would then not require an injection to be offered, but instead provides a generic entity resolver mechanism.


Reference URL: http://forum.springsource.org/showthread.php?t=103271

@gregturn
Copy link
Member Author

@gregturn gregturn commented Mar 24, 2011

Arjen Poutsma commented

Given that the WebServiceTemplate supports so many different XML APIs, it would be hard to pick one particular EntityResolver type. For instance, when using SAAJ, you're effectively using SAX/DOM (and org.xml.sax.EntityResolver), but when using Axiom, you use StAX.

@gregturn
Copy link
Member Author

@gregturn gregturn commented Mar 24, 2011

Neil Stamps commented

However - there is not even a standard mechanism to provide your own. I have had to extend the basic webservicetemplate to allow an entity resolver to be passed in.

@gregturn
Copy link
Member Author

@gregturn gregturn commented Mar 24, 2011

Arjen Poutsma commented

The point I was trying to make is that there is no common interface that I could use for providing such a mechanism. Each message factory (SAAJ vs Axiom) uses a different XML parsing API, and the entity resolution mechanisms they provide have nothing in common (SAAJ uses org.xml.sax.EntityResolver, while Axiom uses javax.xml.stream.XMLResolver). Since I am not a contributor to neither SAAJ nor Axiom, there is very little I can do about that.

Also, most of the classes in Spring (WS) are written with extension in mind. So the fact that you could extend WebServiceTemplate and provide your own custom fix to this problem is a good solution for me.

@gregturn
Copy link
Member Author

@gregturn gregturn commented May 4, 2012

Arjen Poutsma commented

Closing old issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.