grails wsclient“找不到文件”使用 .net Web 服务
首先,如果我的问题很愚蠢,我想道歉,但我对在 grails 中使用 .net web 服务确实很陌生。
有一个 SOAP WS(我无法以任何方式操作),我以这种方式使用它:
def wsdlURL = "_HttpUrl_'/AspNetOracleProviderService.asmx?WSDL"
def proxy = webService.getClient(wsdlURL) <= This is the line where my project fails
现在,我已经在 asp.Net 项目中测试了此服务,没有遇到任何问题,但在 Grails 中它会生成以下错误:
错误 500:执行控制器 [pruebaplugins.PruebaWsClientController] 的操作 [create] 导致异常:无法为生成的包创建 JAXBContext:“com.something.anothersomething”不包含 ObjectFactory.class 或 jaxb.index
我已定义 JAVA_HOME 和 javac 是在那里,我可以在命令提示符的任何位置访问它。
在这篇文章的末尾,我将提供详细信息。
我只测试了这项服务和著名的摄氏度-华氏度示例,它没有任何问题,我认为这是因为它只返回一个字符串,与我的或任何其他服务不同。
我不知道是否缺少某些东西,肯定可能是我忽略的东西。 就像我说的,我对此类事情非常陌生,我将不胜感激任何帮助。
不管怎样,谢谢。
详细信息:
当我
debug 'org.apache.cxf'
在 Config.groovy 中放入 log4j 时 输出给我这个:
2012-01-25 16:08:13,514 [http-8080-2] INFO spring.BusApplicationContext - 刷新 org.apache.cxf.bus.spring.BusApplicationContext@5c3e99:启动日期 [1 月 25 日星期三 16:08: 13 CLST 2012];上下文层次结构的根 2012-01-25 16:08:13,639 [http-8080-2] 信息 spring.BusApplicationContext
- 未检测到 cxf.xml 配置文件,依赖于默认值。2012-01-25 16:08:13,820 [http-8080-2] 调试 spring.ControlledValidationXmlBeanDefinitionReader
- 从位置模式加载 0 个 bean 定义 [classpath:META-INF/cxf/cxf-extension-http.xml]2012-01-25 16:08:13,848 [http-8080-2] 调试 spring.BusApplicationContext
- org.apache.cxf.bus.spring.BusApplicationContext@5c3e99的Bean工厂:org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e8f3:定义bean [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring .BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationF actoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.bus生命周期.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.h ttp.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceCont ractResolverRegistry,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver ,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorC配置器,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider, org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.transport.local.LocalTransportFactory,org.apache。 cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.a pache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.management.InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transpo rt.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.ws.securi ty.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.Do mainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngi新,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOAssertionBuilde r,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws。 rm.RMAssertionBuilder];工厂层次结构的根2012-01-25 16:08:14,009 [http-8080-2] 调试 spring.BusApplicationContext
- 无法找到名为“messageSource”的 MessageSource:使用默认的 [org.springframework.context.support.DelegatingMessageSource@cb229]2012-01-25 16:08:14,009 [http-8080-2] 调试 spring.BusApplicationContext
- 无法找到名称为“applicationEventMulticaster”的ApplicationEventMulticaster:使用默认值[org.springframework.context.event.SimpleApplicationEventMulticaster@184b649]2012-01-25 16:08:16,095 [http-8080-2] 调试 spring.BusApplicationContext
- 无法找到名称为“lifecycleProcessor”的 LifecycleProcessor:使用默认值 [org.springframework.context.support.DefaultLifecycleProcessor@1e10f02]2012-01-25 16:08:18,925 [http-8080-2] 信息动态.DynamicClientFactory
javac:找不到文件:C:\Users\DYT01\AppData\Local\Temp\org.apache.cxf.endpoint.dynamic.DynamicClientFactory@8a3c71-1327518498999-src\com\something\anothersmth\CambiarContraseña.java< /p>
- 创建的类:com.something.anothersmth.Aplicacion、com.something.anothersmth.ArrayOfControl、com.something.anothersmth.ArrayOfModulo、com.something.anothersmth.ArrayOfPagina、com.something.anothersmth.ArrayOfRol 等(...all类)用法:javac 使用 -help 获取可能选项的列表
2012-01-25 16:08:20,637 [http-8080-2] 错误dynamic.DynamicClientFactory - 无法编译...HttpUrl/AspNetOracleProviderService.asmx?WSDL 的java 文件。< /p>
first of all, I want to apologize if my question is stupid, but I'm really new in consuming .net web service in grails.
There's a SOAP WS (wich I can't manipulate in any way) that I consume whis way:
def wsdlURL = "_HttpUrl_'/AspNetOracleProviderService.asmx?WSDL"
def proxy = webService.getClient(wsdlURL) <= This is the line where my project fails
Now, I've tested this service in a asp.Net Project with no troubles, but in Grails it generates me this error:
Error 500: Executing action [create] of controller [pruebaplugins.PruebaWsClientController] caused exception: Unable to create JAXBContext for generated packages: "com.something.anothersomething" doesnt contain ObjectFactory.class or jaxb.index
I have defined the JAVA_HOME and javac Is there, I can acces to it in any location in a command prompt.
At the end of this post I'll put de detailed info.
I've only tested this service and the well-known Celsius-Farenheit example, wich works with no problems, I think it's because it only returns a String, unlike mine or any other services.
I don't know if its a lack of something, surely could be something I ignore.
Like I said, I'm very new in this kind of stuff and I'd appreciate any kind of help.
Thanks anyway.
Detailed info:
When I put
debug 'org.apache.cxf'
in log4j in Config.groovy
the output throw me this:
2012-01-25 16:08:13,514 [http-8080-2] INFO spring.BusApplicationContext - Refreshing org.apache.cxf.bus.spring.BusApplicationContext@5c3e99: startup date [Wed Jan 25 16:08:13 CLST 2012]; root of context hierarchy
2012-01-25 16:08:13,639 [http-8080-2] INFO spring.BusApplicationContext
- No cxf.xml configuration file detected, relying on defaults.2012-01-25 16:08:13,820 [http-8080-2] DEBUG spring.ControlledValidationXmlBeanDefinitionReader
- Loaded 0 bean definitions from location pattern [classpath:META-INF/cxf/cxf-extension-http.xml]2012-01-25 16:08:13,848 [http-8080-2] DEBUG spring.BusApplicationContext
- Bean factory for org.apache.cxf.bus.spring.BusApplicationContext@5c3e99: org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e8f3: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.management.InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder]; root of factory hierarchy2012-01-25 16:08:14,009 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@cb229]2012-01-25 16:08:14,009 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@184b649]2012-01-25 16:08:16,095 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@1e10f02]2012-01-25 16:08:18,925 [http-8080-2] INFO dynamic.DynamicClientFactory
- Created classes: com.something.anothersmth.Aplicacion, com.something.anothersmth.ArrayOfControl, com.something.anothersmth.ArrayOfModulo, com.something.anothersmth.ArrayOfPagina, com.something.anothersmth.ArrayOfRol, etc (...all the classes)javac: file not found: C:\Users\DYT01\AppData\Local\Temp\org.apache.cxf.endpoint.dynamic.DynamicClientFactory@8a3c71-1327518498999-src\com\something\anothersmth\CambiarContraseña.java
Usage: javac
use -help for a list of possible options2012-01-25 16:08:20,637 [http-8080-2] ERROR dynamic.DynamicClientFactory - Could not compile java files for ...HttpUrl/AspNetOracleProviderService.asmx?WSDL.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论