Announcement Announcement Module
Collapse
No announcement yet.
Cannot find service spring(call web service) HELP!! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot find service spring(call web service) HELP!!

    config:

    <bean id="formService" class="org.springframework.remoting.jaxrpc.JaxRpcP ortProxyFactoryBean">
    <property name="serviceInterface">
    <value>com.test.www.publish.formservice.FormServic eService</value>
    </property>
    <property name="wsdlDocumentUrl">
    <value>http://*.*.106:8080/test/services/FormService?wsdl</value>
    </property>
    <property name="namespaceUri">
    <value>http://*.*.106:8080/</value>
    </property>
    <property name="serviceName">
    <value>FormServiceService</value>
    </property>
    <property name="portName">
    <value>FormService</value>
    </property>
    </bean>


    stack trace:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'accountWebService' defined in URL [file:/E:/proj/Tutorial/Tutorial/test/bin/config/config.xml]: Initialization of bean failed; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Cannot find service: {http://192.168.219.106:8080/}FormServiceService
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Cannot find service: {http://192.168.219.106:8080/}FormServiceService
    at org.apache.axis.client.Service.initService(Service .java:278)
    at org.apache.axis.client.Service.<init>(Service.java :193)
    at org.apache.axis.client.ServiceFactory.createServic e(ServiceFactory.java:232)
    at org.springframework.remoting.jaxrpc.LocalJaxRpcSer viceFactory.createJaxRpcService(LocalJaxRpcService Factory.java:182)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.prepare(JaxRpcPortClientInterceptor. java:290)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.afterPropertiesSet(JaxRpcPortClientI nterceptor.java:268)
    at org.springframework.remoting.jaxrpc.JaxRpcPortProx yFactoryBean.afterPropertiesSet(JaxRpcPortProxyFac toryBean.java:55)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:966)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:358)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:270)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:312)
    at com.neulion.util.spring.UrlXmlApplicationContext.< init>(UrlXmlApplicationContext.java:32)
    at com.neulion.util.BeanFactory.<clinit>(BeanFactory. java:56)
    at com.neulion.tutorial.service.ServiceClient.main(Se rviceClient.java:22)
    java.lang.ExceptionInInitializerError
    at com.neulion.tutorial.service.ServiceClient.main(Se rviceClient.java:22)
    2005-09-19 14:25:43.640|[main]|INFO|tommy|TextStore|Loaded messages from config.messages.test (zh_CN)
    Caused by: com.neulion.util.NLRuntimeException: Error loading: config.xml.
    at com.neulion.util.BeanFactory.<clinit>(BeanFactory. java:61)
    ... 1 more
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'accountWebService' defined in URL [file:/E:/proj/Tutorial/Tutorial/test/bin/config/config.xml]: Initialization of bean failed; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Cannot find service: {http://192.168.219.106:8080/}FormServiceService
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:365)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:270)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:312)
    at com.neulion.util.spring.UrlXmlApplicationContext.< init>(UrlXmlApplicationContext.java:32)
    at com.neulion.util.BeanFactory.<clinit>(BeanFactory. java:56)
    ... 1 more
    Caused by: javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Error processing WSDL document:
    javax.xml.rpc.ServiceException: Cannot find service: {http://192.168.219.106:8080/}FormServiceService
    at org.apache.axis.client.Service.initService(Service .java:278)
    at org.apache.axis.client.Service.<init>(Service.java :193)
    at org.apache.axis.client.ServiceFactory.createServic e(ServiceFactory.java:232)
    at org.springframework.remoting.jaxrpc.LocalJaxRpcSer viceFactory.createJaxRpcService(LocalJaxRpcService Factory.java:182)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.prepare(JaxRpcPortClientInterceptor. java:290)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.afterPropertiesSet(JaxRpcPortClientI nterceptor.java:268)
    at org.springframework.remoting.jaxrpc.JaxRpcPortProx yFactoryBean.afterPropertiesSet(JaxRpcPortProxyFac toryBean.java:55)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:966)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:358)
    ... 7 more

    please tell me why? thanks!

  • #2
    I find the answer,
    the uri is error.
    thanks all of you!

    Comment


    • #3
      What are problem? Please Help

      Config:

      <bean id="myService" class="org.springframework.remoting.jaxrpc.JaxRpcP ortProxyFactoryBean" lazy-init="true">
      <property name="serviceInterface">
      <value>remote.stub.HelloService</value>
      </property>
      <property name="wsdlDocumentUrl">
      <value>http://localhost:8080/My/services/Hello?wsdl</value>
      </property>
      <property name="namespaceUri">
      <value>http://localhost:8080/My/services/Hello</value>
      </property>
      <property name="serviceName">
      <value>HelloService</value>
      </property>
      <property name="portName">
      <value>Hello</value>
      </property>
      </bean>


      exception

      root cause

      javax.xml.rpc.ServiceException: Error processing WSDL document:
      javax.xml.rpc.ServiceException: Error processing WSDL document:
      javax.xml.rpc.ServiceException: Cannot find service: {http://localhost:8080/My/services/Hello}HelloService
      org.apache.axis.client.Service.initService(Service .java:250)
      org.apache.axis.client.Service.<init>(Service.java :165)

      What not so?

      Comment


      • #4
        Your namespaceUri property is wrong.
        It should be set to targetNamespace value of your WSDL file.

        Comment


        • #5
          thanks a lot. It's working now

          Comment

          Working...
          X