You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Philippe Bossu <pb...@gmail.com> on 2013/05/10 11:03:48 UTC

wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Hello,
I am trying to use wsdlvalidator with the following command line options:
wsdlvalidator -s -V
http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl

I get this output:
wsdlvalidator -V -s
http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
wsdlvalidator - Apache CXF 2.7.4

[Fatal Error] :1:55: White spaces are required between publicId and
systemId.
WSDLValidator Error : org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.

[+] Verbose turned on

org.apache.cxf.tools.common.ToolException: org.xml.sax.SAXParseException:
White spaces are required between publicId and systemId.
at
org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
at
org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
at
org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
at
org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
at
org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
at org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
Caused by: org.xml.sax.SAXParseException: White spaces are required between
publicId and systemId.
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
at
org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
at
org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
... 8 more


Thanks for your help

My wsdl has no xsd imports:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="CustomerServiceService"

targetNamespace="http://customerservice.example.com/"

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

xmlns:tns="http://customerservice.example.com/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

  <wsdl:types>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
http://customerservice.example.com/"

attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://customerservice.example.com/">

  <xs:element name="getCustomerById" type="tns:getCustomerById"/>

  <xs:element name="getCustomerByIdResponse" type=
"tns:getCustomerByIdResponse"/>

  <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>

  <xs:element name="getCustomersByNameResponse" type=
"tns:getCustomersByNameResponse"/>

  <xs:complexType name="getCustomerById">

    <xs:sequence>

      <xs:element minOccurs="0" name="id" type="xs:string"/>

    </xs:sequence>

  </xs:complexType>

  <xs:complexType name="getCustomerByIdResponse">

    <xs:sequence>

      <xs:element minOccurs="0" name="return" type="tns:customer"/>

    </xs:sequence>

  </xs:complexType>

  <xs:complexType name="customer">

    <xs:sequence>

      <xs:element minOccurs="0" name="name" type="xs:string"/>

      <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
nillable="true" type="xs:string"/>

      <xs:element name="numOrders" type="xs:int"/>

      <xs:element name="revenue" type="xs:double"/>

      <xs:element minOccurs="0" name="test" type="xs:decimal"/>

      <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>

      <xs:element minOccurs="0" name="type" type="tns:customerType"/>

    </xs:sequence>

  </xs:complexType>

  <xs:complexType name="getCustomersByName">

    <xs:sequence>

      <xs:element minOccurs="0" name="name" type="xs:string"/>

    </xs:sequence>

  </xs:complexType>

  <xs:complexType name="getCustomersByNameResponse">

    <xs:sequence>

      <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type=
"tns:customer"/>

    </xs:sequence>

  </xs:complexType>

  <xs:simpleType name="customerType">

    <xs:restriction base="xs:string">

      <xs:enumeration value="PRIVATE"/>

      <xs:enumeration value="BUSINESS"/>

    </xs:restriction>

  </xs:simpleType>

  <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>

  <xs:complexType name="NoSuchCustomer">

    <xs:sequence>

      <xs:element name="customerName" nillable="true" type="xs:string"/>

    </xs:sequence>

  </xs:complexType>

</xs:schema>

  </wsdl:types>

  <wsdl:message name="getCustomersByNameResponse">

    <wsdl:part name="parameters" element="tns:getCustomersByNameResponse">

    </wsdl:part>

  </wsdl:message>

  <wsdl:message name="getCustomerById">

    <wsdl:part name="parameters" element="tns:getCustomerById">

    </wsdl:part>

  </wsdl:message>

  <wsdl:message name="getCustomersByName">

    <wsdl:part name="parameters" element="tns:getCustomersByName">

    </wsdl:part>

  </wsdl:message>

  <wsdl:message name="getCustomerByIdResponse">

    <wsdl:part name="parameters" element="tns:getCustomerByIdResponse">

    </wsdl:part>

  </wsdl:message>

  <wsdl:message name="NoSuchCustomerException">

    <wsdl:part name="NoSuchCustomerException" element="tns:NoSuchCustomer">

    </wsdl:part>

  </wsdl:message>

  <wsdl:portType name="CustomerService">

    <wsdl:operation name="getCustomerById">

      <wsdl:input name="getCustomerById" message="tns:getCustomerById">

    </wsdl:input>

      <wsdl:output name="getCustomerByIdResponse" message=
"tns:getCustomerByIdResponse">

    </wsdl:output>

      <wsdl:fault name="NoSuchCustomerException" message=
"tns:NoSuchCustomerException">

    </wsdl:fault>

    </wsdl:operation>

    <wsdl:operation name="getCustomersByName">

      <wsdl:input name="getCustomersByName" message="tns:getCustomersByName"
>

    </wsdl:input>

      <wsdl:output name="getCustomersByNameResponse" message=
"tns:getCustomersByNameResponse">

    </wsdl:output>

      <wsdl:fault name="NoSuchCustomerException" message=
"tns:NoSuchCustomerException">

    </wsdl:fault>

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
"tns:CustomerService">

    <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>

    <wsdl:operation name="getCustomerById">

      <soap:operation soapAction="" style="document"/>

      <wsdl:input name="getCustomerById">

        <soap:body use="literal"/>

      </wsdl:input>

      <wsdl:output name="getCustomerByIdResponse">

        <soap:body use="literal"/>

      </wsdl:output>

      <wsdl:fault name="NoSuchCustomerException">

        <soap:fault name="NoSuchCustomerException" use="literal"/>

      </wsdl:fault>

    </wsdl:operation>

    <wsdl:operation name="getCustomersByName">

      <soap:operation soapAction="" style="document"/>

      <wsdl:input name="getCustomersByName">

        <soap:body use="literal"/>

      </wsdl:input>

      <wsdl:output name="getCustomersByNameResponse">

        <soap:body use="literal"/>

      </wsdl:output>

      <wsdl:fault name="NoSuchCustomerException">

        <soap:fault name="NoSuchCustomerException" use="literal"/>

      </wsdl:fault>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="CustomerServiceService">

    <wsdl:port name="CustomerServicePort" binding=
"tns:CustomerServiceServiceSoapBinding">

      <soap:address location="http://localhost:9090/CustomerServicePort"/>

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Aki Yoshida <el...@gmail.com>.
2013/5/10 Philippe Bossu <pb...@gmail.com>

> Thanks Aki.
>
> Reading you I feel totally stupid :-)
>
> Although I followed stupidly part of documentation:
>
>    - http://cxf.apache.org/docs/wsdlvalidator.html
>
> Which shows an example that I find "misleading" for stupid guys like me :
>
>    - wsdlvalidator -s http://cxf.apache.org/schemas -s
>    http://mycompany/schemas Greeting.wsdl
>
>
aha. that's where it's coming from. It could be that this url used to
return a schema some years ago and in that case, it used to work.

we will update the page to avoid confusion.

thanks for spotting this.

regards, aki



