|
|
|
SOAPElement как параметр в операции Web-сервиса
|
|||
|---|---|---|---|
|
#18+
Добрый день! В силу производственной необходимости придется создавать Soap Web-сервис. Для ознакомления с вопросом воспользовался учебным примером с ресурса http://netbeans.org/kb/docs/websvc/jax-ws.html. В силу ряда причин, тип в операции Web-сервиса мне нужен SoapElement. Для тестовых целей я добавил оперцию: @WebMethod(operationName = "CheckDocuments") public String CheckDocuments(@WebParam(name = "Elem") SOAPElement Elem) { //TODO write your implementation code here: return null; } Однако при попытке тестирования (естественно после очистки и сборки) сервиса выдается сообщение: Error generating artifacts for the following WSDL http://localhost:8080/CalculatorWS/CalculatorWS?WSDL Possible causes can be invoking https when the application is not configured for security. Подскажите в чем м.б. дело. AppServer GlassFish 3.1. Ide NetBeans 7.0.1. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2012, 22:18:29 |
|
||
|
SOAPElement как параметр в операции Web-сервиса
|
|||
|---|---|---|---|
|
#18+
Вбейте в гугле "Possible causes can be invoking https when the application is not configured for security" - получите ответ ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2012, 22:21:27 |
|
||
|
SOAPElement как параметр в операции Web-сервиса
|
|||
|---|---|---|---|
|
#18+
svenom, Честно говоря google не помог... Вопросы есть но ответов не увидел.. В логах glassfish обнаружил такое сообщение: Cannot initialize endpoint : error is : javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:171) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:99) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:250) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:343) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:205) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:513) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:568) at org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:271) at org.glassfish.webservices.Ejb3MessageDispatcher.handleGet(Ejb3MessageDispatcher.java:150) at org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:93) at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:200) at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002) at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942) at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404) at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:354) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions javax.xml.soap.SOAPElement is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at javax.xml.soap.SOAPElement at public javax.xml.soap.SOAPElement org.me.calculator.jaxws.CheckDocuments.elem at org.me.calculator.jaxws.CheckDocuments javax.xml.soap.SOAPElement does not have a no-arg default constructor. this problem is related to the following location: at javax.xml.soap.SOAPElement at public javax.xml.soap.SOAPElement org.me.calculator.jaxws.CheckDocuments.elem at org.me.calculator.jaxws.CheckDocuments at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158) ... 33 more Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions javax.xml.soap.SOAPElement is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at javax.xml.soap.SOAPElement at public javax.xml.soap.SOAPElement org.me.calculator.jaxws.CheckDocuments.elem at org.me.calculator.jaxws.CheckDocuments javax.xml.soap.SOAPElement does not have a no-arg default constructor. this problem is related to the following location: at javax.xml.soap.SOAPElement at public javax.xml.soap.SOAPElement org.me.calculator.jaxws.CheckDocuments.elem at org.me.calculator.jaxws.CheckDocuments at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:466) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:298) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141) at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1157) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:111) at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:113) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:166) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159) ... 35 more ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2012, 23:30:16 |
|
||
|
SOAPElement как параметр в операции Web-сервиса
|
|||
|---|---|---|---|
|
#18+
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions javax.xml.soap.SOAPElement is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at javax.xml.soap.SOAPElement at public javax.xml.soap.SOAPElement org.me.calculator.jaxws.CheckDocuments.elem at org.me.calculator.jaxws.CheckDocuments javax.xml.soap.SOAPElement does not have a no-arg default constructor ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2012, 23:49:40 |
|
||
|
SOAPElement как параметр в операции Web-сервиса
|
|||
|---|---|---|---|
|
#18+
Спасибо! Слона то я и не заметил. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.01.2012, 11:30:01 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=37634131&tid=2132694]: |
0ms |
get settings: |
12ms |
get forum list: |
21ms |
check forum access: |
6ms |
check topic access: |
6ms |
track hit: |
47ms |
get topic data: |
14ms |
get forum data: |
4ms |
get page messages: |
60ms |
get tp. blocked users: |
2ms |
| others: | 330ms |
| total: | 502ms |

| 0 / 0 |
