Many many thanks Dan.

While I was trying to understand this stuff, I made some changes to the WSDL/code and I removed wsdlLocation in the wrong place, now I started from scratch and everything is fine!

I really appreciated your kind help.

Best regards,

Matteo

On 09/01/2013 16:55, Daniel Kulp wrote:
On Jan 9, 2013, at 10:23 AM, Pampolini Matteo <matteo.pampol...@selex-es.com> 
wrote:

Hi Dan,

I tried your suggestion but it does not work. I noticed that there are many 
"targetNamespace"
declarations with external URLs inside code annotations, what about them?
The targetnamespace things are just namespaces used for the element namespaces 
when the XML is created.  They should never be connected to anything.


But sorry if I insist,
why does gSOAP works perfectly without having to access the Internet?

BTW, may you please have a look at the WSDL file I cited to better understand 
my case?
I generated the code from the wsdl and the only thing that references the wsdl 
is the DeviceImpl.  If you remove the wsdlLocation attribute from there, then 
nothing would be referencing the wsdl and it should be starting up fine without 
hitting the internet.     I don't see any policies in there so the service 
should work fine.

Dan



Many thanks, Matteo

On 09/01/2013 15:49, Daniel Kulp wrote:
With CXF, if you set the wsdlLocation to null or an empty string, the 
Server/Client will likely work, although it will internally generate a new WSDL 
from the java classes.   However, that won't work for all cases.   If the WSDL 
contains things like policy statements and such that are required at runtime, 
CXF WILL need the WSDL to obtain those.   Also, things like schema facets and 
restrictions and such cannot be validated without the original wsdl/schema.

Dan



On Jan 9, 2013, at 9:05 AM, Pampolini Matteo <matteo.pampol...@selex-es.com> 
wrote:

Hello CXF folks and happy new year from Italy!

I posted a similar email some time ago, but though some kind replies, I'm still 
in trouble.

I need to develop a Web service from a third-party WSDL file that in turns 
imports other files.
I'm usingwsdl2java and everything seems fine, classes are generated and I can 
compile my
server application. However, at runtime I get an exception because CXF 
framework tries to
connect to the Internet through the BuildServiceFromWSDL function, but it fails 
because my
server needs to run on a private network without Internet access. Is there a 
way to avoid this?

Please note that:

1) There are many nested imports, so it is not feasible to download everything 
locally and create
Java classes from there.

2) The same works perfectly with C++ classes generated by gSOAP library, once 
the dependencies
are resolved at code-generation time the code is completely consistent.

May you please help me? Frankly speaking I cannot really understand why there's 
this kind of
need in CXF framework.

Many thanks in advance,

Matteo

--
Write once, compile everywhere
Compile once, run somewhere...


--
Write once, compile everywhere
Compile once, run somewhere...



--
Write once, compile everywhere
Compile once, run somewhere...

Reply via email to