5 Replies Latest reply on Aug 28, 2009 6:18 AM by lucastoledo

    Cannot obtain wsdl service

    schmil

      Hi all,

      since i upgraded my JBoss from 4.0.5 GA to 4.2.2 GA i have the following issue within my webservice.

      2008-04-23 13:59:43,171 ERROR [OrderServiceClient] Exception during Webservice call:
      java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://localhost:8080/ina}DitaServiceHandlerService
       at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:172)
       at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:134)
       at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
       at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
       at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
       at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:142)
       at OrderServiceClient.sendOrders(OrderServiceClient.java:160)
      


      Are there any changes i forgot ?

      Here is my code:

      OrderServiceClient.java
      import javax.xml.namespace.QName;
      import javax.xml.rpc.Service;
      import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
      ...
      ServiceFactoryImpl factory = new ServiceFactoryImpl();
      URL wsdlURL = Thread.currentThread().getContextClassLoader().getResource("META-INF/service/DitaServiceHandler.xml");
      URL mappingURL = Thread.currentThread().getContextClassLoader().getResource("META-INF/service/jaxrpc-mapping.xml");
      QName qname = new QName("http://localhost:8080/ina", "DitaServiceHandlerService");
      Service service = factory.createService(wsdlURL, qname, mappingURL);
      


      DitaServiceHandler.xml
      <wsdl:definitions targetNamespace="urn:ina:ws:dita:de"
      xmlns:impl="urn:ina:ws:dita:de"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      ...
      


      jaxrpc-mapping.xml
       <package-mapping>
       <package-type>ws.client</package-type>
       <namespaceURI>urn:ina:ws:dita:de</namespaceURI>
       </package-mapping>
      ...
      



      Thanks in advance.
      Lars

        • 1. Re: Cannot obtain wsdl service
          pramod_bs

          I think you are using JAX-RPC client. Try using JAX-WS client.

          • 2. Re: Cannot obtain wsdl service
            schmil

            On changing to JAX-WS i got the following Error message:

            2008-04-23 17:39:08,214 ERROR [OrderServiceClient] Exception during Webservice call:
            java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://localhost:8080/ina}DitaServiceHandlerService we have [{urn:ina:ws:dita:de}DitaServiceHandlerService]
             at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaDataInternal(JAXWSClientMetaDataBuilder.java:145)
             at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:87)
             at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:131)
             at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
             at javax.xml.ws.Service.<init>(Service.java:56)
             at javax.xml.ws.Service.create(Service.java:680)
             at OrderServiceClient.sendOrders(OrderServiceClient.java:155)
            


            and after replacing

            QName qname = new QName("http://localhost:8080/ina", "DitaServiceHandlerService");

            with
            QName qname = new QName("urn:ina:ws:dita:de", "DitaServiceHandlerService");

            and copying
            - jaxb-api.jar
            - jboss-jaxws.jar
            - jboss-saaj.jar
            from client\ to lib\endorsed\

            it works fine. Thanks
            Lars

            • 3. Re: Cannot obtain wsdl service

              Hi there, I am running jboss-4.2.1.GA and I am encountering the exact problem.
              I followed the instruction posted in the last reply (copying - jaxb-api.jar - jboss-jaxws.jar - jboss-saaj.jar from client\ to lib\endorsed\ ) and it caused a new type of problem.
              Here is the log error:

              14:31:22,046 ERROR [JmsServerSession] Unexpected error delivering message org.jboss.mq.SpyObjectMess
              age {
              Header {
               jmsDestination : QUEUE.AsyncPlugin
               jmsDeliveryMode : 2
               jmsExpiration : 0
               jmsPriority : 4
               jmsMessageID : ID:6-12506022817341
               jmsTimeStamp : 1250602281734
               jmsCorrelationID: null
               jmsReplyTo : null
               jmsType : null
               jmsRedelivered : false
               jmsProperties : {}
               jmsPropReadWrite: false
               msgReadOnly : true
               producerClientId: ID:6
              }
              }
              javax.ejb.EJBTransactionRolledbackException: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
               at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
               at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
               at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
               at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
               at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
               at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
               at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
               at $Proxy154.onMessage(Unknown Source)
               at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
               at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:891)
               at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
               at org.jboss.mq.SpySession.run(SpySession.java:323)
               at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
               at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
               at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
               at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
               at java.lang.Thread.run(Thread.java:595)
              Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
               at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:174)
               at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
               at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
               at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
               at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
               ... 17 more
              Caused by: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
               at javax.xml.soap.FactoryLoader.<clinit>(FactoryLoader.java:47)
               at javax.xml.ws.spi.Provider.provider(Provider.java:91)
               at javax.xml.ws.Service.<init>(Service.java:83)
               at com.abm_uk.imswebservice.CurrentCrimesRequest_Service.<init>(CurrentCrimesRequest_Service.java:42)
               at com.beatSystems.nottsPolice.crime.myCrime.CurrentCrimesUtility.getService(CurrentCrimesUtility.java:48)
               at com.beatSystems.mobaq.backend.notts.crime.configuration.CrimeConfigurationManager.getCurrentCrimesClient(CrimeConfigurationManager.java:277)
               at com.beatSystems.mobaq.backend.notts.crime.plugins.NottsMyCurrentCrimesUploadPlugin.processUpload(NottsMyCurrentCrimesUploadPlugin.java:55)
               at com.beatSystems.mobaq.core.plugin.GenericUploadPlugin.handle(GenericUploadPlugin.java:17)
               at com.beatSystems.mobaq.core.bean.PluginHandlerListenerBean.handle(PluginHandlerListenerBean.java:55)
               at com.beatSystems.mobaq.core.bean.PluginHandlerListenerBean.onMessage(PluginHandlerListenerBean.java:45)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
               at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
               ... 24 more
              


              Has anyone encounter a similar problem as a result of these changes?
              Thanks in advance for replies.

              • 4. Re: Cannot obtain wsdl service
                peterj

                Is this on the client side? Looks like a JAR file is missing from the classpath. The missing class is in client/jboss-common-client.jar and client/jbossall-client.jar in 4.2.3 (I don't have a copy of 4.2.1 handy to check there).

                • 5. Re: Cannot obtain wsdl service

                  Hi there,
                  I have reverted the changes that led to this error and it workss
                  Maybe a reason for it is that I modified WSDL_URL to point to actual WSDL in file system instead of using an http URL path.
                  Thanks PeterJ for your reply.
                  Regards,
                  Lucas