>
>
> I must say I didn't understand the part and should have investigated this
> part:
>
>    - -s http://cxf.apache.org/schemas
>
>
> But now it's a bit clearer although I don't understand how to validate
> against WS-I rules
>
> I tried this which seems the most reasonable:
>
>    - wsdlvalidator -V -s
>
> http://cxf.apache.org/schemas/wsdl/wsdl.xsdsrc/main/resources/wsdl/CustomerService.wsdl
>
> it works.
>
> Anyway many thanks for your answers.
>
> Regards
>
> On Fri, May 10, 2013 at 3:58 PM, Aki Yoshida <el...@gmail.com> wrote:
>
> > 2013/5/10 Philippe Bossu <pb...@gmail.com>
> >
> > > Note I have searched on StackOverflow and in users mailing list, this
> > error
> > > is rather generic (not always related to CXF) and users mention it
> > happens
> > > when an included XSD is wrong or returns HTML but in my case I am not
> > > concerned as I am not using any external XSD.
> > >
> >
> > You are using the "-s" option to pull an external schema but the url
> passed
> > to this option is not a schema url but just a directory url. As a result,
> > you get an html directory listing page which can't be interpreted as a
> > valid xml document.
> >
> > I don't think CXF goes on the internet to grab the XSD used in its
> > > validation, and note I am not behind a proxy so it should not be an
> > issue.
> > >
> > > Note also this is not my real WSDL which included XSDs, but I
> simplified
> > it
> > > to see if issue was related.
> > >
> > > So for now I don't see what I am doing wrong here.
> > >
> > > In fact there is something not clear for me about how "-s
> > > http://cxf.apache.org/schemas" is  supposed to work, any explanation
> is
> > > welcome maybe it can help me fix my issue.
> > >
> > > Thanks for your help.
> > >
> > > On Fri, May 10, 2013 at 2:20 PM, Philippe Bossu <pb...@gmail.com>
> > wrote:
> > >
> > > > Hello,
> > > > Thanks for answer.
> > > >
> > > > The space was removed when copy pasting in mail, my comman is not:
> > > > wsdlvalidator -V -s
> > > >
> > >
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > > > but
> > > > wsdlvalidator -V -s http://cxf.apache.org/schemas
> > > >   src/main/resources/wsdl/CustomerService.wsdl
> > > >
> > > > Regards
> > > >
> > > > On Fri, May 10, 2013 at 2:17 PM, Aki Yoshida <el...@gmail.com>
> > wrote:
> > > >
> > > >> I think what you described in incomplete.
> > > >> You mention that you are using the "-s" option. So I suppose you are
> > > >> passing your extra schema to this option. And that schema has
> > something
> > > >> that is related to this error. Your wsdl itself is okay. You should
> be
> > > >> able
> > > >> to validate it directly as it has no external references.
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> 2013/5/10 Philippe Bossu <pb...@gmail.com>
> > > >>
> > > >> > Hello,
> > > >> > I am trying to use wsdlvalidator with the following command line
> > > >> options:
> > > >> > wsdlvalidator -s -V
> > > >> >
> > > >>
> > >
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > > >> >
> > > >> > I get this output:
> > > >> > wsdlvalidator -V -s
> > > >> >
> > > >>
> > >
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > > >> > wsdlvalidator - Apache CXF 2.7.4
> > > >> >
> > > >> > [Fatal Error] :1:55: White spaces are required between publicId
> and
> > > >> > systemId.
> > > >> > WSDLValidator Error : org.xml.sax.SAXParseException: White spaces
> > are
> > > >> > required between publicId and systemId.
> > > >> >
> > > >> > [+] Verbose turned on
> > > >> >
> > > >> > org.apache.cxf.tools.common.ToolException:
> > > >> org.xml.sax.SAXParseException:
> > > >> > White spaces are required between publicId and systemId.
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> > > >> > at
> > > >> >
> > > >>
> > >
> org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
> > > >> > Caused by: org.xml.sax.SAXParseException: White spaces are
> required
> > > >> between
> > > >> > publicId and systemId.
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> > > >> > at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
> > > >> > ... 8 more
> > > >> >
> > > >> >
> > > >> > Thanks for your help
> > > >> >
> > > >> > My wsdl has no xsd imports:
> > > >> >
> > > >> > <?xml version="1.0" encoding="UTF-8"?>
> > > >> >
> > > >> > <wsdl:definitions name="CustomerServiceService"
> > > >> >
> > > >> > targetNamespace="http://customerservice.example.com/"
> > > >> >
> > > >> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >> >
> > > >> > xmlns:tns="http://customerservice.example.com/"
> > > >> >
> > > >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > >> >
> > > >> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> > > >> >
> > > >> >   <wsdl:types>
> > > >> >
> > > >> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:tns="
> > > >> > http://customerservice.example.com/"
> > > >> >
> > > >> > attributeFormDefault="unqualified"
> elementFormDefault="unqualified"
> > > >> > targetNamespace="http://customerservice.example.com/">
> > > >> >
> > > >> >   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
> > > >> >
> > > >> >   <xs:element name="getCustomerByIdResponse" type=
> > > >> > "tns:getCustomerByIdResponse"/>
> > > >> >
> > > >> >   <xs:element name="getCustomersByName"
> > > type="tns:getCustomersByName"/>
> > > >> >
> > > >> >   <xs:element name="getCustomersByNameResponse" type=
> > > >> > "tns:getCustomersByNameResponse"/>
> > > >> >
> > > >> >   <xs:complexType name="getCustomerById">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="id" type="xs:string"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> >   <xs:complexType name="getCustomerByIdResponse">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="return"
> type="tns:customer"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> >   <xs:complexType name="customer">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> > > >> >
> > > >> >       <xs:element maxOccurs="unbounded" minOccurs="0"
> name="address"
> > > >> > nillable="true" type="xs:string"/>
> > > >> >
> > > >> >       <xs:element name="numOrders" type="xs:int"/>
> > > >> >
> > > >> >       <xs:element name="revenue" type="xs:double"/>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="birthDate"
> > type="xs:dateTime"/>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="type"
> > type="tns:customerType"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> >   <xs:complexType name="getCustomersByName">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> >   <xs:complexType name="getCustomersByNameResponse">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element maxOccurs="unbounded" minOccurs="0"
> name="return"
> > > >> type=
> > > >> > "tns:customer"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> >   <xs:simpleType name="customerType">
> > > >> >
> > > >> >     <xs:restriction base="xs:string">
> > > >> >
> > > >> >       <xs:enumeration value="PRIVATE"/>
> > > >> >
> > > >> >       <xs:enumeration value="BUSINESS"/>
> > > >> >
> > > >> >     </xs:restriction>
> > > >> >
> > > >> >   </xs:simpleType>
> > > >> >
> > > >> >   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
> > > >> >
> > > >> >   <xs:complexType name="NoSuchCustomer">
> > > >> >
> > > >> >     <xs:sequence>
> > > >> >
> > > >> >       <xs:element name="customerName" nillable="true"
> > > type="xs:string"/>
> > > >> >
> > > >> >     </xs:sequence>
> > > >> >
> > > >> >   </xs:complexType>
> > > >> >
> > > >> > </xs:schema>
> > > >> >
> > > >> >   </wsdl:types>
> > > >> >
> > > >> >   <wsdl:message name="getCustomersByNameResponse">
> > > >> >
> > > >> >     <wsdl:part name="parameters"
> > > >> element="tns:getCustomersByNameResponse">
> > > >> >
> > > >> >     </wsdl:part>
> > > >> >
> > > >> >   </wsdl:message>
> > > >> >
> > > >> >   <wsdl:message name="getCustomerById">
> > > >> >
> > > >> >     <wsdl:part name="parameters" element="tns:getCustomerById">
> > > >> >
> > > >> >     </wsdl:part>
> > > >> >
> > > >> >   </wsdl:message>
> > > >> >
> > > >> >   <wsdl:message name="getCustomersByName">
> > > >> >
> > > >> >     <wsdl:part name="parameters" element="tns:getCustomersByName">
> > > >> >
> > > >> >     </wsdl:part>
> > > >> >
> > > >> >   </wsdl:message>
> > > >> >
> > > >> >   <wsdl:message name="getCustomerByIdResponse">
> > > >> >
> > > >> >     <wsdl:part name="parameters"
> > > element="tns:getCustomerByIdResponse">
> > > >> >
> > > >> >     </wsdl:part>
> > > >> >
> > > >> >   </wsdl:message>
> > > >> >
> > > >> >   <wsdl:message name="NoSuchCustomerException">
> > > >> >
> > > >> >     <wsdl:part name="NoSuchCustomerException"
> > > >> element="tns:NoSuchCustomer">
> > > >> >
> > > >> >     </wsdl:part>
> > > >> >
> > > >> >   </wsdl:message>
> > > >> >
> > > >> >   <wsdl:portType name="CustomerService">
> > > >> >
> > > >> >     <wsdl:operation name="getCustomerById">
> > > >> >
> > > >> >       <wsdl:input name="getCustomerById"
> > > message="tns:getCustomerById">
> > > >> >
> > > >> >     </wsdl:input>
> > > >> >
> > > >> >       <wsdl:output name="getCustomerByIdResponse" message=
> > > >> > "tns:getCustomerByIdResponse">
> > > >> >
> > > >> >     </wsdl:output>
> > > >> >
> > > >> >       <wsdl:fault name="NoSuchCustomerException" message=
> > > >> > "tns:NoSuchCustomerException">
> > > >> >
> > > >> >     </wsdl:fault>
> > > >> >
> > > >> >     </wsdl:operation>
> > > >> >
> > > >> >     <wsdl:operation name="getCustomersByName">
> > > >> >
> > > >> >       <wsdl:input name="getCustomersByName"
> > > >> > message="tns:getCustomersByName"
> > > >> > >
> > > >> >
> > > >> >     </wsdl:input>
> > > >> >
> > > >> >       <wsdl:output name="getCustomersByNameResponse" message=
> > > >> > "tns:getCustomersByNameResponse">
> > > >> >
> > > >> >     </wsdl:output>
> > > >> >
> > > >> >       <wsdl:fault name="NoSuchCustomerException" message=
> > > >> > "tns:NoSuchCustomerException">
> > > >> >
> > > >> >     </wsdl:fault>
> > > >> >
> > > >> >     </wsdl:operation>
> > > >> >
> > > >> >   </wsdl:portType>
> > > >> >
> > > >> >   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
> > > >> > "tns:CustomerService">
> > > >> >
> > > >> >     <soap:binding style="document" transport="
> > > >> > http://schemas.xmlsoap.org/soap/http"/>
> > > >> >
> > > >> >     <wsdl:operation name="getCustomerById">
> > > >> >
> > > >> >       <soap:operation soapAction="" style="document"/>
> > > >> >
> > > >> >       <wsdl:input name="getCustomerById">
> > > >> >
> > > >> >         <soap:body use="literal"/>
> > > >> >
> > > >> >       </wsdl:input>
> > > >> >
> > > >> >       <wsdl:output name="getCustomerByIdResponse">
> > > >> >
> > > >> >         <soap:body use="literal"/>
> > > >> >
> > > >> >       </wsdl:output>
> > > >> >
> > > >> >       <wsdl:fault name="NoSuchCustomerException">
> > > >> >
> > > >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> > > >> >
> > > >> >       </wsdl:fault>
> > > >> >
> > > >> >     </wsdl:operation>
> > > >> >
> > > >> >     <wsdl:operation name="getCustomersByName">
> > > >> >
> > > >> >       <soap:operation soapAction="" style="document"/>
> > > >> >
> > > >> >       <wsdl:input name="getCustomersByName">
> > > >> >
> > > >> >         <soap:body use="literal"/>
> > > >> >
> > > >> >       </wsdl:input>
> > > >> >
> > > >> >       <wsdl:output name="getCustomersByNameResponse">
> > > >> >
> > > >> >         <soap:body use="literal"/>
> > > >> >
> > > >> >       </wsdl:output>
> > > >> >
> > > >> >       <wsdl:fault name="NoSuchCustomerException">
> > > >> >
> > > >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> > > >> >
> > > >> >       </wsdl:fault>
> > > >> >
> > > >> >     </wsdl:operation>
> > > >> >
> > > >> >   </wsdl:binding>
> > > >> >
> > > >> >   <wsdl:service name="CustomerServiceService">
> > > >> >
> > > >> >     <wsdl:port name="CustomerServicePort" binding=
> > > >> > "tns:CustomerServiceServiceSoapBinding">
> > > >> >
> > > >> >       <soap:address location="
> > > http://localhost:9090/CustomerServicePort
> > > >> "/>
> > > >> >
> > > >> >     </wsdl:port>
> > > >> >
> > > >> >   </wsdl:service>
> > > >> >
> > > >> > </wsdl:definitions>
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Philippe Bossu <pb...@gmail.com>.
Thanks Aki.

