0 Replies Latest reply on Sep 1, 2009 9:02 AM by sarbogast

    503 error code when trying to access a weblogic jax-rpc webservice

    sarbogast
      I'm going crazy on a webservice issue with Weblogic server 10.2.
      I have a DocumentRepository webservice deployed and I generated a JAX-RPC library based on its WSDL.
      Now I'm trying to access this webservice from Spring in a desktop application with the following bean declaration:

      <bean id="documentRepository" class="eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl">
           <constructor-arg value="http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL" />
      </bean>

      But when the Spring application context initializes, after a few minutes, I get the following exception:

      javax.xml.rpc.ServiceException: Failed to parse WSDL http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
      +     at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:174)+
      +     at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:485)+
      +     at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)+
      +     at eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl.<init>(Unknown Source)+
      +     at eu.europa.ec.rdg.efp.services.document.v1_00.DocumentRepository_Impl.<init>(Unknown Source)+
      +     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
      +     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
      +     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
      +     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
      +     at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)+
      +     ... 35 more+
      Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
      +     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)+
      +     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:403)+
      +     at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:389)+
      +     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)+
      +     at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)+
      +     at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:476)+
      +     ... 43 more+
      Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL
      +     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)+
      +     at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:100)+
      +     at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:118)+
      +     at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)+
      +     at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)+
      +     ... 48 more+

      Yet, I can see the WSDL in my browser when I go to http://myserver.mycompany.com:7021/efpServices/DocumentRepository?WSDL

      Now it looks a lot like a proxy issue, which is possible because I'm behind a proxy, and I had to set the following command-line parameters in order to access remote HTTP resources before the spring application context is initialized:

      -DproxySet=true -DproxyHost=<my proxy IP> -DproxyPort=8012

      And I authenticate to my proxy using the following code, once again before the Spring application context is initialized:

      Authenticator.setDefault(new Authenticator() {
                                         protected PasswordAuthentication getPasswordAuthentication() {
                                              return new PasswordAuthentication(<my login>, <my password>);
                                         }
                                    });

      Yet, those settings seem to have absolutely no effect on how the webservice client is loading the WSDL.

      So my question is the following: is it possible to specify a proxy to be used by the webservice client class to load the WSDL? If yes, how?

      On the other hand, if it was a proxy issue, then I guess the webservice client couldn't reach the server and I would get a connection timeout or something. But here I get a response, even though it's a 503 error. Any other idea where my exception comes from?

      I'm really desperate here. I've tried to ask our corporate weblogic support but they couldn't reproduce my issue. I've been fighting with this for weeks. Please help!