无法使用package-info。 javax.xml.ws.WebServiceException:类XXX没有名称为{YYY}的文档的属性

时间:2014-02-01 16:09:15

标签: java javax.xml

简短:是否可以在我的包测试中更改类(添加一些标题),这样我就不必使用packege-info.java了?

更长的版本: 在eclipse中我的程序运行正常。但是在使用商业加密程序转换为exe后,我收到了错误。

javax.xml.ws.WebServiceException: class test.xsd.SendDocument do not have a property of the name {https://YYY/xsd}document
    at com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:191)
    at com.sun.xml.internal.ws.client.sei.SEIMethodHandler.<init>(SEIMethodHandler.java:105)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.<init>(SyncMethodHandler.java:73)
    at com.sun.xml.internal.ws.client.sei.SEIStub.<init>(SEIStub.java:71)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:628)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at test.GateService.getGateServiceSOAP12Port(GateService.java:74)
    at com.myprogram.model.sign.Declar2TestWS.<init>(Declar2TestWS.java:108)
    at com.myprogram.sap.jco.server.SAPServerConnection$SignXMLFunctionHandler.createWS(SAPServerConnection.java:393)
    at com.myprogram.sap.jco.server.SAPServerConnection$SignXMLFunctionHandler.handleRequest(SAPServerConnection.java:284)
    at com.sap.conn.jco.rt.DefaultServerWorker$FunctionDispatcher.handleRequest(DefaultServerWorker.java:1009)
    at com.sap.conn.jco.rt.DefaultServerWorker$FunctionDispatcher.handleRequest(DefaultServerWorker.java:937)
    at com.sap.conn.jco.rt.DefaultServerWorker.dispatchRequest(DefaultServerWorker.java:153)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:3300) 
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:2350)
    at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:277)
    at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:337)
    at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:238)
    at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.bind.JAXBException: {https://YYY/xsd}document is not a valid property on class test.xsd.SendDocument
    at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:931)
    at com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:188)
    ... 21 more

我设法通过删除packege-info.java在eclipse中获得相同的错误 packege-info.java:

@javax.xml.bind.annotation.XmlSchema(namespace = "https://YYY/xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

package test;

是否可以在我的包测试中更改类(添加一些标题),这样我就不必使用packege-info.java了?

感谢您的帮助!

0 个答案:

没有答案