1
1

I have to generate a webservice client in ivy7.2 (CXF) where the wsdl is only accessable over https.

The WebsService class generation crahes with a mysterious exception:

org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition 
WSDLException (at /definitions/types/xs:schema): faultCode=PARSER_ERROR: Problem parsing .xsd'.: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

asked 07.03.2019 at 10:11

Bruno%20B%C3%BCtler's gravatar image

Bruno Bütler
56181318
accept rate: 68%

edited 08.03.2019 at 03:02

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958


The problem arises if the wsdl includes schema.xsd. The CXF Framework can not access the xsd files over the specified schema location.

A workaround is to download the wsdl and xsd files manually with a webbrowser and to change the xsd schema location in the wsdl to local file names. Then you can read in the wsdl using a file:/ url path alt text After the creation of the client you have to manipulate the new cxf...jar in the lib_ws folder in the ivy project. It includes a wsdl and a number of schemaN.xsd files. But this wsdl still includes the origin xsd paths and not the local schemaN.xsd files. Change the schema location in the wsdl to the local schemaN.xsd files.

  <xs:schema xmlns="http://schemas.xmlsoap.org/wsdl/"   ...>    
    <xs:include schemaLocation="Schema1.xsd"></xs:include>  
  </xs:schema>

Without this modification the WS call will fail with an InstantiationException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.

link

answered 07.03.2019 at 10:28

Bruno%20B%C3%BCtler's gravatar image

Bruno Bütler
56181318
accept rate: 68%

edited 08.03.2019 at 04:29

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×48
×2

Asked: 07.03.2019 at 10:11

Seen: 3,110 times

Last updated: 08.03.2019 at 04:29