I have a web service that defines severals schemas in the webTypes section. I define a read operation which type is define in this schema:
<xs:schema version="1.0" targetNamespace="http://example.com/webservice/service" xmlns:ns0="http://example.com/webservice/parameter" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://example.com/webservice/parameter"/>
<xs:complexType name="read">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="filter" type="ns0:filter" minOccurs="0" maxOccurs="1"/>
<xs:element name="startIndex" type="xs:int" minOccurs="1" maxOccurs="1" />
<xs:element name="noOfResults" type="xs:int" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:element name="read" type="tns:read"/>
</xs:schema>
Then I activate the schema validation in the CXF config file like this:
<jaxws:endpoint id="dataService"
implementor="com.example.webservice.jaxws.endpoint.SIB"
address="/DataService"
wsdlLocation="classpath:DataService.wsdl">
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
</jaxws:endpoint>
I tested my schema validating some of my request with the SOAPUI validator, and it works perfectly. But in the server side, when a request is received I'm getting this error:
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'name'.]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
... 287 more
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'name'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:96)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:242)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:176)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
... 289 more
Any Clue? It seems that the validator can access the "read" operation definition. I don't know what to do because actually the webservices works correctly without the schema validation, but I want to avoid param validation in the web services implementation.
Thanks in advance,
NOTE I'm Using CXF 2.3.3 with JAXWS 2.2 and JAXB 2.2.1 in a non endorsed tomcat 6 with java 1.6.0.
Related
I have a webservice, and I'm trying to write a client for it. But when I try to add a "Web Service Client" in Netbeans IDE, wsimport utility cannot parse the .wsdl. The reason is "The class serviceCompany is already in use".
I began to analyze the wsdl file, and noticed that there are 2 .xsd files related to the WS.
<types>
<xsd:schema>
<xsd:import namespace="http://services.ws.x.net/" schemaLocation="https://test.x:443/PaymentWS/PaymentWS?xsd=1"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://commonws.ws.x.net/" schemaLocation="https://test.x:443/PaymentWS/PaymentWS?xsd=2"/>
</xsd:schema>
</types>
And I have a complex type named "ServiceCompany" inside of each .xsd files.
inside ?xsd=1:
<xs:complexType name="serviceCompany">
<xs:sequence>
<xs:element name="bankAccount" type="tns:iban"/>
<xs:element name="code" type="tns:companyCode"/>
<xs:element name="description" type="tns:stringMax32"/>
<xs:element name="taxNumber" type="tns:taxNumber"/>
</xs:sequence>
</xs:complexType>
inside ?xsd=2:
<xs:complexType name="serviceCompany">
<xs:sequence>
<xs:element name="code" type="cmn:companyCode"/>
<xs:element name="description" type="cmn:stringMax32"/>
<xs:element name="manualPaymentReceiverCode" type="cmn:companyCode" minOccurs="0"/>
<xs:element name="scCategoryList" type="cmn:stringMax32" maxOccurs="unbounded"/>
<xs:element name="status" type="cmn:objectStatus"/>
<xs:element name="branchList" type="tns:serviceCompanyBranch" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
The namespaces of there .xsd files are different, why wsimport cannot import the wsdl? How can I solve this problem?
Thanks in advance!
I have a client that connects to a SOAP server endpoint:
Endpoint.publish("http://localhost:8081/todo", new ToDoWebService());
The server offers the next simple method:
#WebService
public class ToDoWebService {
#WebMethod()
public String addToDo(String task, String context, String project, int priority) {
return "ToDo: \n "
+ "\t Task : "+task+"\n"
+ "\t Context : "+context+"\n"
+ "\t Project : "+project+"\n"
+ "\t Priority: "+priority;
}
}
This is the client:
public class Client {
public static void main(String[] args) {
ToDoWebServiceService tdwss = new ToDoWebServiceService();
ToDoWebService tdws = tdwss.getToDoWebServicePort();
System.out.println(tdws.addToDo("Task 1","My Context","My Project",9));
}
}
The thing is that the connection between client and server is succesful, but not entirely: the pass of the arguments from the client to the service is not made as expected, been this the result on the client once executed:
The server doesn't receive correctly the arguments that the client has passed with the method "addToDo()" call. It returns the string format expected but with nulls instead the arguments passed by the client. And that's what I can't figure out...
Of course, I'm pretty confident the WSDL file is well written:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://todows.bigws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://todows.bigws/" name="ToDoWebServiceService">
<types>
<xsd:schema>
<xsd:import namespace="http://todows.bigws/" schemaLocation="toDo.xsd"/>
</xsd:schema>
</types>
<message name="addToDo">
<part name="parameters" element="tns:addToDo"/>
</message>
<message name="addToDoResponse">
<part name="parameters" element="tns:addToDoResponse"/>
</message>
<portType name="ToDoWebService">
<operation name="addToDo">
<input wsam:Action="http://todows.bigws/ToDoWebService/addToDo" message="tns:addToDo"/>
<output wsam:Action="http://todows.bigws/ToDoWebService/addToDoResponse" message="tns:addToDoResponse"/>
</operation>
</portType>
<binding name="ToDoWebServicePortBinding" type="tns:ToDoWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="addToDo">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ToDoWebServiceService">
<port name="ToDoWebServicePort" binding="tns:ToDoWebServicePortBinding">
<soap:address location="http://localhost:8081/todo"/>
</port>
</service>
</definitions>
As well as the schema "toDo.xsd":
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8 svn-revision#13980. -->
<xs:schema xmlns:tns="http://todows.bigws/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://todows.bigws/">
<xs:element name="addToDo" type="tns:addToDo"/>
<xs:element name="addToDoResponse" type="tns:addToDoResponse"/>
<xs:complexType name="addToDo">
<xs:sequence>
<xs:element name="task" type="xs:string" minOccurs="0"/>
<xs:element name="context" type="xs:string" minOccurs="0"/>
<xs:element name="project" type="xs:string" minOccurs="0"/>
<xs:element name="priority" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
I've tried different actions in the server method, as writing the string with the parameter in a file, but the result is the same, an error cause the parameters are null. That's what I think proves that the failure is located in the way the server receive the parameters passed to the "addToDo()" method.
I've review the WSDL & schema files over and over....but I've not been able to find what make this code run wrongly. I've also tested this code with the SoapUI software and the outcome is the same.
¿Any ideas?
P.D.: Sorry about all the posted code.
In case you need the whole project: my SOAP project at GitHub
I reviewed your WSDL and XSD in your project todows-cli-ws and the problem is the WSDL and XSD files in your client project are outdated!
For example, this is the current content of the XSD file of your server.
<xs:schema xmlns:tns="http://todows.bigws/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0" targetNamespace="http://todows.bigws/">
<xs:element name="addToDo" type="tns:addToDo"/>
<xs:element name="addToDoResponse" type="tns:addToDoResponse"/>
<xs:element name="listToDo" type="tns:listToDo"/>
<xs:element name="listToDoResponse" type="tns:listToDoResponse"/>
<xs:element name="removeToDo" type="tns:removeToDo"/>
<xs:element name="removeToDoResponse" type="tns:removeToDoResponse"/>
<xs:complexType name="addToDo">
<xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0"/>
<xs:element name="arg1" type="xs:string" minOccurs="0"/>
<xs:element name="arg2" type="xs:string" minOccurs="0"/>
<xs:element name="arg3" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="removeToDo">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="removeToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listToDo">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="listToDoResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Note that the current name of the params are arg0, arg1, arg2 and arg3. The server expects as param names task, context, project and priority, and therefore the method is invoked with the default values (null for a String and 0 for an int).
Don't close that browser tab!
My issue is xmlbeans I think. I have a small ear with one ejb #WebService that has a xmlbean as a parameter. You will see is uses SOAPBinding.ParameterStyle.BARE as a soapbinding style.
I can see from the stacktrace that it fails at the point it tries to...
createBareMessage()
Is there some way to tell cxf to use a different Factory?
It seems from the error message:
Check for use of a JAX-WS-specific type without the JAX-WS service factory bean
that somehow xmlbeans knows that I'm referencing the class:
PurchaseOrderDocument.class
and that I didn't create it via the Factory class that comes with the generated java code. i.e.
PurchaseOrderDocument.newInstance()
The error it keeps throwing:
14:33:04,566 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service {http://ws.creigh.com/}PurchaseOrderBeanService from class com.creigh.ws.PurchaseOrderBean
14:33:04,569 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."purchase-order-EAR.ear"."purchase-order-EJB.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."purchase-order-EAR.ear"."purchase-order-EJB.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "purchase-order-EJB.jar" of deployment "purchase-order-EAR.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Service class com.creigh.ws.PurchaseOrderBean method getPurchaseOrder part {http://ws.creigh.com/}document cannot be mapped to schema. Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:368)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:67)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 5 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Service class com.creigh.ws.PurchaseOrderBean method getPurchaseOrder part {http://ws.creigh.com/}document cannot be mapped to schema. Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:1242)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:488)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:453)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:333)
... 13 more
My WebService:
#Stateless
#Local(IPurchaseOrder.class)
#WebService(wsdlLocation="wsdl/PurchaseOrder.wsdl")
#SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.BARE)
//#DataBinding(org.apache.cxf.xmlbeans.XmlBeansDataBinding.class)
public class PurchaseOrderBean implements IPurchaseOrder {
public PurchaseOrderBean() {
}
//This works
#WebMethod(operationName="sayHello")
#WebResult(name="result")
public String sayHello(#WebParam(name="name") String name) {
return "Hello" + name;
}
//This doesn't
#WebMethod(operationName="getPurchaseOrder")
#WebResult(name="order")
public PurchaseOrder getPurchaseOrder(#WebParam(name="document") PurchaseOrderDocument document){
return document.getPurchaseOrder();
}
}
The databinding didn't make any difference because I think I'm mixing up versions of cxf there.
This is my xsd I generated the java from:
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:po="http://creigh.com/ee/easypo"
targetNamespace="http://creigh.com/ee/easypo"
elementFormDefault="qualified">
<xs:element name="purchase-order">
<xs:complexType>
<xs:sequence>
<xs:element name="customer" type="po:customer"/>
<xs:element name="date" type="xs:dateTime"/>
<xs:element name="line-item" type="po:line-item" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="shipper" type="po:shipper" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="customer">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
</xs:sequence>
<xs:attribute name="age" type="xs:int"/>
<xs:attribute name="moo" type="xs:int" default="100"/>
<xs:attribute name="poo" type="xs:int" fixed="200"/>
</xs:complexType>
<xs:complexType name="line-item">
<xs:sequence>
<xs:element name="description" type="xs:string"/>
<xs:element name="per-unit-ounces" type="xs:decimal"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="quantity" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="shipper">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="per-ounce-rate" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Please yelp!
Regards
I don't believe the version of CXF that JBoss includes in the app server contains the XMLBeans databinding at all. You likely would need to add the appropriate xmlbeans databinding jar (and other jars xmlbeans needs) into JBoss's CXF setup, but I have no idea how to do that. You'd likely have to ask on the JBoss forums.
I am migrating my webservice publishing API from AXIS2 to CXF. CXF autogenerated WSDL is not similar to Axis2 WSDL. There are given below differences. As client sits somewhere else I am not able to test if these differences will affect Axis2 generated clients. How can remove these WSDL differences using CXF?
CXF WSDL
<xs:element name="test" type="tns:test"/>
<xs:element name="testResponse" type="tns:testResponse"/>
<xs:complexType name="test">
<xs:sequence> <xs:element name="doc" type="xs:string" minOccurs="0"/> </xs:sequence>
</xs:complexType>
<xs:complexType name="testResponse">
<xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence>
</xs:complexType>
<wsdl:portType name="TESTService">
Axis2 WSDL
<xsd:element name="test" nillable="true" type="xsd:string" />
<xsd:element name="testResponse" nillable="true" type="xsd:string" />
<wsdl:portType name="TEST">
Most likely, adding an annotation of:
#SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
would do it. You may also need to update "name" attributes of the #WebParam and #WebReturn params.
To get rif of xs:elemntName difference, remove '#WebParams' from web service input as it is accepting just a String not any complex object.
To remove wsdl:portType name difference, just added '#WebService(name) attribute. '#WebService' should be as per the specification order else cxf won't consider them in WSDL.
I'm working on a project that involves a simple web service, and have had a slew of little problems. It's an Apache CXF webservice (using JAX-WS, over SOAP). The service itself is pretty simple: receive a request, insert the request into a database, and return whether the insert was successful. I'd like to rely on XML validation to enforce a number of constraints on the request.
Full XML validation is very important to this project. So far, I've been unable to properly validate, though my service otherwise functions.
I'm pretty sure it all boils down to this error, which is preventing validation.
Feb 8, 2010 4:47:14 PM org.apache.cxf.wsdl.EndpointReferenceUtils createSchema
WARNING: SAXException for newSchema() on
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:905)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:605)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1393)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1763)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1492)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:442)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:277)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:435)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:491)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:510)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1802)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:1757)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:909)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:569)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:519)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:210)
at org.apache.cxf.wsdl.EndpointReferenceUtils.createSchema(EndpointReferenceUtils.java:666)
at org.apache.cxf.wsdl.EndpointReferenceUtils.getSchema(EndpointReferenceUtils.java:690)
at org.apache.cxf.interceptor.AbstractInDatabindingInterceptor.setSchemaInMessage(AbstractInDatabindingInterceptor.java:109)
at org.apache.cxf.interceptor.AbstractInDatabindingInterceptor.getDataReader(AbstractInDatabindingInterceptor.java:94)
at org.apache.cxf.interceptor.AbstractInDatabindingInterceptor.getDataReader(AbstractInDatabindingInterceptor.java:99)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:66)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:406)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Feb 8, 2010 4:47:14 PM org.apache.cxf.wsdl.EndpointReferenceUtils createSchema
WARNING: Schema for: http://myproject.com/ws/schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ns1="http://myproject.com/Schema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://myproject.com/ws/schema" version="1.0">
<xs:import namespace="http://myproject.com/Schema.xsd"/>
<xs:element name="InvalidDataFault" type="xs:string"/>
<xs:element name="RequestHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="UserID" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
<xs:element name="CourtID" type="xs:positiveInteger"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SecurityFault">
<xs:complexType>
<xs:sequence>
<xs:element name="user" type="xs:string"/>
<xs:element name="court" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadData">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns1:DataPackage"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadDataResponse" type="xs:anyType"/>
</xs:schema>
Anyone have any ideas?
Any chance you can try with the latest CXF snapshots? There was a bug in this area that was fixed last week related to creating schemas for validation from relatively large schemas. The fix for that may solve this as well.