Announcement Announcement Module
Collapse
No announcement yet.
setWsdlDocumentUrl - Missing WSDL document Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • setWsdlDocumentUrl - Missing WSDL document

    I want to set the WSDL document URL programatically using setWsdlDocumentUrl.

    I have Client proxy and in that proxy I am setting the wsdl like this
    Code:
    	      URL lURL = null;
    	      // Set the web services url address from the dynamic replaced
    	      // method
    	      try{
    	      	lURL = new URL("http://localhost:8080/bu-test/services/buwebservices?wsdl");
    	      }catch(MalformedURLException lException){
    	      	// TODO: Provide exception handling
    	      }
    	      setWsdlDocumentUrl(lURL);
    When I run the client I get the exception

    HTML Code:
    javax.xml.rpc.ServiceException: Missing WSDL document
    	at org.apache.axis.client.Service.getPort(Service.java:315)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare(JaxRpcPortClientInterceptor.java:328)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:475)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy1.requestAffiliateeActivity(Unknown Source)
    	at com.netbet.affiliate.facade.BusinessUnitClient.requestAffiliateeActivity(BusinessUnitClient.java:134)
    	at com.netbet.affiliate.facade.BusinessUnitClientTest.testRequestAffiliatee(BusinessUnitClientTest.java:56)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at junit.framework.TestCase.runTest(TestCase.java:154)
    	at junit.framework.TestCase.runBare(TestCase.java:127)
    	at junit.framework.TestResult$1.protect(TestResult.java:106)
    	at junit.framework.TestResult.runProtected(TestResult.java:124)
    	at junit.framework.TestResult.run(TestResult.java:109)
    	at junit.framework.TestCase.run(TestCase.java:118)
    	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    	at junit.framework.TestSuite.run(TestSuite.java:203)
    	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Some more exception

    HTML Code:
    org.springframework.remoting.RemoteAccessException: Cannot access remote service [{http://localhost:8080/bu-test/services/buwebservices}buwebservices]; nested exception is org.apache.axis.AxisFault: No client transport named 'null' found!
    2006-08-29 16:51:13,218 [main] ERROR com.netbet.affiliate.facade.BusinessUnitServices - RequestAffiliateeActivity : Error Connecting to BusinessUnit. org.springframework.remoting.RemoteAccessException: Cannot access remote service [{http://localhost:8080/bu-test/services/buwebservices}buwebservices]; nested exception is org.apache.axis.AxisFault: No client transport named 'null' found!
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
     faultSubcode: 
     faultString: No client transport named 'null' found!
     faultActor: 
     faultNode: 
     faultDetail: 
    	{http://xml.apache.org/axis/}stackTrace:No client transport named 'null' found!
    	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:170)
    	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    	at org.apache.axis.client.Call.invoke(Call.java:2767)
    	at org.apache.axis.client.Call.invoke(Call.java:2443)
    	at org.apache.axis.client.Call.invoke(Call.java:2366)
    	at org.apache.axis.client.Call.invoke(Call.java:1812)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.performJaxRpcCall(JaxRpcPortClientInterceptor.java:543)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:507)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy1.requestAffiliateeActivity(Unknown Source)
    	at com.netbet.affiliate.facade.BusinessUnitClient.requestAffiliateeActivity(BusinessUnitClient.java:134)
    	at com.netbet.affiliate.facade.BusinessUnitClientTest.testRequestAffiliatee(BusinessUnitClientTest.java:56)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at junit.framework.TestCase.runTest(TestCase.java:154)
    	at junit.framework.TestCase.runBare(TestCase.java:127)
    	at junit.framework.TestResult$1.protect(TestResult.java:106)
    	at junit.framework.TestResult.runProtected(TestResult.java:124)
    	at junit.framework.TestResult.run(TestResult.java:109)
    	at junit.framework.TestCase.run(TestCase.java:118)
    	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    	at junit.framework.TestSuite.run(TestSuite.java:203)
    	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    
    	{http://xml.apache.org/axis/}hostname:parmod
    
    No client transport named 'null' found!
    	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:170)
    	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    	at org.apache.axis.client.Call.invoke(Call.java:2767)
    	at org.apache.axis.client.Call.invoke(Call.java:2443)
    	at org.apache.axis.client.Call.invoke(Call.java:2366)
    	at org.apache.axis.client.Call.invoke(Call.java:1812)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.performJaxRpcCall(JaxRpcPortClientInterceptor.java:543)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:507)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy1.requestAffiliateeActivity(Unknown Source)
    	at com.netbet.affiliate.facade.BusinessUnitClient.requestAffiliateeActivity(BusinessUnitClient.java:134)
    	at com.netbet.affiliate.facade.BusinessUnitClientTest.testRequestAffiliatee(BusinessUnitClientTest.java:56)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at junit.framework.TestCase.runTest(TestCase.java:154)
    	at junit.framework.TestCase.runBare(TestCase.java:127)
    	at junit.framework.TestResult$1.protect(TestResult.java:106)
    	at junit.framework.TestResult.runProtected(TestResult.java:124)
    	at junit.framework.TestResult.run(TestResult.java:109)
    	at junit.framework.TestCase.run(TestCase.java:118)
    	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    	at junit.framework.TestSuite.run(TestSuite.java:203)
    	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    However I don't get this exception when I set the WSDL document in the configuration

    Code:
    	  	<property name="wsdlDocumentUrl">
    			<value>http://localhost:8080/bu-test/services/buwebservices?wsdl</value>
    		</property>

    I am using Spring 2.0 RC2.

    Thanks.

  • #2
    I'm trying to figure out why would you want to do that and it doesn't work somehow.

    Your service interface has to implement methods defined by WSDL, so you can't switch WSDLs that are structurally different. You could switch the WSDLs that are structurally same, but come from different servers. The only thing that changes in that case is the default service endpoint url (which you can change independently from WSDL).

    Comment


    • #3
      I am working on a system where this service is hosted by more than one business unit. They all would be using the same wsdl, but it would be hosted by different servers e.g. domain1.bu.com, domain2.bu.com.

      So what I want to do is to change the wsdl location and end point url at the run time depending on the business unit.

      Is it a defect in Spring RC2?

      Thanks.


      Originally posted by dejanp
      I'm trying to figure out why would you want to do that and it doesn't work somehow.

      Your service interface has to implement methods defined by WSDL, so you can't switch WSDLs that are structurally different. You could switch the WSDLs that are structurally same, but come from different servers. The only thing that changes in that case is the default service endpoint url (which you can change independently from WSDL).

      Comment


      • #4
        You don't need to reference the wsdl through the production endpoint "http://...?wsdl" url. Download the wsdl and pack it into your application. The endpoint url you can set in the application context using the MethodInvokingFactoryBean.

        Comment


        • #5
          So you saying that I can download the wsdl from any location and refer it from my application irrespective of wsdl location?

          I will try this, but it's to hard to understand why I wasn't able to inject wsdl url

          Thanks.


          Originally posted by dejanp
          You don't need to reference the wsdl through the production endpoint "http://...?wsdl" url. Download the wsdl and pack it into your application. The endpoint url you can set in the application context using the MethodInvokingFactoryBean.

          Comment


          • #6
            But why injecting WSDL URL dynamically is not working.

            Originally posted by dejanp
            You don't need to reference the wsdl through the production endpoint "http://...?wsdl" url. Download the wsdl and pack it into your application. The endpoint url you can set in the application context using the MethodInvokingFactoryBean.

            Comment


            • #7
              It's one of the requirement that we have to fetch the wsdl from the remote location. I cannot store wsdl locally.

              I need to set the wsdl location dynamically.

              Any ideas?

              Thanks.


              Originally posted by parmod
              But why injecting WSDL URL dynamically is not working.

              Comment


              • #8
                If I understand it correctly the wsdl location doesn't change on call by call basis, but it's generated and set once at the startup, right? Did you try setting lookupServiceOnStartup to false and then setting the wsdl location in afterPropertiesSet()? (or use MethodInvokingFactoryBean to set it)

                Comment


                • #9
                  wsdl location does not change on call by call basis, but it does change with change in end point. In my facade service I change the endpoint and I want to change the wsdl location.

                  looking into LocalJaxRpcServiceFactory

                  Code:
                  	/**
                  	 * Create a JAX-RPC Service according to the parameters of this factory.
                  	 * @see #setServiceName
                  	 * @see #setWsdlDocumentUrl
                  	 * @see #postProcessJaxRpcService
                  	 */
                  	public Service createJaxRpcService() throws ServiceException {
                  		ServiceFactory serviceFactory = createServiceFactory();
                  
                  		// Create service based on this factory's settings.
                  		Service service = createService(serviceFactory);
                  
                  		// Allow for custom post-processing in subclasses.
                  		postProcessJaxRpcService(service);
                  
                  		return service;
                  	}

                  It seems that the service would be created even before I get to my proxy.

                  Thanks.

                  Originally posted by dejanp
                  If I understand it correctly the wsdl location doesn't change on call by call basis, but it's generated and set once at the startup, right? Did you try setting lookupServiceOnStartup to false and then setting the wsdl location in afterPropertiesSet()? (or use MethodInvokingFactoryBean to set it)

                  Comment


                  • #10
                    setWsdlDocumentUrl

                    Hello All,

                    Did you solve this problem?

                    I want to set wsdlDocumentURL in my project.

                    Thanks
                    Erwin

                    Comment

                    Working...
                    X