[JBoss Web Services] - jar local wsdl access
by aodhan hoffman
aodhan hoffman [http://community.jboss.org/people/gryffin] created the discussion
"jar local wsdl access"
To view the discussion, visit: http://community.jboss.org/message/550465#550465
--------------------------------------------------------------
Morning friends. I've been fighting and hacking at trying to implement a web service client to read a local wsdl at runtime but it no matter how I try it, the I cannot seem to get a runtime defined WSDL location working. The wsdl is good, it compiles fine, and I can verify the path I'm giving it.
The primary challenge is that I cannot hardcode the final wsdl location into the web service because the remote web service and its WSDL are password protected. Since I cannot provide credentials at the time the service stub instantiates ( maybe there's a way, I don't know how ) I am trying to tell the service class to use a local wsdl within the deployed war, but this isn't working.
By comparison, I can access a local WSDL just fine when accessing the service within Eclipse using a static class with main().
The specific error JBoss gives me is:
2010-06-30 13:04:22,890 DEBUG [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) URL proto: vfszip
2010-06-30 13:04:22,890 DEBUG [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8)
---URL PATH: [/C:/jboss-5.1.0.GA/server/default/deploy/NetworkLocationService-STL4.war/WEB-INF/wsdl/AssetAPIService.wsdl]
2010-06-30 13:04:22,890 DEBUG [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) #*#
2010-06-30 13:04:22,890 DEBUG [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) assetApiService = new AssetAPIService( erl )
2010-06-30 13:04:23,108 WARN [org.jboss.util.xml.JBossEntityResolver] (http-127.0.0.1-8080-8) *Trying to resolve systemId as a non-file URL:* http://location.api.mobileview.aeroscout.com
2010-06-30 13:04:23,124 WARN [org.jboss.ws.core.utils.JBossWSEntityResolver] (http-127.0.0.1-8080-8) *Trying to resolve id as a non-file URL:* http://location.api.mobileview.aeroscout.com
2010-06-30 13:04:23,124 ERROR [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) #-!!!-#
2010-06-30 13:04:23,124 ERROR [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) Exception: null
2010-06-30 13:04:23,124 ERROR [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSEntityResolver.java:170)
2010-06-30 13:04:23,124 ERROR [com.boeing.ntpm.nls.api.ws.AssociationGet] (http-127.0.0.1-8080-8) org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:136)
...
The file path is entirely accurate, the file object says it doesn't exist I presume because it could not read the zipped WSDL. The protocol value for the URL object created by the returned file object is 'vfszip'. I see that the URL adds a parent '/' to it's own path, but I don't know if that's a problem or how to prevent it.
I don't know why the JBossEntityResolver is attempting to resolve a namespace as a URL and I can't tell where it's occuring.
Here's the representative code that leads to the error:
...
erl = AssociationGet.class.getClassLoader().getResource("./../wsdl/AssetAPIService.wsdl");
if ( null == erl ) { log.debug( "URL is NULL!!!" ); }
log.debug( "URL proto: " + erl.getProtocol());
log.debug( "\n---URL PATH: [" + erl.getPath() + "]" );
log.debug( "#*#" );
}
catch (Exception e)
{
log.error( "#!!!# ");
log.error( "Exception: " + e.getMessage() );
log.error( e.getStackTrace()[0] );
log.error( e.getStackTrace()[1] );
log.error( e.getStackTrace()[2] );
log.error( e.getStackTrace()[3] );
log.error( "#!!!#" );
throw new Exception("WSDL not found");
}
AssetAPIService assetApiService = null;
try
{
log.debug( "assetApiService = new AssetAPIService( erl )" );
assetApiService = new AssetAPIService( erl );
...
Here's the code for AssetAPIService( URL url ):
public AssetAPIService(URL wsdlLocation) {
super(
wsdlLocation,
new QName("http://service.api.mobileview.aeroscout.com", "AssetAPIService"));
}
So from the wsdl location "./../wsdl/AssetAPIService.wsdl" and a valid QName that says nothing of 'location', I'm getting an error about "Trying to resolve systemId as a non-file URL: http://location.api.mobileview.aeroscout.com http://location.api.mobileview.aeroscout.com".
Does anyone have any pointers on what I might be doing wrong, or any examples they can point to about how to refer to a local wsdl within a deployed war file at runtime? Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550465#550465]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[jBPM] - Memory leak in webapp ?
by Jaber C. Mourad
Jaber C. Mourad [http://community.jboss.org/people/newbeewan] created the discussion
"Memory leak in webapp ?"
To view the discussion, visit: http://community.jboss.org/message/550334#550334
--------------------------------------------------------------
Hi,
My configuration is JSF 1.2/Facelet/RichFaces/JBPM4.4 (it was the same with 4.3)/Spring 3
I'm trying to use the new tool deliver by tomcat to find leak particularly in classloader and it find some.
I have lot's of PermGen problems, every time I reloading my app, permgen and memory usage are increasing, and after 4 or 5 webapp deployement, the server crash with a OutOfMemoryException in the permGen...
I increase the permGen to 350Mb which very big and it only permit 1 or 2 more reload...
Is there any solution to help to unload more classes ?
I have created an application listener to close the processEngine at the end of the webApplicationContext and stop the dispatcher thread, it permit to reload the app, but there are always some permgen leaks !
Regards
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550334#550334]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months