[jboss-user] [JBossWS] - Obscure 'SAXParseException: Content is not allowed in prolog

angusm do-not-reply at jboss.com
Tue May 5 04:43:40 EDT 2009


I have a 'Content is not allowed in prolog' problem. But I am pretty sure that it is not any of the usual culprits (spaces or invalid characters where they should not be). 

I have a WSDL (below). This is for a document type WS, and the schema is at  http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4.xsd . 
I have verified that the WSDL is WSI Basic Profile 1.1 with soapUI and the WS-I Testing Tools V1.1. 
It is correctly parsed and treated by wsconsume. 
The server application is correctly deployed. But when I try to run the client I get (full stack trace below) 
WSDLException (at /definitions/types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'http://schemas.xmlsoap.orgsoap/envelope/'.: org.xml.sax.SAXParseException: Content is not allowed in prolog. It seems to get stuck parsing the soap envelope schema, which is imported into the 3GPP schema. (I have validated the 3GPP schema with  http://www.w3.org/2001/03/webdata/xsv).

JBossWS : version.id=3.0.1-native-2.0.4.GA.

As ever, any suggestions ideas infinitely appreciated.

WSDL:
(I changed the WSDL soap NS to soapx as I thought there might be conficts with the 3GPP NS soap, but it did not make any difference)
<?xml version="1.0" encoding="UTF-8"?>
  | <definitions name="MM7Service" targetNamespace="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:tns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapx="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  |   <types>
  | <xs:schema targetNamespace="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:tns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" elementFormDefault="qualified" attributeFormDefault="unqualified">
  | 	<xs:include  schemaLocation="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4.xsd"/>
  | </xs:schema>
  |   </types>
  |   <message name="MM7_SubmitReq">
  |     <part name="SubmitReq" element="tns:SubmitReq">
  |     </part>
  |   </message>
  |   <message name="MM7_SubmitRsp">
  |     <part name="SubmitReq" element="tns:SubmitRsp">
  |     </part>
  |   </message>
  |   <portType name="MM7">
  |     <operation name="submit">
  |       <input message="tns:MM7_SubmitReq">
  |     </input>
  |       <output message="tns:MM7_SubmitRsp">
  |     </output>
  |     </operation>
  |   </portType>
  |   <binding name="MM7Binding" type="tns:MM7">
  |     <soapx:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  |     <operation name="submit">
  |       <soapx:operation soapAction=""/>
  |       <input>
  |         <soapx:body use="literal"/>
  |       </input>
  |       <output>
  |         <soapx:body use="literal"/>
  |       </output>
  |     </operation>
  |   </binding>
  |   <service name="MM7Service">
  |     <port name="MM7Port" binding="tns:MM7Binding">
  |       <soapx:address location="REPLACE_WITH_ACTUAL_URL"/>
  |     </port>
  |   </service>
  | </definitions>
  | 

Stack Trace:
09:44:35,338 TRACE [JBossEntityResolver] Mapped systemId to filename: 
  | 09:44:35,338 TRACE [JBossEntityResolver]  maps to URL: file:/C:/Other/eclipseall/ws/hsi/mm7-client2/bin/
  | [Fatal Error] :1:1: Content is not allowed in prolog.
  | Exception in thread "main" org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'http://schemas.xmlsoap.org/soap/envelope/'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.
  | 	at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:152)
  | 	at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:293)
  | 	at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:84)
  | 	at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:136)
  | 	at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
  | 	at javax.xml.ws.Service.<init>(Service.java:79)
  | 	at org._3gpp.ftp.specs.archive._23_series._23_140.schema.rel_6_mm7_1_4.MM7Service.<init>(MM7Service.java:41)
  | 	at test.client.MM7ClientTest2.main(MM7ClientTest2.java:25)
  | Caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'http://schemas.xmlsoap.org/soap/envelope/'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.getDocument(JBossWSDLReaderImpl.java:2136)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseSchema(JBossWSDLReaderImpl.java:832)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseSchema(JBossWSDLReaderImpl.java:866)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseSchema(JBossWSDLReaderImpl.java:656)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseTypes(JBossWSDLReaderImpl.java:617)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseDefinitions(JBossWSDLReaderImpl.java:329)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2290)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2254)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2307)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2328)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2360)
  | 	at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:125)
  | 	... 7 more
  | Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
  | 	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
  | 	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
  | 	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.getDocument(JBossWSDLReaderImpl.java:2126)
  | 	... 18 more

Client program:
	private final static String WSDL_HTTP = "http://frpar-morisona1:8080/mm7/MM7Bean?wsdl";
  |     
  | 	private final static String NAMESPACE = "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4";
  | 
  | 	
  | 	public static void main(String[] args) throws Exception {
  | 
  | 		MM7Service serv = new MM7Service(new URL(WSDL_HTTP), new QName(NAMESPACE, "MM7Service"));
  | 
  | 		MM7 port = serv.getMM7Port();
  | 
  | 		SubmitReqType submitReq = new SubmitReqType();
  | 
  | 		SubmitRspType submitRsp = port.submit(submitReq);
  | 	}

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228529#4228529

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228529



More information about the jboss-user mailing list