Reading you I feel totally stupid :-)

Although I followed stupidly part of documentation:

   - http://cxf.apache.org/docs/wsdlvalidator.html

Which shows an example that I find "misleading" for stupid guys like me :

   - wsdlvalidator -s http://cxf.apache.org/schemas -s
   http://mycompany/schemas Greeting.wsdl



I must say I didn't understand the part and should have investigated this
part:

   - -s http://cxf.apache.org/schemas


But now it's a bit clearer although I don't understand how to validate
against WS-I rules

I tried this which seems the most reasonable:

   - wsdlvalidator -V -s
http://cxf.apache.org/schemas/wsdl/wsdl.xsdsrc/main/resources/wsdl/CustomerService.wsdl

it works.

Anyway many thanks for your answers.

Regards

On Fri, May 10, 2013 at 3:58 PM, Aki Yoshida <el...@gmail.com> wrote:

> 2013/5/10 Philippe Bossu <pb...@gmail.com>
>
> > Note I have searched on StackOverflow and in users mailing list, this
> error
> > is rather generic (not always related to CXF) and users mention it
> happens
> > when an included XSD is wrong or returns HTML but in my case I am not
> > concerned as I am not using any external XSD.
> >
>
> You are using the "-s" option to pull an external schema but the url passed
> to this option is not a schema url but just a directory url. As a result,
> you get an html directory listing page which can't be interpreted as a
> valid xml document.
>
> I don't think CXF goes on the internet to grab the XSD used in its
> > validation, and note I am not behind a proxy so it should not be an
> issue.
> >
> > Note also this is not my real WSDL which included XSDs, but I simplified
> it
> > to see if issue was related.
> >
> > So for now I don't see what I am doing wrong here.
> >
> > In fact there is something not clear for me about how "-s
> > http://cxf.apache.org/schemas" is  supposed to work, any explanation is
> > welcome maybe it can help me fix my issue.
> >
> > Thanks for your help.
> >
> > On Fri, May 10, 2013 at 2:20 PM, Philippe Bossu <pb...@gmail.com>
> wrote:
> >
> > > Hello,
> > > Thanks for answer.
> > >
> > > The space was removed when copy pasting in mail, my comman is not:
> > > wsdlvalidator -V -s
> > >
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > > but
> > > wsdlvalidator -V -s http://cxf.apache.org/schemas
> > >   src/main/resources/wsdl/CustomerService.wsdl
> > >
> > > Regards
> > >
> > > On Fri, May 10, 2013 at 2:17 PM, Aki Yoshida <el...@gmail.com>
> wrote:
> > >
> > >> I think what you described in incomplete.
> > >> You mention that you are using the "-s" option. So I suppose you are
> > >> passing your extra schema to this option. And that schema has
> something
> > >> that is related to this error. Your wsdl itself is okay. You should be
> > >> able
> > >> to validate it directly as it has no external references.
> > >>
> > >>
> > >>
> > >>
> > >> 2013/5/10 Philippe Bossu <pb...@gmail.com>
> > >>
> > >> > Hello,
> > >> > I am trying to use wsdlvalidator with the following command line
> > >> options:
> > >> > wsdlvalidator -s -V
> > >> >
> > >>
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > >> >
> > >> > I get this output:
> > >> > wsdlvalidator -V -s
> > >> >
> > >>
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > >> > wsdlvalidator - Apache CXF 2.7.4
> > >> >
> > >> > [Fatal Error] :1:55: White spaces are required between publicId and
> > >> > systemId.
> > >> > WSDLValidator Error : org.xml.sax.SAXParseException: White spaces
> are
> > >> > required between publicId and systemId.
> > >> >
> > >> > [+] Verbose turned on
> > >> >
> > >> > org.apache.cxf.tools.common.ToolException:
> > >> org.xml.sax.SAXParseException:
> > >> > White spaces are required between publicId and systemId.
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
> > >> > at
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> > >> > at
> > >> >
> > >>
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> > >> > at
> > >> >
> > >>
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> > >> > at
> > >> >
> > >>
> > org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
> > >> > Caused by: org.xml.sax.SAXParseException: White spaces are required
> > >> between
> > >> > publicId and systemId.
> > >> > at
> > >> >
> > >> >
> > >>
> >
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> > >> > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
> > >> > at
> > >> >
> > >> >
> > >>
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
> > >> > ... 8 more
> > >> >
> > >> >
> > >> > Thanks for your help
> > >> >
> > >> > My wsdl has no xsd imports:
> > >> >
> > >> > <?xml version="1.0" encoding="UTF-8"?>
> > >> >
> > >> > <wsdl:definitions name="CustomerServiceService"
> > >> >
> > >> > targetNamespace="http://customerservice.example.com/"
> > >> >
> > >> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >> >
> > >> > xmlns:tns="http://customerservice.example.com/"
> > >> >
> > >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > >> >
> > >> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> > >> >
> > >> >   <wsdl:types>
> > >> >
> > >> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
> > >> > http://customerservice.example.com/"
> > >> >
> > >> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
> > >> > targetNamespace="http://customerservice.example.com/">
> > >> >
> > >> >   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
> > >> >
> > >> >   <xs:element name="getCustomerByIdResponse" type=
> > >> > "tns:getCustomerByIdResponse"/>
> > >> >
> > >> >   <xs:element name="getCustomersByName"
> > type="tns:getCustomersByName"/>
> > >> >
> > >> >   <xs:element name="getCustomersByNameResponse" type=
> > >> > "tns:getCustomersByNameResponse"/>
> > >> >
> > >> >   <xs:complexType name="getCustomerById">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element minOccurs="0" name="id" type="xs:string"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> >   <xs:complexType name="getCustomerByIdResponse">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element minOccurs="0" name="return" type="tns:customer"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> >   <xs:complexType name="customer">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> > >> >
> > >> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
> > >> > nillable="true" type="xs:string"/>
> > >> >
> > >> >       <xs:element name="numOrders" type="xs:int"/>
> > >> >
> > >> >       <xs:element name="revenue" type="xs:double"/>
> > >> >
> > >> >       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
> > >> >
> > >> >       <xs:element minOccurs="0" name="birthDate"
> type="xs:dateTime"/>
> > >> >
> > >> >       <xs:element minOccurs="0" name="type"
> type="tns:customerType"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> >   <xs:complexType name="getCustomersByName">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> >   <xs:complexType name="getCustomersByNameResponse">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="return"
> > >> type=
> > >> > "tns:customer"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> >   <xs:simpleType name="customerType">
> > >> >
> > >> >     <xs:restriction base="xs:string">
> > >> >
> > >> >       <xs:enumeration value="PRIVATE"/>
> > >> >
> > >> >       <xs:enumeration value="BUSINESS"/>
> > >> >
> > >> >     </xs:restriction>
> > >> >
> > >> >   </xs:simpleType>
> > >> >
> > >> >   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
> > >> >
> > >> >   <xs:complexType name="NoSuchCustomer">
> > >> >
> > >> >     <xs:sequence>
> > >> >
> > >> >       <xs:element name="customerName" nillable="true"
> > type="xs:string"/>
> > >> >
> > >> >     </xs:sequence>
> > >> >
> > >> >   </xs:complexType>
> > >> >
> > >> > </xs:schema>
> > >> >
> > >> >   </wsdl:types>
> > >> >
> > >> >   <wsdl:message name="getCustomersByNameResponse">
> > >> >
> > >> >     <wsdl:part name="parameters"
> > >> element="tns:getCustomersByNameResponse">
> > >> >
> > >> >     </wsdl:part>
> > >> >
> > >> >   </wsdl:message>
> > >> >
> > >> >   <wsdl:message name="getCustomerById">
> > >> >
> > >> >     <wsdl:part name="parameters" element="tns:getCustomerById">
> > >> >
> > >> >     </wsdl:part>
> > >> >
> > >> >   </wsdl:message>
> > >> >
> > >> >   <wsdl:message name="getCustomersByName">
> > >> >
> > >> >     <wsdl:part name="parameters" element="tns:getCustomersByName">
> > >> >
> > >> >     </wsdl:part>
> > >> >
> > >> >   </wsdl:message>
> > >> >
> > >> >   <wsdl:message name="getCustomerByIdResponse">
> > >> >
> > >> >     <wsdl:part name="parameters"
> > element="tns:getCustomerByIdResponse">
> > >> >
> > >> >     </wsdl:part>
> > >> >
> > >> >   </wsdl:message>
> > >> >
> > >> >   <wsdl:message name="NoSuchCustomerException">
> > >> >
> > >> >     <wsdl:part name="NoSuchCustomerException"
> > >> element="tns:NoSuchCustomer">
> > >> >
> > >> >     </wsdl:part>
> > >> >
> > >> >   </wsdl:message>
> > >> >
> > >> >   <wsdl:portType name="CustomerService">
> > >> >
> > >> >     <wsdl:operation name="getCustomerById">
> > >> >
> > >> >       <wsdl:input name="getCustomerById"
> > message="tns:getCustomerById">
> > >> >
> > >> >     </wsdl:input>
> > >> >
> > >> >       <wsdl:output name="getCustomerByIdResponse" message=
> > >> > "tns:getCustomerByIdResponse">
> > >> >
> > >> >     </wsdl:output>
> > >> >
> > >> >       <wsdl:fault name="NoSuchCustomerException" message=
> > >> > "tns:NoSuchCustomerException">
> > >> >
> > >> >     </wsdl:fault>
> > >> >
> > >> >     </wsdl:operation>
> > >> >
> > >> >     <wsdl:operation name="getCustomersByName">
> > >> >
> > >> >       <wsdl:input name="getCustomersByName"
> > >> > message="tns:getCustomersByName"
> > >> > >
> > >> >
> > >> >     </wsdl:input>
> > >> >
> > >> >       <wsdl:output name="getCustomersByNameResponse" message=
> > >> > "tns:getCustomersByNameResponse">
> > >> >
> > >> >     </wsdl:output>
> > >> >
> > >> >       <wsdl:fault name="NoSuchCustomerException" message=
> > >> > "tns:NoSuchCustomerException">
> > >> >
> > >> >     </wsdl:fault>
> > >> >
> > >> >     </wsdl:operation>
> > >> >
> > >> >   </wsdl:portType>
> > >> >
> > >> >   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
> > >> > "tns:CustomerService">
> > >> >
> > >> >     <soap:binding style="document" transport="
> > >> > http://schemas.xmlsoap.org/soap/http"/>
> > >> >
> > >> >     <wsdl:operation name="getCustomerById">
> > >> >
> > >> >       <soap:operation soapAction="" style="document"/>
> > >> >
> > >> >       <wsdl:input name="getCustomerById">
> > >> >
> > >> >         <soap:body use="literal"/>
> > >> >
> > >> >       </wsdl:input>
> > >> >
> > >> >       <wsdl:output name="getCustomerByIdResponse">
> > >> >
> > >> >         <soap:body use="literal"/>
> > >> >
> > >> >       </wsdl:output>
> > >> >
> > >> >       <wsdl:fault name="NoSuchCustomerException">
> > >> >
> > >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> > >> >
> > >> >       </wsdl:fault>
> > >> >
> > >> >     </wsdl:operation>
> > >> >
> > >> >     <wsdl:operation name="getCustomersByName">
> > >> >
> > >> >       <soap:operation soapAction="" style="document"/>
> > >> >
> > >> >       <wsdl:input name="getCustomersByName">
> > >> >
> > >> >         <soap:body use="literal"/>
> > >> >
> > >> >       </wsdl:input>
> > >> >
> > >> >       <wsdl:output name="getCustomersByNameResponse">
> > >> >
> > >> >         <soap:body use="literal"/>
> > >> >
> > >> >       </wsdl:output>
> > >> >
> > >> >       <wsdl:fault name="NoSuchCustomerException">
> > >> >
> > >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> > >> >
> > >> >       </wsdl:fault>
> > >> >
> > >> >     </wsdl:operation>
> > >> >
> > >> >   </wsdl:binding>
> > >> >
> > >> >   <wsdl:service name="CustomerServiceService">
> > >> >
> > >> >     <wsdl:port name="CustomerServicePort" binding=
> > >> > "tns:CustomerServiceServiceSoapBinding">
> > >> >
> > >> >       <soap:address location="
> > http://localhost:9090/CustomerServicePort
> > >> "/>
> > >> >
> > >> >     </wsdl:port>
> > >> >
> > >> >   </wsdl:service>
> > >> >
> > >> > </wsdl:definitions>
> > >> >
> > >>
> > >
> > >
> >
>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Aki Yoshida <el...@gmail.com>.
2013/5/10 Philippe Bossu <pb...@gmail.com>

