cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Cannot find the declaration of element 'wsdl:definitions'
Date Wed, 25 Jul 2007 11:24:23 GMT
On Wednesday 25 July 2007 07:16, Benson Margulies wrote:
> Could some kind person explain what's going on with the jar files
> here? This manifest jar business is a new one on me. If we put a jar
> in the classpath with a MANIFEST.MF with a classpath, are the
> pathnames in the MANIFEST.MF interpreted relative to the path of the
> manifest jar? 

Yep.   It's a good way to reduce the size of the classpath.   Instead of 
having 50 jars on the classpath, the manifest jar allows just putting a 
single jar that references all the others.  For Windows with it's 
smaller classpath limit, this is kind of important.   

One note: the ClassPath entry in MANIFEST.MF can have entries to jars 
that don't exist.  That's fine.  We use this.   The manifest jar we have 
points at both the bundle jar and all the module jars.  However, you 
should use only the bundle jar or the modules.   This allows the same 
manifest jar to work with either setup.

> And why does it matter for the schemata? 

In theory, it shouldn't.  :-)

I haven't looked into it at all.  James will.   Most likely, there was a 
duplicate schema or similar in the module jars.   When the module jars 
were bundled together into the bundle jar,  the "wrong" one is ending up 
in the bundle.   Either that or we forgot to bundle the schemas into the 
bundle jar so they aren't there at all.


Dan


