[JBoss Web Services Users] - Re: OutOfMemory exception when loading xml schemas in WSDL
by wellerk
Still had issues with deploying complex hl7 webservice. Here is a patch to WSDL11Reader (version 3.1.1) that solved my HL7V3 issues:
| --- WSDL11Reader.java 2009-09-25 13:06:36.847867600 -0400
| +++ WSDL11Reader.java.new 2009-10-01 18:46:58.741045900 -0400
| @@ -145,6 +145,8 @@
|
| // Temporary files used by this reader.
| private List<File> tempFiles = new ArrayList<File>();
| + private Map<String, String> publocation = new HashMap<String, String>();
| + private List<String> published = new ArrayList<String>();
|
| // SWA handling
| private Map<QName, List<String>> skippedSWAParts = new HashMap<QName, List<String>>();
| @@ -423,7 +425,6 @@
| String localname = domElementClone.getLocalName();
| try
| {
| - List<URL> published = new LinkedList<URL>();
| if ("import".equals(localname))
| {
| processSchemaImport(destTypes, wsdlLoc, domElementClone, published);
| @@ -436,8 +437,8 @@
| {
| throw new IllegalArgumentException("Unsuported schema element: " + localname);
| }
| - published.clear();
| - published = null;
| +// published.clear();
| +// published = null;
| }
| catch (IOException e)
| {
| @@ -529,7 +530,7 @@
| }
| }
|
| - private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl, List<URL> published) throws IOException, WSDLException
| + private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl, List<String> published) throws IOException, WSDLException
| {
| if (wsdlLoc == null)
| throw new IllegalArgumentException("Cannot process import, parent location not set");
| @@ -542,16 +543,25 @@
|
| URL locationURL = getLocationURL(wsdlLoc, location);
| Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
| - if (!published.contains(locationURL))
| + if (!published.contains(locationURL.toExternalForm()))
| {
| - published.add(locationURL);
| + published.add(locationURL.toExternalForm());
| URL newloc = processSchemaInclude(types, locationURL, rootElement, published);
| - if (newloc != null)
| + if (newloc != null) {
| importEl.setAttribute("schemaLocation", newloc.toExternalForm());
| + publocation.put(locationURL.toExternalForm(), newloc.toExternalForm());
| + }
| + }
| + else {
| + if (publocation.containsKey(locationURL.toExternalForm())) {
| + if (publocation.get(locationURL.toExternalForm()) != null) {
| + importEl.setAttribute("schemaLocation", (String)publocation.get(locationURL));
| + }
| + }
| }
| }
|
| - private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl, List<URL> published) throws IOException, WSDLException
| + private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl, List<String> published) throws IOException, WSDLException
| {
| if (wsdlLoc == null)
| throw new IllegalArgumentException("Cannot process iclude, parent location not set");
| @@ -580,12 +590,21 @@
|
| URL locationURL = getLocationURL(wsdlLoc, location);
| Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
| - if (!published.contains(locationURL))
| + if (!published.contains(locationURL.toExternalForm()))
| {
| - published.add(locationURL);
| + published.add(locationURL.toExternalForm());
| URL newloc = processSchemaInclude(types, locationURL, rootElement, published);
| - if (newloc != null)
| + if (newloc != null) {
| includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
| + publocation.put(locationURL.toExternalForm(),newloc.toExternalForm());
| + }
| + }
| + else {
| + if (publocation.containsKey(locationURL.toExternalForm())) {
| + if (publocation.get(locationURL.toExternalForm()) != null) {
| + includeEl.setAttribute("schemaLocation", (String)publocation.get(locationURL));
| + }
| + }
| }
| }
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258296#4258296
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258296
16 years, 7 months
Re: [jboss-user] Server list empty in eclipse, cannot debug!
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=72512 Posted on behalf of a User
On the server settings page ( the one you are on before clicking "Open launch configuration") there is a box for Host name. Change this to "0.0.0.0". You'll see that your launch configuration is updated.
In Response To:
hello I run ganymede + jboss 5 up to date
I reinstalled a seam project from a damaged disk where there was ganymede and jboss 4.3
I'm stuck in developement since I can add and run jboss from eclipse server's view, but unfortunately I cannot add a new "debug configuration" or "run configuration" to launch my project with since there are no servers selectable in the list. The list is actually empty :(
I need to debug my application in broadcast mode (-b 0.0.0.0) and ther's no way I can set this parameter from within eclipse server view. I badly need back jboss in launch configuration. What do I miss?
I have all the jboss tools things installed but nothing changed apart having tje jboss server view (only lists the ports in use, but sitll empty run config listbox)
Thanks
Screenshot here...
http://img156.imageshack.us/my.php?image=screenshotld0.jpg
16 years, 7 months