Map from date/dateTime in XSD to dateTime in WSDL -


i'm working in project exposes webservices soap 1.1. have xsd file define entities has like

<xs:complextype name="somecomplextype">     <xs:sequence>         <!-- tried xs:datetime -->         <xs:element name="startdate" type="xs:date" minoccurs="1" />         <xs:element ... />     </xs:sequence> </xs:complextype> 

with eclipse can generate classes , have like

public class somecomplextype {      // xml annotations      private xmlgregoriancalendar startdate; } 

the problem when check url in browser (http://example.com/myservice?wsdl) see generated wsdl see like

<xs:complextype name="somecomplextype">     <xs:sequence>         <xs:element form="qualified" name="startdate"             type="xs:anysimpletype" />         <xs:element ... />     </xs:sequence> </xs:complextype> 

but need map date or datetime in xsd datetime in wsdl. how can accomplish that?

note: need touch "as less posible" configuration xsd file (solve there ideal)

i've been searching around posts here , jboss developers of them suggest config files, or add configuration in maven plugins, not desirable me.

any contribution welcomed. in advance answers

after seeing jaxb classes found way solve problem. unfortunately, isn't automatically built eclipse have boilerplate.

first of all, have serialize hand every generated class, passible streamed in given moment. it's recomended, jaxb classes pojo's in end (or @ least point of view), it's useful override hashcode(), equals() , tostring().

lastly, , solve problem, need add @javax.xml.bind.annotation.xmlschematype(name = "datetime") every xmlgregoriancalendar property. generated wsdl have properties xs:datetime.

hope helps somebody. best regards


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -