我使用JAXB和CXF創建了一個WSDL第一個webservice。我不擁有WSDL,因此我無法對其進行更改。我使用ftp://ftp.ihe.net/TF_Implementation_Material/ITI/wsdl/PIXManager.wsdl作爲我的WSDL。我使用CXF 2.3.0來生成Java類。JAXB,CXF:沒有ObjectFactory和元素@XmlElementDecl ...
Java類代都很好,但是當我試圖在Web應用程序中運行這個,我得到一個錯誤
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 17 counts of IllegalAnnotationExceptions
的17個計數格式
There's no ObjectFactory with an @XmlElementDecl for the element {urn:hl7-org:v3}assignedDevice.
this problem is related to the following location:
at protected javax.xml.bind.JAXBElement org.hl7.v3.QUQIMT021001UV01AuthorOrPerformer.assignedDevice
當我去提到的類,即QUQIMT021001UV01AuthorOrPerformer和實地考察一下assignedDevice,我看到這個
@XmlElementRef(name = "assignedDevice", namespace = "urn:hl7-org:v3", type = JAXBElement.class)
protected JAXBElement<COCTMT090300UV01AssignedDevice> assignedDevice;
當我看包的ObjectFactory的,我看到這個
private final static QName _COCTMT090303UV01AssignedDeviceAssignedDevice_QNAME = new QName("urn:hl7-org:v3", "assignedDevice");
我所有的17個錯是相似的。我可以在我的代碼或運行時執行什麼操作以獲得我的服務?
我在我的codegen中使用了多個WSDL,並且這導致了這些定義中的衝突。我將其修剪爲一個WSDL並且工作正常。不過,我想看看如何使用codegen中使用的多個WSLD。 – rahul 2011-05-10 22:52:26