Hi, 

I have a WSDL with a schema definition like this.

 

<element name="rules-config-dropResponse">

   <complexType>

    <sequence>

     <element name="output" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true" />

    </sequence>

   </complexType>

  </element>

 </schema>

 

I can generate java code from this with WSDLToJava, but the
JaxWsServiceFactoryBean throws an exception when trying to create a client
or a server. 

 

    [javac] Compiling 6 source files to C:\lib

     [java] java2ws -wsdl -verbose -cp C:\ib -frontend jaxws -t
urn:company-product -servicename AppSensor -portname AppSensorPortType -o
AppSensorGenerated.wsdl -d C:\wsdl com.example.soap.arc.AppSensorPortType

     [java] java2ws - Apache CXF 2.1.2

     [java] Aug 27, 2008 4:15:29 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass

     [java] INFO: Creating Service
{urn:company-product}AppSensorPortTypeService from class
com.example.soap.arc.AppSensorPortType

     [java] Error: org.apache.ws.commons.schema.XmlSchemaException: Schema
name conflict in collection. Namespace: urn:company-product

     [java] java.lang.RuntimeException:
org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in
collection. Namespace: urn:company-product

     

 

I found that if I set the nillable attribute to false or remove it
completely the exception goes away. Is this a bug or is this the correct
behavior?

 

I'm using CXF 2.1.2.

 

Thanks,

John

 

 

 

 

Reply via email to