> Note I have searched on StackOverflow and in users mailing list, this error
> is rather generic (not always related to CXF) and users mention it happens
> when an included XSD is wrong or returns HTML but in my case I am not
> concerned as I am not using any external XSD.
>

You are using the "-s" option to pull an external schema but the url passed
to this option is not a schema url but just a directory url. As a result,
you get an html directory listing page which can't be interpreted as a
valid xml document.

I don't think CXF goes on the internet to grab the XSD used in its
> validation, and note I am not behind a proxy so it should not be an issue.
>
> Note also this is not my real WSDL which included XSDs, but I simplified it
> to see if issue was related.
>
> So for now I don't see what I am doing wrong here.
>
> In fact there is something not clear for me about how "-s
> http://cxf.apache.org/schemas" is  supposed to work, any explanation is
> welcome maybe it can help me fix my issue.
>
> Thanks for your help.
>
> On Fri, May 10, 2013 at 2:20 PM, Philippe Bossu <pb...@gmail.com> wrote:
>
> > Hello,
> > Thanks for answer.
> >
> > The space was removed when copy pasting in mail, my comman is not:
> > wsdlvalidator -V -s
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > but
> > wsdlvalidator -V -s http://cxf.apache.org/schemas
> >   src/main/resources/wsdl/CustomerService.wsdl
> >
> > Regards
> >
> > On Fri, May 10, 2013 at 2:17 PM, Aki Yoshida <el...@gmail.com> wrote:
> >
> >> I think what you described in incomplete.
> >> You mention that you are using the "-s" option. So I suppose you are
> >> passing your extra schema to this option. And that schema has something
> >> that is related to this error. Your wsdl itself is okay. You should be
> >> able
> >> to validate it directly as it has no external references.
> >>
> >>
> >>
> >>
> >> 2013/5/10 Philippe Bossu <pb...@gmail.com>
> >>
> >> > Hello,
> >> > I am trying to use wsdlvalidator with the following command line
> >> options:
> >> > wsdlvalidator -s -V
> >> >
> >>
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> >> >
> >> > I get this output:
> >> > wsdlvalidator -V -s
> >> >
> >>
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> >> > wsdlvalidator - Apache CXF 2.7.4
> >> >
> >> > [Fatal Error] :1:55: White spaces are required between publicId and
> >> > systemId.
> >> > WSDLValidator Error : org.xml.sax.SAXParseException: White spaces are
> >> > required between publicId and systemId.
> >> >
> >> > [+] Verbose turned on
> >> >
> >> > org.apache.cxf.tools.common.ToolException:
> >> org.xml.sax.SAXParseException:
> >> > White spaces are required between publicId and systemId.
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
> >> > at
> >> >
> >>
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> >> > at
> >> >
> >>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> >> > at
> >> >
> >>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> >> > at
> >> >
> >>
> org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
> >> > Caused by: org.xml.sax.SAXParseException: White spaces are required
> >> between
> >> > publicId and systemId.
> >> > at
> >> >
> >> >
> >>
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> >> > at
> >> >
> >> >
> >>
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> >> > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
> >> > at
> >> >
> >> >
> >>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
> >> > ... 8 more
> >> >
> >> >
> >> > Thanks for your help
> >> >
> >> > My wsdl has no xsd imports:
> >> >
> >> > <?xml version="1.0" encoding="UTF-8"?>
> >> >
> >> > <wsdl:definitions name="CustomerServiceService"
> >> >
> >> > targetNamespace="http://customerservice.example.com/"
> >> >
> >> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >> >
> >> > xmlns:tns="http://customerservice.example.com/"
> >> >
> >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >> >
> >> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> >> >
> >> >   <wsdl:types>
> >> >
> >> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
> >> > http://customerservice.example.com/"
> >> >
> >> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
> >> > targetNamespace="http://customerservice.example.com/">
> >> >
> >> >   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
> >> >
> >> >   <xs:element name="getCustomerByIdResponse" type=
> >> > "tns:getCustomerByIdResponse"/>
> >> >
> >> >   <xs:element name="getCustomersByName"
> type="tns:getCustomersByName"/>
> >> >
> >> >   <xs:element name="getCustomersByNameResponse" type=
> >> > "tns:getCustomersByNameResponse"/>
> >> >
> >> >   <xs:complexType name="getCustomerById">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element minOccurs="0" name="id" type="xs:string"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> >   <xs:complexType name="getCustomerByIdResponse">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element minOccurs="0" name="return" type="tns:customer"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> >   <xs:complexType name="customer">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> >> >
> >> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
> >> > nillable="true" type="xs:string"/>
> >> >
> >> >       <xs:element name="numOrders" type="xs:int"/>
> >> >
> >> >       <xs:element name="revenue" type="xs:double"/>
> >> >
> >> >       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
> >> >
> >> >       <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
> >> >
> >> >       <xs:element minOccurs="0" name="type" type="tns:customerType"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> >   <xs:complexType name="getCustomersByName">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> >   <xs:complexType name="getCustomersByNameResponse">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="return"
> >> type=
> >> > "tns:customer"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> >   <xs:simpleType name="customerType">
> >> >
> >> >     <xs:restriction base="xs:string">
> >> >
> >> >       <xs:enumeration value="PRIVATE"/>
> >> >
> >> >       <xs:enumeration value="BUSINESS"/>
> >> >
> >> >     </xs:restriction>
> >> >
> >> >   </xs:simpleType>
> >> >
> >> >   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
> >> >
> >> >   <xs:complexType name="NoSuchCustomer">
> >> >
> >> >     <xs:sequence>
> >> >
> >> >       <xs:element name="customerName" nillable="true"
> type="xs:string"/>
> >> >
> >> >     </xs:sequence>
> >> >
> >> >   </xs:complexType>
> >> >
> >> > </xs:schema>
> >> >
> >> >   </wsdl:types>
> >> >
> >> >   <wsdl:message name="getCustomersByNameResponse">
> >> >
> >> >     <wsdl:part name="parameters"
> >> element="tns:getCustomersByNameResponse">
> >> >
> >> >     </wsdl:part>
> >> >
> >> >   </wsdl:message>
> >> >
> >> >   <wsdl:message name="getCustomerById">
> >> >
> >> >     <wsdl:part name="parameters" element="tns:getCustomerById">
> >> >
> >> >     </wsdl:part>
> >> >
> >> >   </wsdl:message>
> >> >
> >> >   <wsdl:message name="getCustomersByName">
> >> >
> >> >     <wsdl:part name="parameters" element="tns:getCustomersByName">
> >> >
> >> >     </wsdl:part>
> >> >
> >> >   </wsdl:message>
> >> >
> >> >   <wsdl:message name="getCustomerByIdResponse">
> >> >
> >> >     <wsdl:part name="parameters"
> element="tns:getCustomerByIdResponse">
> >> >
> >> >     </wsdl:part>
> >> >
> >> >   </wsdl:message>
> >> >
> >> >   <wsdl:message name="NoSuchCustomerException">
> >> >
> >> >     <wsdl:part name="NoSuchCustomerException"
> >> element="tns:NoSuchCustomer">
> >> >
> >> >     </wsdl:part>
> >> >
> >> >   </wsdl:message>
> >> >
> >> >   <wsdl:portType name="CustomerService">
> >> >
> >> >     <wsdl:operation name="getCustomerById">
> >> >
> >> >       <wsdl:input name="getCustomerById"
> message="tns:getCustomerById">
> >> >
> >> >     </wsdl:input>
> >> >
> >> >       <wsdl:output name="getCustomerByIdResponse" message=
> >> > "tns:getCustomerByIdResponse">
> >> >
> >> >     </wsdl:output>
> >> >
> >> >       <wsdl:fault name="NoSuchCustomerException" message=
> >> > "tns:NoSuchCustomerException">
> >> >
> >> >     </wsdl:fault>
> >> >
> >> >     </wsdl:operation>
> >> >
> >> >     <wsdl:operation name="getCustomersByName">
> >> >
> >> >       <wsdl:input name="getCustomersByName"
> >> > message="tns:getCustomersByName"
> >> > >
> >> >
> >> >     </wsdl:input>
> >> >
> >> >       <wsdl:output name="getCustomersByNameResponse" message=
> >> > "tns:getCustomersByNameResponse">
> >> >
> >> >     </wsdl:output>
> >> >
> >> >       <wsdl:fault name="NoSuchCustomerException" message=
> >> > "tns:NoSuchCustomerException">
> >> >
> >> >     </wsdl:fault>
> >> >
> >> >     </wsdl:operation>
> >> >
> >> >   </wsdl:portType>
> >> >
> >> >   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
> >> > "tns:CustomerService">
> >> >
> >> >     <soap:binding style="document" transport="
> >> > http://schemas.xmlsoap.org/soap/http"/>
> >> >
> >> >     <wsdl:operation name="getCustomerById">
> >> >
> >> >       <soap:operation soapAction="" style="document"/>
> >> >
> >> >       <wsdl:input name="getCustomerById">
> >> >
> >> >         <soap:body use="literal"/>
> >> >
> >> >       </wsdl:input>
> >> >
> >> >       <wsdl:output name="getCustomerByIdResponse">
> >> >
> >> >         <soap:body use="literal"/>
> >> >
> >> >       </wsdl:output>
> >> >
> >> >       <wsdl:fault name="NoSuchCustomerException">
> >> >
> >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> >> >
> >> >       </wsdl:fault>
> >> >
> >> >     </wsdl:operation>
> >> >
> >> >     <wsdl:operation name="getCustomersByName">
> >> >
> >> >       <soap:operation soapAction="" style="document"/>
> >> >
> >> >       <wsdl:input name="getCustomersByName">
> >> >
> >> >         <soap:body use="literal"/>
> >> >
> >> >       </wsdl:input>
> >> >
> >> >       <wsdl:output name="getCustomersByNameResponse">
> >> >
> >> >         <soap:body use="literal"/>
> >> >
> >> >       </wsdl:output>
> >> >
> >> >       <wsdl:fault name="NoSuchCustomerException">
> >> >
> >> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> >> >
> >> >       </wsdl:fault>
> >> >
> >> >     </wsdl:operation>
> >> >
> >> >   </wsdl:binding>
> >> >
> >> >   <wsdl:service name="CustomerServiceService">
> >> >
> >> >     <wsdl:port name="CustomerServicePort" binding=
> >> > "tns:CustomerServiceServiceSoapBinding">
> >> >
> >> >       <soap:address location="
> http://localhost:9090/CustomerServicePort
> >> "/>
> >> >
> >> >     </wsdl:port>
> >> >
> >> >   </wsdl:service>
> >> >
> >> > </wsdl:definitions>
> >> >
> >>
> >
> >
>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Philippe Bossu <pb...@gmail.com>.
Note I have searched on StackOverflow and in users mailing list, this error
is rather generic (not always related to CXF) and users mention it happens
when an included XSD is wrong or returns HTML but in my case I am not
concerned as I am not using any external XSD.
I don't think CXF goes on the internet to grab the XSD used in its
validation, and note I am not behind a proxy so it should not be an issue.

