Why is my Enum-like xml attribute disappearing when being sent to the webservice?



I am programming a framework that sends packages of data to a web service. I have generated the xml-annotated classes with the help of JAXB and JAX-WS. This is my first encounter with these frameworks, so after a while now, I can't remember the details of that operation anymore.


I have now coded functions to populate, and make validation checks on the packages of data. However, a couple of sub-object fields have only certain values allowed. In this case, the allowed values are: "Error", "Warning", "Information" and "Verbose".


In my validations, I can clearly see that the value of the specified field is "Warning". I get the same results if I debug, and check the object in the very last line before it is sent.


I am using Wireshark to see what the contents of my http POST really is, and to my surprise, the value of <Type> is now completely gone. The rest of the post goes through, and the other elements are persisted to the database, but not the element containing the type-parameter


I would love to post qualified and relevant code to accompany this question, but the truth is, I am completely lost as to where it could go wrong. I'll try to give you a few stubs, but if anyone has anything specific that they want me to add, feel free to request it.


public interface LoggingService {



/**
*
* @param _package
*/
@WebMethod(operationName = "SubmitLog", action = "http://ift.tt/1wlVCs6")
@Oneway
@RequestWrapper(localName = "SubmitLog", targetNamespace = "http://ift.tt/1wlVCs8", className = "client.SubmitLog")
public void submitLog(
@WebParam(name = "Package", targetNamespace = "http://ift.tt/1wlVCs8")
LogPackage _package);


The LogPackage class is the wrapper class for the data. Inside it there is an array of objects that contains my type-parameter. One other field has the same problem, in another object...



LogPackageValidator.checkForErrors(logPackage);

LoggingService_Service lss = null;
try {
lss = new LoggingService_Service(new URL("http://ift.tt/1wlVF7d"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
LoggingService loggingService = lss.getPort(LoggingService.class);
loggingService.submitLog(logPackage);


At the last line, the values are still intact. I can't find any way to check the values inbetween this point, and wireshark's check of outgoing http.


No comments:

Post a Comment