On 2011-1-19, at 下午10:05, meteora28 wrote:


Thank you for your answers.

I am not sure if I am on the right way. I write down some more information
to explain.

When I want to run my application without an internet connection, I get the
following message:

INFO: Creating Service
{http://www.onvif.org/ver10/device/wsdl}DeviceService from class
org.onvif.ver10.device.wsdl.Device
Exception in thread "AWT-EventQueue-0"
org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative
to 'schema7.xsd'.
Well, you can download http://www.w3.org/2006/03/addressing/ws- addr.xsd before hand and save it locally, than you can use XML catalog, which can map a remote url to a local relative path file, this can avoid internet download during runtime, you just need a META- INF/jax-ws-catalog.xml on your classpath, you may need google lit bit to get more details how "XML catalog" works.

Btw, cxf use this way to avoid downloading some xsd files remotely even during build time. You can take a look at one previous commit[1], just see the "text changed" part and new added files, get some rough idea how to write your own jax-ws-catalog.xml.

[1]http://svn.apache.org/viewvc?view=revision&revision=1025804

Freeman

With an internet connection it works fine.

Here some more information.

I built a java client with wsdl to java from an existing wsdl. this worked only with cxf. no other framework could parse it because there is no service
element.

so I have to set the address and the service class in my code. this works
fine.

I think while this happens the prgramm is importing the ressources.

has any one an idea to import them before using the java code, for example
while using wsdl2java?


--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-without-internet-connection-tp3347755p3347889.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to