Note also this is not my real WSDL which included XSDs, but I simplified it
to see if issue was related.

So for now I don't see what I am doing wrong here.

In fact there is something not clear for me about how "-s
http://cxf.apache.org/schemas" is  supposed to work, any explanation is
welcome maybe it can help me fix my issue.

Thanks for your help.

On Fri, May 10, 2013 at 2:20 PM, Philippe Bossu <pb...@gmail.com> wrote:

> Hello,
> Thanks for answer.
>
> The space was removed when copy pasting in mail, my comman is not:
> wsdlvalidator -V -s
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> but
> wsdlvalidator -V -s http://cxf.apache.org/schemas
>   src/main/resources/wsdl/CustomerService.wsdl
>
> Regards
>
> On Fri, May 10, 2013 at 2:17 PM, Aki Yoshida <el...@gmail.com> wrote:
>
>> I think what you described in incomplete.
>> You mention that you are using the "-s" option. So I suppose you are
>> passing your extra schema to this option. And that schema has something
>> that is related to this error. Your wsdl itself is okay. You should be
>> able
>> to validate it directly as it has no external references.
>>
>>
>>
>>
>> 2013/5/10 Philippe Bossu <pb...@gmail.com>
>>
>> > Hello,
>> > I am trying to use wsdlvalidator with the following command line
>> options:
>> > wsdlvalidator -s -V
>> >
>> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
>> >
>> > I get this output:
>> > wsdlvalidator -V -s
>> >
>> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
>> > wsdlvalidator - Apache CXF 2.7.4
>> >
>> > [Fatal Error] :1:55: White spaces are required between publicId and
>> > systemId.
>> > WSDLValidator Error : org.xml.sax.SAXParseException: White spaces are
>> > required between publicId and systemId.
>> >
>> > [+] Verbose turned on
>> >
>> > org.apache.cxf.tools.common.ToolException:
>> org.xml.sax.SAXParseException:
>> > White spaces are required between publicId and systemId.
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
>> > at
>> >
>> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
>> > at
>> >
>> >
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
>> > at
>> >
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
>> > at
>> >
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
>> > at
>> >
>> org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
>> > Caused by: org.xml.sax.SAXParseException: White spaces are required
>> between
>> > publicId and systemId.
>> > at
>> >
>> >
>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
>> > at
>> >
>> >
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
>> > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
>> > at
>> >
>> >
>> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
>> > ... 8 more
>> >
>> >
>> > Thanks for your help
>> >
>> > My wsdl has no xsd imports:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> >
>> > <wsdl:definitions name="CustomerServiceService"
>> >
>> > targetNamespace="http://customerservice.example.com/"
>> >
>> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> >
>> > xmlns:tns="http://customerservice.example.com/"
>> >
>> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> >
>> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>> >
>> >   <wsdl:types>
>> >
>> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
>> > http://customerservice.example.com/"
>> >
>> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
>> > targetNamespace="http://customerservice.example.com/">
>> >
>> >   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
>> >
>> >   <xs:element name="getCustomerByIdResponse" type=
>> > "tns:getCustomerByIdResponse"/>
>> >
>> >   <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>
>> >
>> >   <xs:element name="getCustomersByNameResponse" type=
>> > "tns:getCustomersByNameResponse"/>
>> >
>> >   <xs:complexType name="getCustomerById">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element minOccurs="0" name="id" type="xs:string"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> >   <xs:complexType name="getCustomerByIdResponse">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element minOccurs="0" name="return" type="tns:customer"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> >   <xs:complexType name="customer">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
>> >
>> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
>> > nillable="true" type="xs:string"/>
>> >
>> >       <xs:element name="numOrders" type="xs:int"/>
>> >
>> >       <xs:element name="revenue" type="xs:double"/>
>> >
>> >       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
>> >
>> >       <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
>> >
>> >       <xs:element minOccurs="0" name="type" type="tns:customerType"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> >   <xs:complexType name="getCustomersByName">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> >   <xs:complexType name="getCustomersByNameResponse">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="return"
>> type=
>> > "tns:customer"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> >   <xs:simpleType name="customerType">
>> >
>> >     <xs:restriction base="xs:string">
>> >
>> >       <xs:enumeration value="PRIVATE"/>
>> >
>> >       <xs:enumeration value="BUSINESS"/>
>> >
>> >     </xs:restriction>
>> >
>> >   </xs:simpleType>
>> >
>> >   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
>> >
>> >   <xs:complexType name="NoSuchCustomer">
>> >
>> >     <xs:sequence>
>> >
>> >       <xs:element name="customerName" nillable="true" type="xs:string"/>
>> >
>> >     </xs:sequence>
>> >
>> >   </xs:complexType>
>> >
>> > </xs:schema>
>> >
>> >   </wsdl:types>
>> >
>> >   <wsdl:message name="getCustomersByNameResponse">
>> >
>> >     <wsdl:part name="parameters"
>> element="tns:getCustomersByNameResponse">
>> >
>> >     </wsdl:part>
>> >
>> >   </wsdl:message>
>> >
>> >   <wsdl:message name="getCustomerById">
>> >
>> >     <wsdl:part name="parameters" element="tns:getCustomerById">
>> >
>> >     </wsdl:part>
>> >
>> >   </wsdl:message>
>> >
>> >   <wsdl:message name="getCustomersByName">
>> >
>> >     <wsdl:part name="parameters" element="tns:getCustomersByName">
>> >
>> >     </wsdl:part>
>> >
>> >   </wsdl:message>
>> >
>> >   <wsdl:message name="getCustomerByIdResponse">
>> >
>> >     <wsdl:part name="parameters" element="tns:getCustomerByIdResponse">
>> >
>> >     </wsdl:part>
>> >
>> >   </wsdl:message>
>> >
>> >   <wsdl:message name="NoSuchCustomerException">
>> >
>> >     <wsdl:part name="NoSuchCustomerException"
>> element="tns:NoSuchCustomer">
>> >
>> >     </wsdl:part>
>> >
>> >   </wsdl:message>
>> >
>> >   <wsdl:portType name="CustomerService">
>> >
>> >     <wsdl:operation name="getCustomerById">
>> >
>> >       <wsdl:input name="getCustomerById" message="tns:getCustomerById">
>> >
>> >     </wsdl:input>
>> >
>> >       <wsdl:output name="getCustomerByIdResponse" message=
>> > "tns:getCustomerByIdResponse">
>> >
>> >     </wsdl:output>
>> >
>> >       <wsdl:fault name="NoSuchCustomerException" message=
>> > "tns:NoSuchCustomerException">
>> >
>> >     </wsdl:fault>
>> >
>> >     </wsdl:operation>
>> >
>> >     <wsdl:operation name="getCustomersByName">
>> >
>> >       <wsdl:input name="getCustomersByName"
>> > message="tns:getCustomersByName"
>> > >
>> >
>> >     </wsdl:input>
>> >
>> >       <wsdl:output name="getCustomersByNameResponse" message=
>> > "tns:getCustomersByNameResponse">
>> >
>> >     </wsdl:output>
>> >
>> >       <wsdl:fault name="NoSuchCustomerException" message=
>> > "tns:NoSuchCustomerException">
>> >
>> >     </wsdl:fault>
>> >
>> >     </wsdl:operation>
>> >
>> >   </wsdl:portType>
>> >
>> >   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
>> > "tns:CustomerService">
>> >
>> >     <soap:binding style="document" transport="
>> > http://schemas.xmlsoap.org/soap/http"/>
>> >
>> >     <wsdl:operation name="getCustomerById">
>> >
>> >       <soap:operation soapAction="" style="document"/>
>> >
>> >       <wsdl:input name="getCustomerById">
>> >
>> >         <soap:body use="literal"/>
>> >
>> >       </wsdl:input>
>> >
>> >       <wsdl:output name="getCustomerByIdResponse">
>> >
>> >         <soap:body use="literal"/>
>> >
>> >       </wsdl:output>
>> >
>> >       <wsdl:fault name="NoSuchCustomerException">
>> >
>> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
>> >
>> >       </wsdl:fault>
>> >
>> >     </wsdl:operation>
>> >
>> >     <wsdl:operation name="getCustomersByName">
>> >
>> >       <soap:operation soapAction="" style="document"/>
>> >
>> >       <wsdl:input name="getCustomersByName">
>> >
>> >         <soap:body use="literal"/>
>> >
>> >       </wsdl:input>
>> >
>> >       <wsdl:output name="getCustomersByNameResponse">
>> >
>> >         <soap:body use="literal"/>
>> >
>> >       </wsdl:output>
>> >
>> >       <wsdl:fault name="NoSuchCustomerException">
>> >
>> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
>> >
>> >       </wsdl:fault>
>> >
>> >     </wsdl:operation>
>> >
>> >   </wsdl:binding>
>> >
>> >   <wsdl:service name="CustomerServiceService">
>> >
>> >     <wsdl:port name="CustomerServicePort" binding=
>> > "tns:CustomerServiceServiceSoapBinding">
>> >
>> >       <soap:address location="http://localhost:9090/CustomerServicePort
>> "/>
>> >
>> >     </wsdl:port>
>> >
>> >   </wsdl:service>
>> >
>> > </wsdl:definitions>
>> >
>>
>
>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Philippe Bossu <pb...@gmail.com>.
Hello,
Thanks for answer.

