Hello all,
I'm having an issue generating XML via Java code. I have a class that for SailingAvailabilityResponseMessage
. Within this class there are several other classes that are also used in the method I'm writing. Here is a snippet of what the SailingAvailabilityResponseMessage
classes looks like:
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
@XmlType(propOrder={"type", "agency", "version", "release", "processingInfo", "advisoryMessage", "packageDescription", "sailingGroup", "registrationInformation"})
public class SailingAvailabilityResponseMessage {
private ProcessingInfo processingInfo;
private AdvisoryMessage advisoryMessage;
private PackageDescription packageDescription;
private SailingGroupResponse[] sailingGroup;
private RegistrationInformation registrationInformation;
String type;
@XmlAttribute
public String getType() {
return type;
}
The specific issue I'm encountering is related to the SailingGroupResponse[] sailingGroup;
SailingGroupResponse[]
inherits from sailingGroup
. Here is what sailingGroup
looks like:
public class SailingGroup {
private SailingDescription sailingDescription;
public SailingDescription getSailingDescription() {
return sailingDescription;
}
public void setSailingDescription(SailingDescription sailingDescription) {
this.sailingDescription = sailingDescription;
}
And here is what SailingGroupResponse[]
looks like:
import javax.xml.bind.annotation.XmlType;
@XmlType(propOrder={"sailingInformation", "diningDetails", "modeOfTransportation", "currencyInfo", "packageDescription"})
public class SailingGroupResponse extends SailingGroup {
private SailingInformation sailingInformation;
private DiningDetails diningDetails;
private ModeOfTransportation modeOfTransportation;
private CurrencyInfo currencyInfo;
private PackageDescription packageDescription;
The problem I'm encountering with the XML generation is that I'm expecting a tag of <sailingGroup>
which I get but then I also get a tag of <sailingGroupResponse>
which I do not want as it is not part of the original specs I'm following. I'm generating the XML via WebSphere RDi. I'm on SOAP 1.2 but the business partner I'm trying to develop for is on SOAP 1.1 so instead of being able to use JAX-WS runtime, I'm having to use JAX-RPC (apache AXIS will not allow me to generate).
Is anyone familiar with JAX-RPC runtime and issues similar to the one I'm asking? If anyone knows of a good site for me to visit for additional information, I'm willing to research further although so far I've not had much success in finding an answer.
Thanks,
Caren