0 Replies Latest reply on May 6, 2016 7:03 AM by Andrea Giovannini

    java.net.ConnectException: Connection timed out: connect

    Andrea Giovannini Newbie

      Hi everyone,
      I'm using JBoss 4.2.2 with JBoss WS Native 2.0.1 and I have a problem with a web service containing an attachment. I use a Java endpoint

       

       

      @WebService
      public class AttachmentWebService {
      ...
      @WebMethod
      public void foo(MyObject obj) {
      ...
      

       

      and the MyObject class is

       

      @XmlType
      public class MyObject implements Serializable {
      
          @XmlMimeType("application/octet-stream") 
          protected DataHandler fileContent;
      ...
      


      When I deploy the web service I get a ConnectException:

       

      ...
      2016-05-04 14:47:51,309 TRACE [org.jboss.ws.metadata.wsdl.WSDLDefinitions] registerNamespaceURI: xsd=http://www.w3.org/2001/XMLSchema
      2016-05-04 14:47:51,309 TRACE [org.jboss.ws.metadata.wsdl.WSDLDefinitions] registerNamespaceURI: soap=http://schemas.xmlsoap.org/wsdl/soap/
      2016-05-04 14:47:51,309 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] BEGIN processTypes: file:/D:/Java/jboss-4.2.2.GA/server/fw2010_62/tmp/jbossws/AttachmentWebServiceService7351538786089269169.wsdl
      2016-05-04 14:47:51,310 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] processSchemaInclude: file:/D:/Java/jboss-4.2.2.GA/server/fw2010_62/tmp/jbossws/AttachmentWebServiceService7351538786089269169.wsdl
      2016-05-04 14:47:51,310 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] processSchemaInclude: [targetNS=http://attachments.diapason.gformula.com/,parentURL=file:/D:/Java/jboss-4.2.2.GA/server/fw2010_62/tmp/jbossws/AttachmentWebServiceService7351538786089269169.wsdl]
      2016-05-04 14:47:51,310 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] provide SPI 'class org.jboss.wsf.spi.management.ServerConfigFactory'
      2016-05-04 14:47:51,310 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] class org.jboss.wsf.spi.management.ServerConfigFactory Implementation: org.jboss.wsf.framework.management.ServerConfigFactoryImpl@4ffb4cee
      2016-05-04 14:47:51,313 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] handleSchemaImport: [namespace=http://schemas.xmlsoap.org/soap/encoding/,schemaLocation=null]
      2016-05-04 14:47:51,313 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] Skip schema import: [namespace=http://schemas.xmlsoap.org/soap/encoding/,schemaLocation=null]
      2016-05-04 14:47:51,313 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] handleSchemaImport: [namespace=http://www.w3.org/2005/05/xmlmime,schemaLocation=http://www.w3.org/2005/05/xmlmime]
      2016-05-04 14:47:51,313 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] getLocationURL: [location=http://www.w3.org/2005/05/xmlmime,parent=file:/D:/Java/jboss-4.2.2.GA/server/fw2010_62/tmp/jbossws/AttachmentWebServiceService7351538786089269169.wsdl]
      2016-05-04 14:47:51,313 TRACE [org.jboss.ws.tools.wsdl.WSDL11Reader] Modified schemaLocation: http://www.w3.org/2005/05/xmlmime
      2016-05-04 14:48:12,321 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/D:/Java/jboss-4.2.2.GA/server/fw2010_62/tmp/deploy/tmp2280073536217151638dnextws.ear-contents/dnextws.war
      org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.ConnectException: Connection timed out: connect
       at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
       at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:176)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:52)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:63)
       at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:66)
       at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:118)
       at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      ...
      

       

      The very same web service deploys and runs fine with JBoss 5.1.0 (JBossWS 3.1.2). The bug seems related to this issue https://developer.jboss.org/wiki/InstructionstouseWSRPbehindaproxyoroffline

      I would like to keep using JBoss 4.2.2: it's an old application, several customers already have it and the migration to JBoss 5.1.0 could be too expensive.

       

      I tried to update JBoss WS on my JBoss 4.2.2 with JBossWS 3.0.4: the web service deploys fine but in invocation I get this error (with all my web services):

       

      2016-05-04 16:08:02,344 TRACE [org.jboss.ws.core.CommonMessageContext] get(javax.xml.ws.handler.message.outbound): APPLICATION:javax.xml.ws.handler.message.outbound=false
      2016-05-04 16:08:02,344 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
      2016-05-04 16:08:02,344 TRACE [org.jboss.ws.core.soap.SOAPContentElement] getChildNodes
      2016-05-04 16:08:02,344 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
      2016-05-04 16:08:02,344 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
      2016-05-04 16:08:02,344 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
      org.jboss.ws.WSException: Content root name does not match element name: {http://session.diapason.gformula.com/}arg0 != arg0
       at org.jboss.ws.core.soap.XMLContent.expandContainerChildren(XMLContent.java:306)
       at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:104)
       at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
       at org.jboss.ws.core.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:502)
       at org.jboss.ws.core.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:453)
       at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:261)
       at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:384)
       at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:384)
      

       

       

      The best option, as far as I can see, seems patching JBossWS 2.0.1 on my own but I can't find the sources on JBoss Web site (I've found sources starting from 3.X release): is it possible to download these sources?

      Otherwise: can you suggest me alternative solutions?

       

      Thank you.

       

      Regards,
      Andrea