The space was removed when copy pasting in mail, my comman is not:
wsdlvalidator -V -s
http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
but
wsdlvalidator -V -s http://cxf.apache.org/schemas
  src/main/resources/wsdl/CustomerService.wsdl

Regards

On Fri, May 10, 2013 at 2:17 PM, Aki Yoshida <el...@gmail.com> wrote:

> I think what you described in incomplete.
> You mention that you are using the "-s" option. So I suppose you are
> passing your extra schema to this option. And that schema has something
> that is related to this error. Your wsdl itself is okay. You should be able
> to validate it directly as it has no external references.
>
>
>
>
> 2013/5/10 Philippe Bossu <pb...@gmail.com>
>
> > Hello,
> > I am trying to use wsdlvalidator with the following command line options:
> > wsdlvalidator -s -V
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> >
> > I get this output:
> > wsdlvalidator -V -s
> >
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> > wsdlvalidator - Apache CXF 2.7.4
> >
> > [Fatal Error] :1:55: White spaces are required between publicId and
> > systemId.
> > WSDLValidator Error : org.xml.sax.SAXParseException: White spaces are
> > required between publicId and systemId.
> >
> > [+] Verbose turned on
> >
> > org.apache.cxf.tools.common.ToolException: org.xml.sax.SAXParseException:
> > White spaces are required between publicId and systemId.
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
> > at
> >
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
> > at
> >
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> > at
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> > at
> >
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> > at
> > org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
> > Caused by: org.xml.sax.SAXParseException: White spaces are required
> between
> > publicId and systemId.
> > at
> >
> >
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
> > at
> >
> >
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
> > ... 8 more
> >
> >
> > Thanks for your help
> >
> > My wsdl has no xsd imports:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <wsdl:definitions name="CustomerServiceService"
> >
> > targetNamespace="http://customerservice.example.com/"
> >
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >
> > xmlns:tns="http://customerservice.example.com/"
> >
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> >
> >   <wsdl:types>
> >
> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
> > http://customerservice.example.com/"
> >
> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
> > targetNamespace="http://customerservice.example.com/">
> >
> >   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
> >
> >   <xs:element name="getCustomerByIdResponse" type=
> > "tns:getCustomerByIdResponse"/>
> >
> >   <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>
> >
> >   <xs:element name="getCustomersByNameResponse" type=
> > "tns:getCustomersByNameResponse"/>
> >
> >   <xs:complexType name="getCustomerById">
> >
> >     <xs:sequence>
> >
> >       <xs:element minOccurs="0" name="id" type="xs:string"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> >   <xs:complexType name="getCustomerByIdResponse">
> >
> >     <xs:sequence>
> >
> >       <xs:element minOccurs="0" name="return" type="tns:customer"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> >   <xs:complexType name="customer">
> >
> >     <xs:sequence>
> >
> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> >
> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
> > nillable="true" type="xs:string"/>
> >
> >       <xs:element name="numOrders" type="xs:int"/>
> >
> >       <xs:element name="revenue" type="xs:double"/>
> >
> >       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
> >
> >       <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
> >
> >       <xs:element minOccurs="0" name="type" type="tns:customerType"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> >   <xs:complexType name="getCustomersByName">
> >
> >     <xs:sequence>
> >
> >       <xs:element minOccurs="0" name="name" type="xs:string"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> >   <xs:complexType name="getCustomersByNameResponse">
> >
> >     <xs:sequence>
> >
> >       <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type=
> > "tns:customer"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> >   <xs:simpleType name="customerType">
> >
> >     <xs:restriction base="xs:string">
> >
> >       <xs:enumeration value="PRIVATE"/>
> >
> >       <xs:enumeration value="BUSINESS"/>
> >
> >     </xs:restriction>
> >
> >   </xs:simpleType>
> >
> >   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
> >
> >   <xs:complexType name="NoSuchCustomer">
> >
> >     <xs:sequence>
> >
> >       <xs:element name="customerName" nillable="true" type="xs:string"/>
> >
> >     </xs:sequence>
> >
> >   </xs:complexType>
> >
> > </xs:schema>
> >
> >   </wsdl:types>
> >
> >   <wsdl:message name="getCustomersByNameResponse">
> >
> >     <wsdl:part name="parameters"
> element="tns:getCustomersByNameResponse">
> >
> >     </wsdl:part>
> >
> >   </wsdl:message>
> >
> >   <wsdl:message name="getCustomerById">
> >
> >     <wsdl:part name="parameters" element="tns:getCustomerById">
> >
> >     </wsdl:part>
> >
> >   </wsdl:message>
> >
> >   <wsdl:message name="getCustomersByName">
> >
> >     <wsdl:part name="parameters" element="tns:getCustomersByName">
> >
> >     </wsdl:part>
> >
> >   </wsdl:message>
> >
> >   <wsdl:message name="getCustomerByIdResponse">
> >
> >     <wsdl:part name="parameters" element="tns:getCustomerByIdResponse">
> >
> >     </wsdl:part>
> >
> >   </wsdl:message>
> >
> >   <wsdl:message name="NoSuchCustomerException">
> >
> >     <wsdl:part name="NoSuchCustomerException"
> element="tns:NoSuchCustomer">
> >
> >     </wsdl:part>
> >
> >   </wsdl:message>
> >
> >   <wsdl:portType name="CustomerService">
> >
> >     <wsdl:operation name="getCustomerById">
> >
> >       <wsdl:input name="getCustomerById" message="tns:getCustomerById">
> >
> >     </wsdl:input>
> >
> >       <wsdl:output name="getCustomerByIdResponse" message=
> > "tns:getCustomerByIdResponse">
> >
> >     </wsdl:output>
> >
> >       <wsdl:fault name="NoSuchCustomerException" message=
> > "tns:NoSuchCustomerException">
> >
> >     </wsdl:fault>
> >
> >     </wsdl:operation>
> >
> >     <wsdl:operation name="getCustomersByName">
> >
> >       <wsdl:input name="getCustomersByName"
> > message="tns:getCustomersByName"
> > >
> >
> >     </wsdl:input>
> >
> >       <wsdl:output name="getCustomersByNameResponse" message=
> > "tns:getCustomersByNameResponse">
> >
> >     </wsdl:output>
> >
> >       <wsdl:fault name="NoSuchCustomerException" message=
> > "tns:NoSuchCustomerException">
> >
> >     </wsdl:fault>
> >
> >     </wsdl:operation>
> >
> >   </wsdl:portType>
> >
> >   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
> > "tns:CustomerService">
> >
> >     <soap:binding style="document" transport="
> > http://schemas.xmlsoap.org/soap/http"/>
> >
> >     <wsdl:operation name="getCustomerById">
> >
> >       <soap:operation soapAction="" style="document"/>
> >
> >       <wsdl:input name="getCustomerById">
> >
> >         <soap:body use="literal"/>
> >
> >       </wsdl:input>
> >
> >       <wsdl:output name="getCustomerByIdResponse">
> >
> >         <soap:body use="literal"/>
> >
> >       </wsdl:output>
> >
> >       <wsdl:fault name="NoSuchCustomerException">
> >
> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> >
> >       </wsdl:fault>
> >
> >     </wsdl:operation>
> >
> >     <wsdl:operation name="getCustomersByName">
> >
> >       <soap:operation soapAction="" style="document"/>
> >
> >       <wsdl:input name="getCustomersByName">
> >
> >         <soap:body use="literal"/>
> >
> >       </wsdl:input>
> >
> >       <wsdl:output name="getCustomersByNameResponse">
> >
> >         <soap:body use="literal"/>
> >
> >       </wsdl:output>
> >
> >       <wsdl:fault name="NoSuchCustomerException">
> >
> >         <soap:fault name="NoSuchCustomerException" use="literal"/>
> >
> >       </wsdl:fault>
> >
> >     </wsdl:operation>
> >
> >   </wsdl:binding>
> >
> >   <wsdl:service name="CustomerServiceService">
> >
> >     <wsdl:port name="CustomerServicePort" binding=
> > "tns:CustomerServiceServiceSoapBinding">
> >
> >       <soap:address location="http://localhost:9090/CustomerServicePort
> "/>
> >
> >     </wsdl:port>
> >
> >   </wsdl:service>
> >
> > </wsdl:definitions>
> >
>

