“对于元素{},没有带有@XmlElementDecl的ObjectFactory” - 仅适用于WSDL中的字节数组

时间:2014-07-14 23:32:22

标签: jaxb

这个问题与这个WSDL有关(用&#34替换_;" - 不能在这里使用IP地址作为链接): https://46.30.8.63/indeni4it/MainFunctionsHandlerService?wsdl

我成功运行了wsimport。当我尝试调用Web服务时,我得到以下异常。有趣的是,该异常突出了WSDL中的6个字段 - 所有字段都是字节数组(用于传输二进制内容)。

我无法弄清楚我做错了什么。请注意,此WSDL可以与其他环境(.NET等)完美地加载。

请注意,我已经更换了WSDL的公司名称" myco"在例外文本中。只是为了避免搜索引擎拉出名字。

  

线程中的异常" main" javax.xml.ws.WebServiceException:无法创建JAXBContext       at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:156)       at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:84)       at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:234)       at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:673)       at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:661)       at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)       at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)       at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)       在javax.xml.ws.Service.getPort(Service.java:119)       在com.myco.singlesensor.glassfish.MainFunctionsHandlerService.getMainFunctionsHandlerPort(MainFunctionsHandlerService.java:68)       在com.myco.Main.main(Main.java:19)       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       at java.lang.reflect.Method.invoke(Method.java:606)       在com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)   引起:java.security.PrivilegedActionException:com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:6个IllegalAnnotationExceptions计数   对于元素{},没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           在受保护的javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.GetBlobDataResponse._return           在com.myco.singlesensor.glassfish.GetBlobDataResponse   对于元素{} signatureBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystemUsingBlob.signatureBytes           在com.myco.singlesensor.glassfish.UpdateSystemUsingBlob   对于元素{} licenseData,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UploadNewLicense.licenseData           在com.myco.singlesensor.glassfish.UploadNewLicense   对于元素{} packageFileBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystem.packageFileBytes           在com.myco.singlesensor.glassfish.UpdateSystem   对于元素{} signatureBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystem.signatureBytes           在com.myco.singlesensor.glassfish.UpdateSystem   对于元素{}内容,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           在受保护的javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.AppendBlobData.content           在com.myco.singlesensor.glassfish.AppendBlobData

at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:143)
... 15 more
  

引起:com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:6个IllegalAnnotationExceptions计数   对于元素{},没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           在受保护的javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.GetBlobDataResponse._return           在com.myco.singlesensor.glassfish.GetBlobDataResponse   对于元素{} signatureBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystemUsingBlob.signatureBytes           在com.myco.singlesensor.glassfish.UpdateSystemUsingBlob   对于元素{} licenseData,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UploadNewLicense.licenseData           在com.myco.singlesensor.glassfish.UploadNewLicense   对于元素{} packageFileBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystem.packageFileBytes           在com.myco.singlesensor.glassfish.UpdateSystem   对于元素{} signatureBytes,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           at protected javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.UpdateSystem.signatureBytes           在com.myco.singlesensor.glassfish.UpdateSystem   对于元素{}内容,没有带有@XmlElementDecl的ObjectFactory。       此问题与以下位置有关:           在受保护的javax.xml.bind.JAXBElement com.myco.singlesensor.glassfish.AppendBlobData.content           在com.myco.singlesensor.glassfish.AppendBlobData

at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:450)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:282)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:125)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1147)
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:173)
at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:95)
at com.sun.xml.internal.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:98)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:143)
... 17 more
  

使用退出代码1完成处理

0 个答案:

没有答案