cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco García (JIRA) <j...@apache.org>
Subject [jira] [Created] (CXF-7397) Binding xs:dateTime in apache wadl2java doesn't work
Date Wed, 07 Jun 2017 07:39:18 GMT
Francisco García created CXF-7397:
-------------------------------------

             Summary: Binding xs:dateTime in apache wadl2java doesn't work
                 Key: CXF-7397
                 URL: https://issues.apache.org/jira/browse/CXF-7397
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 3.1.11
            Reporter: Francisco García


I'm trying to replace 'dateTime type default class (XMLGregorianCalendar) for other while
generating stubs. But doesn't work.

wadl2java -verbose -d "/home/franciscogarcia/wsdlfiles/claims" -tMap "{http://www.w3.org/2001/XMLSchema}dateTime=java.lang.String"
/home/franciscogarcia/wsdlfiles/newclaims.wadl

Command finish Ok, and stubs classes are generated but 'dateTime' fields are XMLGregorianCalendar
instances.

This is generated stub:
package com.bbva.qzqp.claims.facade.v01;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import com.bbva.jee.arq.spring.core.servicing.utils.Link;
import com.bbva.jee.arq.spring.core.servicing.utils.Money;


/**
 * <p>Clase Java para claim complex type.
 * 
 * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya
en esta clase.
 * 
 * <pre>
 * &lt;complexType name="claim">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="claimId" type="{http://www.w3.org/2001/XMLSchema}string"
minOccurs="0"/>
 *         &lt;element name="claimName" type="{http://www.w3.org/2001/XMLSchema}string"
minOccurs="0"/>
 *         &lt;element name="claimUpDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"
minOccurs="0"/>
 *         &lt;element name="claimType" type="{http://www.w3.org/2001/XMLSchema}string"
minOccurs="0"/>
 *         &lt;element name="estimatedCost" type="{urn:com:bbva:jee:arq:spring:core:servicing:utils}money"
minOccurs="0"/>
 *         &lt;element name="claimers" type="{urn:com:bbva:qzqp:claims:facade:v01}claimer"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="issues" type="{urn:com:bbva:qzqp:claims:facade:v01}issue"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="links" type="{urn:com:bbva:jee:arq:spring:core:servicing:utils}link"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "claim", propOrder = {
    "claimId",
    "claimName",
    "claimUpDate",
    "claimType",
    "estimatedCost",
    "claimers",
    "issues",
    "links"
})
public class Claim {

    protected String claimId;
    protected String claimName;
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar claimUpDate;
    protected String claimType;
    protected Money estimatedCost;
    @XmlElement(nillable = true)
    protected List<Claimer> claimers;
    @XmlElement(nillable = true)
    protected List<Issue> issues;
    @XmlElement(nillable = true)
    protected List<Link> links;

    ...

}

And this is Wadl file:

<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:prefix1="urn:com:bbva:qzqp:claim:facade:v01">
    <grammars>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:com:bbva:jee:arq:spring:core:servicing:utils"
attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="urn:com:bbva:jee:arq:spring:core:servicing:utils">
            <xs:element name="link" type="tns:link"/>
            <xs:element name="money" type="tns:money"/>
            <xs:complexType name="money">
                <xs:sequence>
                    <xs:element minOccurs="0" name="amount" type="xs:decimal"/>
                    <xs:element minOccurs="0" name="currency" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="link">
                <xs:sequence/>
                <xs:attribute name="href" type="xs:string"/>
                <xs:attribute name="method" type="xs:string"/>
                <xs:attribute name="rel" type="xs:string"/>
            </xs:complexType>
        </xs:schema>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn:com:bbva:jee:arq:spring:core:servicing:utils"
xmlns:tns="urn:com:bbva:qzqp:claim:facade:v01" attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="urn:com:bbva:qzqp:claim:facade:v01">
            <xs:import namespace="urn:com:bbva:jee:arq:spring:core:servicing:utils"/>
            <xs:element name="claim" type="tns:claim"/>
            <xs:element name="claimer" type="tns:claimer"/>
            <xs:element name="issue" type="tns:issue"/>
            <xs:complexType name="claim">
                <xs:sequence>
                    <xs:element minOccurs="0" name="claimId" type="xs:string"/>
                    <xs:element minOccurs="0" name="claimName" type="xs:string"/>
                    <xs:element minOccurs="0" name="claimUpDate" type="xs:dateTime"/>
                    <xs:element minOccurs="0" name="claimType" type="xs:string"/>
                    <xs:element minOccurs="0" name="estimatedCost" type="ns1:money"/>
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="claimers" nillable="true"
type="tns:claimer"/>
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="issues" nillable="true"
type="tns:issue"/>
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="links" nillable="true"
type="ns1:link"/>
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="claimer">
                <xs:sequence>
                    <xs:element minOccurs="0" name="claimerEmail" type="xs:string"/>
                    <xs:element minOccurs="0" name="claimerId" type="xs:string"/>
                    <xs:element minOccurs="0" name="claimerName" type="xs:string"/>
                    <xs:element minOccurs="0" name="claimerPhoto" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="issue">
                <xs:sequence>
                    <xs:element minOccurs="0" name="issueDescription" type="xs:string"/>
                    <xs:element minOccurs="0" name="issueId" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </grammars>
    <resources base="http://localhost:8081/qzqp/claims">
        <resource path="/V01" id="com.bbva.qzqp.claims.facade.v01.SrvClaimV01">
            <method name="GET" id="getClaims">
                <request>
                    <param name="$filter" style="query" default="null" type="xs:string"/>
                    <param name="$fields" style="query" default="null" type="xs:string"/>
                    <param name="$expands" style="query" default="null" type="xs:string"/>
                    <param name="$sort" style="query" default="null" type="xs:string"/>
                </request>
                <response>
                    <representation mediaType="application/json" element="prefix1:claims"/>
                </response>
            </method>
            <method name="POST" id="addClaim">
                <request>
                    <representation mediaType="application/json" element="prefix1:claim"/>
                </request>
                <response>
                    <representation mediaType="application/json"/>
                </response>
            </method>
            <resource path="/claimsHead">
                <method name="HEAD" id="claimsHead">
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}">
                <param name="idClaim" style="template" type="xs:string"/>
                <method name="GET" id="getClaim">
                    <request>
                        <param name="$expands" style="query" default="null" type="xs:string"/>
                    </request>
                    <response>
                        <representation mediaType="application/json" element="prefix1:claim"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/claimers">
                <param name="idClaim" style="template" type="xs:string"/>
                <method name="GET" id="getClaimers">
                    <request></request>
                    <response>
                        <representation mediaType="application/json" element="prefix1:claimers"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/claimers/{idClaimer}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idClaimer" style="template" type="xs:string"/>
                <method name="DELETE" id="deleteClaimer">
                    <request></request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/claimers/{idClaimer}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idClaimer" style="template" type="xs:string"/>
                <method name="GET" id="getClaimer">
                    <request></request>
                    <response>
                        <representation mediaType="application/json" element="prefix1:claimer"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/claimers/{idClaimer}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idClaimer" style="template" type="xs:string"/>
                <method name="PUT" id="modifyClaimer">
                    <request>
                        <representation mediaType="application/json" element="prefix1:claimer"/>
                    </request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/issues">
                <param name="idClaim" style="template" type="xs:string"/>
                <method name="GET" id="getIssues">
                    <request></request>
                    <response>
                        <representation mediaType="application/json" element="prefix1:issues"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/issues/{idIssue}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idIssue" style="template" type="xs:string"/>
                <method name="DELETE" id="deleteIssue">
                    <request></request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/issues/{idIssue}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idIssue" style="template" type="xs:string"/>
                <method name="GET" id="getIssue">
                    <request></request>
                    <response>
                        <representation mediaType="application/json" element="prefix1:issue"/>
                    </response>
                </method>
            </resource>
            <resource path="/{idClaim}/issues/{idIssue}">
                <param name="idClaim" style="template" type="xs:string"/>
                <param name="idIssue" style="template" type="xs:string"/>
                <method name="PUT" id="modifyIssue">
                    <request>
                        <representation mediaType="application/json" element="prefix1:issue"/>
                    </request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{id}">
                <param name="id" style="template" type="xs:string"/>
                <method name="DELETE" id="deleteClaim">
                    <request></request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{id}">
                <param name="id" style="template" type="xs:string"/>
                <method name="PUT" id="modifyClaim">
                    <request>
                        <representation mediaType="application/json" element="prefix1:claim"/>
                    </request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{id}/claimers">
                <param name="id" style="template" type="xs:string"/>
                <method name="POST" id="addClaimer">
                    <request>
                        <representation mediaType="application/json" element="prefix1:claimer"/>
                    </request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
            <resource path="/{id}/issues">
                <param name="id" style="template" type="xs:string"/>
                <method name="POST" id="addIssue">
                    <request>
                        <representation mediaType="application/json" element="prefix1:issue"/>
                    </request>
                    <response>
                        <representation mediaType="application/json"/>
                    </response>
                </method>
            </resource>
        </resource>
    </resources>
</application>

What's wrong?.

Thanks in advance!.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message