Re: wsdlvalidator ends with [Fatal Error] :1:55: White spaces are required between publicId and systemId.

Posted by Aki Yoshida <el...@gmail.com>.
I think what you described in incomplete.
You mention that you are using the "-s" option. So I suppose you are
passing your extra schema to this option. And that schema has something
that is related to this error. Your wsdl itself is okay. You should be able
to validate it directly as it has no external references.




2013/5/10 Philippe Bossu <pb...@gmail.com>

> Hello,
> I am trying to use wsdlvalidator with the following command line options:
> wsdlvalidator -s -V
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
>
> I get this output:
> wsdlvalidator -V -s
> http://cxf.apache.org/schemassrc/main/resources/wsdl/CustomerService.wsdl
> wsdlvalidator - Apache CXF 2.7.4
>
> [Fatal Error] :1:55: White spaces are required between publicId and
> systemId.
> WSDLValidator Error : org.xml.sax.SAXParseException: White spaces are
> required between publicId and systemId.
>
> [+] Verbose turned on
>
> org.apache.cxf.tools.common.ToolException: org.xml.sax.SAXParseException:
> White spaces are required between publicId and systemId.
> at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:211)
> at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
> at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
> at
>
> org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
> at
> org.apache.cxf.tools.validator.WSDLValidator.execute(WSDLValidator.java:81)
> at
>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
> at
> org.apache.cxf.tools.validator.WSDLValidator.main(WSDLValidator.java:110)
> Caused by: org.xml.sax.SAXParseException: White spaces are required between
> publicId and systemId.
> at
>
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> at
>
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.createSchema(SchemaValidator.java:145)
> at
>
> org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:190)
> ... 8 more
>
>
> Thanks for your help
>
> My wsdl has no xsd imports:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <wsdl:definitions name="CustomerServiceService"
>
> targetNamespace="http://customerservice.example.com/"
>
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>
> xmlns:tns="http://customerservice.example.com/"
>
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>
>   <wsdl:types>
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="
> http://customerservice.example.com/"
>
> attributeFormDefault="unqualified" elementFormDefault="unqualified"
> targetNamespace="http://customerservice.example.com/">
>
>   <xs:element name="getCustomerById" type="tns:getCustomerById"/>
>
>   <xs:element name="getCustomerByIdResponse" type=
> "tns:getCustomerByIdResponse"/>
>
>   <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>
>
>   <xs:element name="getCustomersByNameResponse" type=
> "tns:getCustomersByNameResponse"/>
>
>   <xs:complexType name="getCustomerById">
>
>     <xs:sequence>
>
>       <xs:element minOccurs="0" name="id" type="xs:string"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
>   <xs:complexType name="getCustomerByIdResponse">
>
>     <xs:sequence>
>
>       <xs:element minOccurs="0" name="return" type="tns:customer"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
>   <xs:complexType name="customer">
>
>     <xs:sequence>
>
>       <xs:element minOccurs="0" name="name" type="xs:string"/>
>
>       <xs:element maxOccurs="unbounded" minOccurs="0" name="address"
> nillable="true" type="xs:string"/>
>
>       <xs:element name="numOrders" type="xs:int"/>
>
>       <xs:element name="revenue" type="xs:double"/>
>
>       <xs:element minOccurs="0" name="test" type="xs:decimal"/>
>
>       <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
>
>       <xs:element minOccurs="0" name="type" type="tns:customerType"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
>   <xs:complexType name="getCustomersByName">
>
>     <xs:sequence>
>
>       <xs:element minOccurs="0" name="name" type="xs:string"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
>   <xs:complexType name="getCustomersByNameResponse">
>
>     <xs:sequence>
>
>       <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type=
> "tns:customer"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
>   <xs:simpleType name="customerType">
>
>     <xs:restriction base="xs:string">
>
>       <xs:enumeration value="PRIVATE"/>
>
>       <xs:enumeration value="BUSINESS"/>
>
>     </xs:restriction>
>
>   </xs:simpleType>
>
>   <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
>
>   <xs:complexType name="NoSuchCustomer">
>
>     <xs:sequence>
>
>       <xs:element name="customerName" nillable="true" type="xs:string"/>
>
>     </xs:sequence>
>
>   </xs:complexType>
>
> </xs:schema>
>
>   </wsdl:types>
>
>   <wsdl:message name="getCustomersByNameResponse">
>
>     <wsdl:part name="parameters" element="tns:getCustomersByNameResponse">
>
>     </wsdl:part>
>
>   </wsdl:message>
>
>   <wsdl:message name="getCustomerById">
>
>     <wsdl:part name="parameters" element="tns:getCustomerById">
>
>     </wsdl:part>
>
>   </wsdl:message>
>
>   <wsdl:message name="getCustomersByName">
>
>     <wsdl:part name="parameters" element="tns:getCustomersByName">
>
>     </wsdl:part>
>
>   </wsdl:message>
>
>   <wsdl:message name="getCustomerByIdResponse">
>
>     <wsdl:part name="parameters" element="tns:getCustomerByIdResponse">
>
>     </wsdl:part>
>
>   </wsdl:message>
>
>   <wsdl:message name="NoSuchCustomerException">
>
>     <wsdl:part name="NoSuchCustomerException" element="tns:NoSuchCustomer">
>
>     </wsdl:part>
>
>   </wsdl:message>
>
>   <wsdl:portType name="CustomerService">
>
>     <wsdl:operation name="getCustomerById">
>
>       <wsdl:input name="getCustomerById" message="tns:getCustomerById">
>
>     </wsdl:input>
>
>       <wsdl:output name="getCustomerByIdResponse" message=
> "tns:getCustomerByIdResponse">
>
>     </wsdl:output>
>
>       <wsdl:fault name="NoSuchCustomerException" message=
> "tns:NoSuchCustomerException">
>
>     </wsdl:fault>
>
>     </wsdl:operation>
>
>     <wsdl:operation name="getCustomersByName">
>
>       <wsdl:input name="getCustomersByName"
> message="tns:getCustomersByName"
> >
>
>     </wsdl:input>
>
>       <wsdl:output name="getCustomersByNameResponse" message=
> "tns:getCustomersByNameResponse">
>
>     </wsdl:output>
>
>       <wsdl:fault name="NoSuchCustomerException" message=
> "tns:NoSuchCustomerException">
>
>     </wsdl:fault>
>
>     </wsdl:operation>
>
>   </wsdl:portType>
>
>   <wsdl:binding name="CustomerServiceServiceSoapBinding" type=
> "tns:CustomerService">
>
>     <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>
>     <wsdl:operation name="getCustomerById">
>
>       <soap:operation soapAction="" style="document"/>
>
>       <wsdl:input name="getCustomerById">
>
>         <soap:body use="literal"/>
>
>       </wsdl:input>
>
>       <wsdl:output name="getCustomerByIdResponse">
>
>         <soap:body use="literal"/>
>
>       </wsdl:output>
>
>       <wsdl:fault name="NoSuchCustomerException">
>
>         <soap:fault name="NoSuchCustomerException" use="literal"/>
>
>       </wsdl:fault>
>
>     </wsdl:operation>
>
>     <wsdl:operation name="getCustomersByName">
>
>       <soap:operation soapAction="" style="document"/>
>
>       <wsdl:input name="getCustomersByName">
>
>         <soap:body use="literal"/>
>
>       </wsdl:input>
>
>       <wsdl:output name="getCustomersByNameResponse">
>
>         <soap:body use="literal"/>
>
>       </wsdl:output>
>
>       <wsdl:fault name="NoSuchCustomerException">
>
>         <soap:fault name="NoSuchCustomerException" use="literal"/>
>
>       </wsdl:fault>
>
>     </wsdl:operation>
>
>   </wsdl:binding>
>
>   <wsdl:service name="CustomerServiceService">
>
>     <wsdl:port name="CustomerServicePort" binding=
> "tns:CustomerServiceServiceSoapBinding">
>
>       <soap:address location="http://localhost:9090/CustomerServicePort"/>
>
>     </wsdl:port>
>
>   </wsdl:service>
>
> </wsdl:definitions>
>