| [news.eclipse.technology.ohf] Re: bridge's document query response not matching wsdl |
OK, I'm done for the day ;-)
thanks, Jesse
Jesse Pangburn wrote:
Hi all,
I've fixed this and as well found that the confidentiality code has a similar problem where the wsdl shows both a confidentiality code and codes (with an 's'). These two problems are fixed with the following changes to XDSDocType.java:
- remove the setAuthor method
- remove the setConfidentialityCode method
- remove the getConfidentialityCode method
- add a getConfidentialityCodes method
public CodedMetadataType[] getConfidentialityCodes(){
return confidentialityCodes;
}
The IheXdsBridge.java needs only the following change:
- remove this line
xdsDocument.setAuthor(authorToPatientInfoType(documentEntry.getAuthor()));
- replace it with this line
xdsDocument.setAuthors(new PatientInfoType[]{authorToPatientInfoType(documentEntry.getAuthor())});
If you agree, please let me know and I'll create a bug for this. You guys can check in the changes and that should take care of this bug. The confidentiality codes and event codes are always blank I think because of the other bug we talked about, but at least this fix makes the xml sent over the wire match the WSDL.
thanks, Jesse
Jesse Pangburn wrote:
Hi,
I've found that when using the bridge and issuing a document query to the registry, the WSDL says that each document will have both an "author" and an "authors" element. However, there is no author element returned.
Looking into this it's because in the XDSDocType.java file there is the following method:
public void setAuthor(PatientInfoType pAuthor) {
authors = new PatientInfoType[]{pAuthor};
}
There is no corresponding getter method because this set method is simply a convenience method to avoid calling setAuthors instead. However, Axis sees this setter method as indicating there should be a field called "author" passed so it puts that in the WSDL. When Axis is marshalling the java objects into XML though, there is no getter method so no author element is created- leaving the mismatch between the WSDL and what's sent over the wire.
The only place I can find that this is being called is this line in the IheXdsBridge.java:
xdsDocument.setAuthor(authorToPatientInfoType(documentEntry.getAuthor()));
I think the convenience method should be removed and the above line changed to:
PatientInfoType tempAuthor = authorToPatientInfoType(documentEntry.getAuthor());
PatientInfoType tempAuthors = new PatientInfoType[]{tempAuthor};
xdsDocument.setAuthors(tempAuthors);
It could be condensed if you like, but I separated it to multiple lines for clarity. Do you guys agree, and if so, should I submit a bug?
thanks, Jesse