jaxb

XJC does not generate enum inside xs:union

穿精又带淫゛_ 提交于 2021-02-07 13:14:03
问题 I have several XSD files containing structures like the following: <xs:complexType name="SomeThing" abstract="false"> <xs:sequence> <xs:element name="id" type="schema2:SomeIdTypeClass" minOccurs="1" maxOccurs="1"/> <xs:element name="myType" type="schema1:MyType" minOccurs="1" maxOccurs="1"/> </xs:sequence> </xs:complexType> <xs:simpleType name="MyType"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="APPLE"/> <xs:enumeration value="ORANGE"/> <xs:enumeration

XJC does not generate enum inside xs:union

最后都变了- 提交于 2021-02-07 13:14:02
问题 I have several XSD files containing structures like the following: <xs:complexType name="SomeThing" abstract="false"> <xs:sequence> <xs:element name="id" type="schema2:SomeIdTypeClass" minOccurs="1" maxOccurs="1"/> <xs:element name="myType" type="schema1:MyType" minOccurs="1" maxOccurs="1"/> </xs:sequence> </xs:complexType> <xs:simpleType name="MyType"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="APPLE"/> <xs:enumeration value="ORANGE"/> <xs:enumeration

JAX-B: dynamically generate element name from XMLAttribute

对着背影说爱祢 提交于 2021-02-07 04:12:20
问题 I'm using JAX-B (v.2.2.12) to marshal a java objects tree. One of the classes to be marshalled is CaseObject: public class CaseObject { ... @XmlAnyElement @XmlJavaTypeAdapter(ParameterAdapter.class) protected List <CaseObject> caseObjects; ... } The current xml represention after marshalling: <caseObject id="1" name="someName" typeId="0"> ... <caseObject id="29" key="someOtherName" typeId="12"> ... </caseObject> </caseObject> The required target xml represention: <someName id="1" name=

JAX-B: dynamically generate element name from XMLAttribute

ぐ巨炮叔叔 提交于 2021-02-07 04:12:13
问题 I'm using JAX-B (v.2.2.12) to marshal a java objects tree. One of the classes to be marshalled is CaseObject: public class CaseObject { ... @XmlAnyElement @XmlJavaTypeAdapter(ParameterAdapter.class) protected List <CaseObject> caseObjects; ... } The current xml represention after marshalling: <caseObject id="1" name="someName" typeId="0"> ... <caseObject id="29" key="someOtherName" typeId="12"> ... </caseObject> </caseObject> The required target xml represention: <someName id="1" name=

JAX-B: dynamically generate element name from XMLAttribute

孤街醉人 提交于 2021-02-07 04:11:38
问题 I'm using JAX-B (v.2.2.12) to marshal a java objects tree. One of the classes to be marshalled is CaseObject: public class CaseObject { ... @XmlAnyElement @XmlJavaTypeAdapter(ParameterAdapter.class) protected List <CaseObject> caseObjects; ... } The current xml represention after marshalling: <caseObject id="1" name="someName" typeId="0"> ... <caseObject id="29" key="someOtherName" typeId="12"> ... </caseObject> </caseObject> The required target xml represention: <someName id="1" name=

JAX-B: dynamically generate element name from XMLAttribute

谁都会走 提交于 2021-02-07 04:09:02
问题 I'm using JAX-B (v.2.2.12) to marshal a java objects tree. One of the classes to be marshalled is CaseObject: public class CaseObject { ... @XmlAnyElement @XmlJavaTypeAdapter(ParameterAdapter.class) protected List <CaseObject> caseObjects; ... } The current xml represention after marshalling: <caseObject id="1" name="someName" typeId="0"> ... <caseObject id="29" key="someOtherName" typeId="12"> ... </caseObject> </caseObject> The required target xml represention: <someName id="1" name=

JAX-RS with Jersey: Passing form parameters to PUT method for updating a Resource

时光毁灭记忆、已成空白 提交于 2021-02-07 03:35:49
问题 I have to update a Person record having firstName and lastName. User should be able to change it from html form and on submit it should be updated. Here is my code. @PUT @Path("/{userId}") public Response updatingResource(@FormParam("firstName") String firstName, @FormParam("lastName ") String lastName , @PathParam("userId") String userId){ System.out.println(firstName); System.out.println(lastName); return Response.ok().build(); } the SOP statements prints null. I have been using Mozilla

JAX-RS with Jersey: Passing form parameters to PUT method for updating a Resource

こ雲淡風輕ζ 提交于 2021-02-07 03:31:23
问题 I have to update a Person record having firstName and lastName. User should be able to change it from html form and on submit it should be updated. Here is my code. @PUT @Path("/{userId}") public Response updatingResource(@FormParam("firstName") String firstName, @FormParam("lastName ") String lastName , @PathParam("userId") String userId){ System.out.println(firstName); System.out.println(lastName); return Response.ok().build(); } the SOP statements prints null. I have been using Mozilla

JAX-RS with Jersey: Passing form parameters to PUT method for updating a Resource

浪尽此生 提交于 2021-02-07 03:29:41
问题 I have to update a Person record having firstName and lastName. User should be able to change it from html form and on submit it should be updated. Here is my code. @PUT @Path("/{userId}") public Response updatingResource(@FormParam("firstName") String firstName, @FormParam("lastName ") String lastName , @PathParam("userId") String userId){ System.out.println(firstName); System.out.println(lastName); return Response.ok().build(); } the SOP statements prints null. I have been using Mozilla

Customizing Java packages JAXB wsimport

安稳与你 提交于 2021-02-07 03:19:29
问题 I'm trying to generate a client with maven and jaxb from a wsdl file with 2 schemas inside and some elements with the same name from different schemas When I try to execute the compilation I'm getting the next error: Two declarations cause a collision in the ObjectFactory class. WSDL schemas : <wsdl:types> <schema targetNamespace="http://ws.services" xmlns="http://www.w3.org/2001/XMLSchema">...</schema> <schema targetNamespace="http://ws.models" xmlns="http://www.w3.org/2001/XMLSchema">...<