>
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: Wednesday, July 25, 2007 7:14 AM
> > To: cxf-user@incubator.apache.org
> > Cc: James Mao
> > Subject: Re: Cannot find the declaration of element
> > 'wsdl:definitions'
> >
> >
> > Wow.   Good catch.   I would have never thought about the bundle jar
> > being the issue.
> >
> > James: can you log a Jira so I can track it in the release notes?
> >
> > Dan
> >
> > On Wednesday 25 July 2007 05:05, James Mao wrote:
> > > Sorry, you do have the stacktrace attached
> > >
> > > And i can reproduce your problem now, it's caused by the bundle
> > > jar, some schemas can not be accessed from the bundle jar.
> > > And I'm sure, you're using the bundle jar
> > >
> > > humm... i'll try to fix this.
> > >
> > > The work around solution is to use the manifest jar, i.e move the
> > > bundle jar out of the lib directory, copy the jars in the modules
> > > to the lib
> > >
> > > You will get the correct result.
> > >
> > > Regards,
> > > James
> > >
> > > > Strange, i tried with the latest kit, the output is like this:
>
> C:\src\java\apache\cxf\distribution\target\apache-cxf-2.1-incubator-
>
> > > >SNAPSHOT\bin>wsdlvalidator -V HelloWorld.wsdl
> > > > wsdlvalidator -V HelloWorld.wsdl
> > > > wsdlvalidator - 2.1-incubator-SNAPSHOT
> > > >
> > > > Passed Validation : Valid WSDL
> > > >
> > > > It's a valid wsdl.
> > > >
> > > >
> > > > Can you turn on the verbose mode, and send us the stacktrace?
> > > >
> > > >
> > > > P.S
>
> C:\src\java\apache\cxf\distribution\target\apache-cxf-2.1-incubator-
>
> > > >SNAPSHOT\bin>java -version
> > > > java version "1.5.0_10"
> > > > Java(TM) 2 Runtime Environment, Standard Edition (build
> > > > 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03,
>
> mixed
>
> > > > mode, sharing)
> > > >
> > > >
> > > > Thanks,
> > > > James
> > > >
> > > >> I upgraded to snapshot 20070724 and I'm still getting the same
> > > >> error.
> > > >>
> > > >> I case it's some obscure incoding issue, I'm attaching the
> > > >> actual file (hoping the mailing list won't eat it).
> > > >> Also, I'm on a mac and java -version gives:
> > > >>
> > > >> java version "1.5.0_07"
> > > >> Java(TM) 2 Runtime Environment, Standard Edition (build
> > > >> 1.5.0_07-164) Java HotSpot(TM) Client VM (build 1.5.0_07-87,
>
> mixed
>
> > > >> mode, sharing)
> > > >>
> > > >> 2007/7/25, James Mao <james.mao@iona.com>:
> > > >>> I fixed a problem in the wsdlvalidator yesterday, should be
>
> fixed
>
> > > >>> in the
> > > >>> latest snapshot, try the latest one.
> > > >>>
> > > >>> Regards,
> > > >>> James
> > > >>>
> > > >>> > Hi,
> > > >>> >
> > > >>> > Using the (currently) latest snapshot, namely
> > > >>> > apache-cxf-2.1-incubator-20070720.011624-1(.zip).
> > > >>> >
> > > >>> > An error (see bellow) is produced when you expose the
>
> following
>
> > > >>> > WSDL file to the wsdlvalidator application:
> > > >>> >
> > > >>> > ================= The WSDL =====================
> > > >>> > <?xml version="1.0" encoding="UTF-8"?>
> > > >>> > <wsdl:definitions
> > > >>> >    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >>> >    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >>> >    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > >>> >    xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > >>> >    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > >>> >    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
> > > >>> >
> > > >>> >     <wsdl:message name="Msg">
> > > >>> >         <wsdl:part name="msg" type="xs:string"/>
> > > >>> >     </wsdl:message>
> > > >>> >     <wsdl:portType name="HelloWorldPort">
> > > >>> >         <wsdl:operation name="SayHello">
> > > >>> >             <wsdl:input message="Msg"/>
> > > >>> >             <wsdl:output message="Msg"/>
> > > >>> >         </wsdl:operation>
> > > >>> >     </wsdl:portType>
> > > >>> >     <wsdl:binding name="HelloWorldSOAP"
> > > >>> > type="HelloWorldPort"> <soap:binding style="rpc"
> > > >>> > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >>> >         <wsdl:operation name="SayHello">
> > > >>> >             <soap:operation
> > > >>> > soapAction="http://unwire.dk/SayHello"/> <wsdl:input>
> > > >>> >                 <soap:body use="literal"
> > > >>> > namespace="http://ws.unwire.dk/"/>
> > > >>> >             </wsdl:input>
> > > >>> >             <wsdl:output>
> > > >>> >                 <soap:body use="literal"
> > > >>> > namespace="http://ws.unwire.dk/"/>
> > > >>> >             </wsdl:output>
> > > >>> >         </wsdl:operation>
> > > >>> >     </wsdl:binding>
> > > >>> >     <wsdl:service name="HelloWorld">
> > > >>> >         <wsdl:port name="HelloWorldDev"
> > > >>> > binding="HelloWorldSOAP"> <soap:address
> > > >>> > location="http://localhost:8080/Services/HelloWorld"/>
> > > >>> >         </wsdl:port>
> > > >>> >     </wsdl:service>
> > > >>> > </wsdl:definitions>
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> > ================= The Error =====================
> > > >>> >
> > > >>> > wsdlvalidator -verbose
>
> /Users/vest/workspace/Service/src/main/resources/HelloWorld.wsdl
>
> > > >>> > wsdlvalidator - 2.1-incubator-SNAPSHOT
> > > >>> >
> > > >>> > WSDLValidator Error :
> > > >>> > line 8 column 56 of
>
> file:/Users/vest/workspace/Statistics2/src/main/resources/HelloWorld.w
>sd
>
> l:
> > > >>> > cvc-elt.1: Cannot find the declaration of element
> > > >>> > 'wsdl:definitions'.
> > > >>> >
> > > >>> > [+] Verbose turned on
> > > >>> >
> > > >>> > org.apache.cxf.tools.common.ToolException:
> > > >>> > line 8 column 56 of
>
> file:/Users/vest/workspace/Statistics2/src/main/resources/HelloWorld.w
>sd
>
> l:
> > > >>> > cvc-elt.1: Cannot find the declaration of element
> > > >>> > 'wsdl:definitions'. at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(S
>
> > > >>>chemaValidator.java:202)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(S
>
> > > >>>chemaValidator.java:118)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(Sc
>
> > > >>>hemaValidator.java:102)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WS
>
> > > >>>DL11Validator.java:113)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator
>
> > > >>>.java:65)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner
>
> > > >>>.java:83)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner
>
> > > >>>.java:52)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner
>
> > > >>>.java:39)
> > > >>>
> > > >>> >     at
>
> org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.ja
>
> > > >>>va:93)
> > > >>>
> > > >>> > Any idears? I honestly can't see what would be wrong with
my
> > > >>> > WSDL.
>
> -------------------------------------------------------------------
>
> > > >>-----
> > > >>
> > > >> <?xml version="1.0" encoding="UTF-8"?>
> > > >> <wsdl:definitions
> > > >>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >>     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > >>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > >>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > >>     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
> > > >>
> > > >>     <wsdl:message name="Msg">
> > > >>         <wsdl:part name="msg" type="xs:string"/>
> > > >>     </wsdl:message>
> > > >>     <wsdl:portType name="HelloWorldPort">
> > > >>         <wsdl:operation name="SayHello">
> > > >>             <wsdl:input message="Msg"/>
> > > >>             <wsdl:output message="Msg"/>
> > > >>         </wsdl:operation>
> > > >>     </wsdl:portType>
> > > >>     <wsdl:binding name="HelloWorldSOAP" type="HelloWorldPort">
> > > >>         <soap:binding style="rpc"
> > > >> transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >>         <wsdl:operation name="SayHello">
> > > >>             <soap:operation
> > > >> soapAction="http://unwire.dk/SayHello"/> <wsdl:input>
> > > >>                 <soap:body use="literal"
> > > >> namespace="http://ws.unwire.dk/"/>
> > > >>             </wsdl:input>
> > > >>             <wsdl:output>
> > > >>                 <soap:body use="literal"
> > > >> namespace="http://ws.unwire.dk/"/>
> > > >>             </wsdl:output>
> > > >>         </wsdl:operation>
> > > >>     </wsdl:binding>
> > > >>     <wsdl:service name="HelloWorld">
> > > >>         <wsdl:port name="HelloWorldDev"
> > > >> binding="HelloWorldSOAP"> <soap:address
> > > >> location="http://localhost:8080/Services/HelloWorld"/>
> > > >>         </wsdl:port>
> > > >>     </wsdl:service>
> > > >> </wsdl:definitions>
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message