xsi:type information is missing after Marshalling in JAXB
843834Apr 16 2008 — edited Apr 26 2008Hi,
I'm trying to mock the webservice, i have created classes for schema using JAXB (without any customization) and it's working. But when i try to marhsall my objects , it doesn't generate the xsi:type information of any element and attribute. I want this information since my webservice client needs this information.
I have tried to use mapSimpleTypeDef ="true" generateElementProperty="false" but it doesn�t help.
Following is output of marshal process
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<return>
<APIVersion>1.0</APIVersion>
<ErrorCode>1000</ErrorCode>
<ErrorInfo> Success</ErrorInfo>
<BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
<HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
<Content xsi:type="java:MessageContentType" xsi:nil="true"/>
</return>
</MessageRetrieveResponseReturn>
I want output to be look like following
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<return xsi:type="java:MessageRetrieveResponse" >
<APIVersion xsi:type="java:apiVersionType">1.0</APIVersion>
<ErrorCode xsi:type="xsd:string">1000</ErrorCode>
<ErrorInfo xsi:type="xsd:string">Success</ErrorInfo>
<BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
<HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
<Content xsi:type="java:MessageContentType" xsi:nil="true"/>
</return>
</MessageRetrieveResponseReturn>
I'm new to JAXB. Please let me know what I�m missing here
Regards