users@jaxb.java.net

wsimport -b binding.xml

From: Kevin A. Mayer <Kevin_at_Colorado.EDU>
Date: Mon, 30 Jul 2012 08:38:16 -0600

Bump.

I think the appropriate question is, can a simpleType name in
conflicting schemas be 'aliased' using a binding.xml file in order to
work around the duplicate names ERROR?

thank you in advance.

On Wed, 2012-07-25 at 14:02 -0600, Kevin A. Mayer wrote:
> I am using wsimport to generate a client based on a wsdl. The schemas
> that are used have duplicate simpleType names and I cannot change them.
> I would like to set the property in the bindings.xml to adjust the name
> of the second simple type in the second schema. Would you look at the
> bindings.xml file and explain why the name='SequenceIdentifier.Type is
> not being picked up, or if the syntax is incorrect?
>
> here is the wsimport command with the error:
> wsimport -b binding.xml
> -s /home/km/workspace/Saip_SnapShot_Requestor/src -keep -p se.requestor
> https://csdev/PSIGW/PeopleSoftServiceListeningConnector/COURSEMANAGEMENTSERVICE.1.wsdl
>
> parsing WSDL...
> [ERROR] 'SequenceIdentifier.Type' is already defined
> line 2 of
> https://csdev/PSIGW/PeopleSoftServiceListeningConnector/readCourseOfferingsFSPRequest.V1.xsd
>
> [ERROR] (related to above error) the first definition appears here
> line 2 of
> https://csdev/PSIGW/PeopleSoftServiceListeningConnector/readCourseOfferingsResponse.V1.xsd
>
> ---------------------------------------------------------------------------
>
> The bindings.xml file is:
> <?xml version="1.0" encoding="UTF-8"?>
> <jxb:bindings version="2.1"
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
> xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> jxb:extensionBindingPrefixes="xjc">
>
> <jxb:bindings schemaLocation="https://csdev/PSIGW/PeopleSoftServiceListeningConnector/readCourseOfferingsFSPRequest.V1.xsd">
> <jxb:bindings node="//xs:simpleType[@name='SequenceIdentifier.Type']">
> <jxb:property name="course_request_fsp_SequenceIdentifier.Type"/>
> </jxb:bindings>
> </jxb:bindings>
> </jxb:bindings>
>
> ---------------------------------------------------------------------
> The schema of the first definition readCourseOfferingsResponse.V1.xsd:
>
> <xs:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> targetNamespace="http://www.imsglobal.org/services/es/cms2p0/xsd/imscms_v2p0"
> version="IMS CMS 2.0">
> <xs:simpleType name="URL.Type">
> <xs:restriction base="xs:string">
> <xs:maxLength value="4096" />
> <xs:minLength value="1" />
> <xs:whiteSpace value="preserve" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="SequenceIdentifier.Type">
> <xs:restriction base="xs:dateTime" />
> </xs:simpleType>
> <xs:element name="readCourseOfferingsResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="1" minOccurs="0" ref="cms:dataFile" />
> <xs:element maxOccurs="1" minOccurs="0" ref="cms:savePoint" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="dataFile" type="cms:URL.Type" />
> <xs:element name="savePoint" type="cms:SequenceIdentifier.Type" />
> </xs:schema>
>
> ---------------------------------------------------------------------
> The schema of the second definition
> readCourseOfferingsFSPRequest.V1.xsd:
> <xs:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> targetNamespace="http://www.imsglobal.org/services/es/cms2p0/xsd/imscms_v2p0"
> version="IMS CMS 2.0">
> <xs:simpleType name="SequenceIdentifier.Type">
> <xs:restriction base="xs:dateTime" />
> </xs:simpleType>
> <xs:simpleType name="TargetID.Type">
> <xs:restriction base="xs:string">
> <xs:maxLength value="10" />
> <xs:whiteSpace value="preserve" />
> <xs:pattern value="([A-Z]|[0-9]|\p{Z}|\p{P}|\p{Lu})*" />
> </xs:restriction>
> </xs:simpleType>
> <xs:element name="readCourseOfferingsFromSavePointRequest">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="cms:fromSavePoint" />
> <xs:element minOccurs="0" ref="cms:targetId" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="fromSavePoint" type="cms:SequenceIdentifier.Type" />
> <xs:element name="targetId" type="cms:TargetID.Type" />
> </xs:schema>
> ---------------------------------------------------------------------
>
> thank you in advance.