Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-3146

Fix WebServices IPv6 incompatibilities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.GA_CP09, 4.2.0.GA_CP10
    • 4.2.0.GA_CP08, 4.3.0.GA_CP07
    • Web Services
    • None
    • Linux

      JBoss WebServices 1.2.1.GA_CP05, included with EAP 4.2 CP07 and EAP 4.3 CP06, does not handle IPv6 addresses correctly and fails to pass tests in the AS testsuite.
      The tests which fail are:
      org.jboss.test.webservice.admindevel.ExampleTestCase(tests-webservice).testHelloString
      org.jboss.test.webservice.admindevel.ExampleTestCase(tests-webservice).testHelloBean
      org.jboss.test.webservice.admindevel.ExampleTestCase(tests-webservice).testHelloArray
      org.jboss.test.webservice.admindevel.ExplodedExampleTestCase(tests-webservice).testHelloString
      org.jboss.test.webservice.admindevel.RedeployExampleTestCase(tests-webservice).testHelloString
      org.jboss.test.webservice.admindevel.RedeployExampleTestCase(tests-webservice).testHelloBean
      org.jboss.test.webservice.admindevel.RedeployExampleTestCase(tests-webservice).testHelloArray
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC+SecurityMgr).testRoleSecuredSLSB
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC+SecurityMgr).testBasicSecuredSLSB
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC+SecurityMgr).testBasicSecuredServiceAccess
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC+SecurityMgr).testBasicSecuredDIIAccess
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC+SecurityMgr).testRoleSecuredServiceAccess
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC).testRoleSecuredSLSB
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC).testBasicSecuredSLSB
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC).testBasicSecuredServiceAccess
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC).testBasicSecuredDIIAccess
      org.jboss.test.webservice.jbws309.JBWS309TestCase(JACC).testRoleSecuredServiceAccess

      All of these tests initially exbibited the following exception:

      Error Message: RoleSecuredSLSB not bound

      or similar. In the logs, I would see:

      02:27:11,331 INFO [EjbModule] Deploying RoleSecuredSLSB
      02:27:11,342 INFO [EjbModule] Deploying BasicSecuredSLSB
      02:27:11,386 INFO [ProxyFactory] Bound EJB Home 'RoleSecuredSLSB' to jndi 'ejb/RoleSecuredSLSB'
      02:27:11,393 INFO [ProxyFactory] Bound EJB Home 'BasicSecuredSLSB' to jndi 'ejb/BasicSecuredSLSB'
      02:27:11,395 INFO [EJBDeployer] Deployed: file:/qa/services/hudson/hudson_workspace/workspace/eap-as-4.3.x-testsuite-ipv6/JBPAPP_4_3_0_GA_CP/testsuite/output/lib/ws4ee-jbws309.jar
      02:27:11,729 INFO [DefaultEndpointRegistry] register: jboss.ws:context=ws4ee-jbws309,endpoint=RoleSecuredSLSB
      02:27:11,732 INFO [DefaultEndpointRegistry] register: jboss.ws:context=ws4ee-jbws309,endpoint=BasicSecuredSLSB
      02:27:15,209 ERROR [MainDeployer] Could not start deployment: file:/qa/services/hudson/hudson_workspace/workspace/eap-as-4.3.x-testsuite-ipv6/JBPAPP_4_3_0_GA_CP/testsuite/output/lib/ws4ee-jbws309.jar
      org.jboss.ws.WSException: Malformed URL: http://fec0:0:a16:ffff::d:8080/ws4ee-jbws309/RoleSecured
      at org.jboss.ws.metadata.builder.MetaDataBuilder.getServiceEndpointAddress(MetaDataBuilder.java:255)
      at org.jboss.ws.metadata.builder.MetaDataBuilder.initEndpointAddress(MetaDataBuilder.java:175)
      at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder.buildMetaData(JAXRPCServerMetaDataBuilder.java:147)
      at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:61)
      at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
      at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:98)
      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)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy30.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

      There were two key problems which were encountered when looking in detail at the testsuite failures.

      1. The service ws4ee-admindevel.jar was not able to deploy correctly. Fixed by
      changing testsuite/imports/sections/webservices.xml to use ${node0.url} instead of ${node0} as a substitution for jbosstest.server.host
      (ii) modifying org.jboss.ws.metadata.builder.MetaDataBuilder.getServiceEndpointAddress() which was building the endpoint URL incorrectly

      Later, once the deployements were working, a different set of failures were occurring on the client side. Clients were unable to connect to the server side WebService.

      2009-11-20 15:52:14,751 DEBUG [org.jboss.test.JBossTestCase$1] deployed package: ws4ee-admindevel-client.jar
      2009-11-20 15:52:14,753 DEBUG [org.jboss.test.webservice.admindevel.ExampleTestCase] jndiEnv:

      {jnp.parsedName=, j2ee.clientName=ws4ee-client, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=[3ffe:ffff:100:f101::1]:1099, java.naming.factory.url.pkgs=org.jboss.naming.client}

      2009-11-20 15:52:14,886 DEBUG [org.jboss.ws.core.jaxrpc.client.ServiceObjectFactory] Create jaxrpc service from wsdl
      2009-11-20 15:52:15,144 DEBUG [org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder] START buildMetaData: [service=null]
      2009-11-20 15:52:15,243 DEBUG [org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory] parse: http://[3ffe:ffff:100:f101::1]:8080/admindevel?wsdl
      2009-11-20 15:52:15,658 DEBUG [org.jboss.ws.tools.JavaToXSD] Load schema: http://org.jboss.webservice/example/types=file:/tmp/JBossWS_org.jboss.webservice_example_types36467.xsd
      2009-11-20 15:52:15,658 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] resolveEntity: [pub=null,sysid=file:/tmp/JBossWS_org.jboss.webservice_example_types36467.xsd]
      2009-11-20 15:52:15,706 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] resolveEntity: [pub=http://schemas.xmlsoap.org/soap/encoding/,sysid=null]
      2009-11-20 15:52:15,937 DEBUG [org.jboss.ws.metadata.umdm.UnifiedMetaData] Eagerly initialize the meta data model
      2009-11-20 15:52:15,967 DEBUG [org.jboss.ws.metadata.umdm.OperationMetaData] Found best matching java method: public abstract org.jboss.test.webservice.admindevel.HelloObj[] org.jboss.test.webservice.admindevel.Hello.helloArray(org.jboss.test.webservice.admindevel.HelloObj[]) throws java.rmi.RemoteException
      2009-11-20 15:52:15,967 DEBUG [org.jboss.ws.metadata.umdm.OperationMetaData] Found best matching java method: public abstract org.jboss.test.webservice.admindevel.HelloObj org.jboss.test.webservice.admindevel.Hello.helloBean(org.jboss.test.webservice.admindevel.HelloObj) throws java.rmi.RemoteException
      2009-11-20 15:52:15,967 DEBUG [org.jboss.ws.metadata.umdm.OperationMetaData] Found best matching java method: public abstract java.lang.String org.jboss.test.webservice.admindevel.Hello.helloString(java.lang.String) throws java.rmi.RemoteException
      2009-11-20 15:52:16,379 DEBUG [org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder] END buildMetaData:
      UnifiedMetaData:
      implementation: jbossws-1.2.1.GA_CP05 (build=200911201531)
      deploymentName: null
      securityDomain: null

      ServiceMetaData:
      qname=

      {http://org.jboss.webservice/example}

      HelloService
      refName=null
      wsdName=null
      wsdlFile=null
      wsdlLocation=http://[3ffe:ffff:100:f101::1]:8080/admindevel?wsdl
      jaxrpcMapping=jar:file:/tmp/betty/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/output/lib/ws4ee-admindevel-client.jar!/META-INF/jaxrpc-mapping.xml
      publishLocation=null
      securityConfig=null
      properties=null

      TypesMetaData:
      [complexType=

      {http://org.jboss.webservice/example/types}

      HelloObj,javaType=org.jboss.test.webservice.admindevel.HelloObj]
      [complexType=

      {http://org.jboss.webservice/example/types}

      HelloObj.Array,javaType=org.jboss.test.webservice.admindevel.HelloObj[]]
      <schema targetNamespace='http://org.jboss.webservice/example/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://org.jboss.webservice/example/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <complexType name='HelloObj'>
      <sequence>
      <element name='msg' nillable='true' type='string'/>
      </sequence>
      </complexType>
      <complexType name='HelloObj.Array'>
      <sequence>
      <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='tns:HelloObj'/>
      </sequence>
      </complexType>
      </schema>

      ClientEndpointMetaData:
      type=JAXRPC
      qname=

      {http://org.jboss.webservice/example}

      HelloPort
      address=http://3ffe:ffff:100:f101::1:8080/admindevel
      binding=http://schemas.xmlsoap.org/wsdl/soap/http
      seiName=org.jboss.test.webservice.admindevel.Hello
      configFile=META-INF/standard-jaxrpc-client-config.xml
      configName=Standard Client
      authMethod=null
      properties={}

      OperationMetaData:
      qname=

      {http://org.jboss.webservice/example}

      helloArray
      javaName=helloArray
      style=rpc/literal
      oneWay=false
      soapAction=
      ParameterMetaData:
      xmlName=arrayOfHelloObj_1
      partName=arrayOfHelloObj_1
      xmlType=

      {http://org.jboss.webservice/example/types}

      HelloObj.Array
      javaType=org.jboss.test.webservice.admindevel.HelloObj[]
      mode=IN
      inHeader=false
      index=0
      ReturnMetaData:
      xmlName=result
      partName=result
      xmlType=

      {http://org.jboss.webservice/example/types}

      HelloObj.Array
      javaType=org.jboss.test.webservice.admindevel.HelloObj[]
      mode=OUT
      inHeader=false
      index=-1

      OperationMetaData:
      qname=

      {http://org.jboss.webservice/example}

      helloBean
      javaName=helloBean
      style=rpc/literal
      oneWay=false
      soapAction=
      ParameterMetaData:
      xmlName=HelloObj_1
      partName=HelloObj_1
      xmlType=

      {http://org.jboss.webservice/example/types}

      HelloObj
      javaType=org.jboss.test.webservice.admindevel.HelloObj
      mode=IN
      inHeader=false
      index=0
      ReturnMetaData:
      xmlName=result
      partName=result
      xmlType=

      {http://org.jboss.webservice/example/types}

      HelloObj
      javaType=org.jboss.test.webservice.admindevel.HelloObj
      mode=OUT
      inHeader=false
      index=-1

      OperationMetaData:
      qname=

      {http://org.jboss.webservice/example}

      helloString
      javaName=helloString
      style=rpc/literal
      oneWay=false
      soapAction=
      ParameterMetaData:
      xmlName=String_1
      partName=String_1
      xmlType=

      {http://www.w3.org/2001/XMLSchema}

      string
      javaType=java.lang.String
      mode=IN
      inHeader=false
      index=0
      ReturnMetaData:
      xmlName=result
      partName=result
      xmlType=

      {http://www.w3.org/2001/XMLSchema}

      string
      javaType=java.lang.String
      mode=OUT
      inHeader=false
      index=-1
      2009-11-20 15:52:16,388 DEBUG [org.jboss.ws.core.jaxrpc.client.ServiceProxy] Invoke on jaxrpc service: getPort
      2009-11-20 15:52:16,459 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Create new config [name=Standard Client,file=META-INF/standard-jaxrpc-client-config.xml]
      2009-11-20 15:52:16,465 DEBUG [org.jboss.ws.metadata.config.JBossWSConfigFactory] getConfig: [name=Standard Client,url=META-INF/standard-jaxrpc-client-config.xml]
      2009-11-20 15:52:16,467 DEBUG [org.jboss.ws.metadata.config.JBossWSConfigFactory] parse: jar:file:/tmp/betty/JBPAPP_4_2_0_GA_CP_IPV6/build/output/jboss-4.2.0.GA_CP07/client/jbossws-client.jar!/META-INF/standard-jaxrpc-client-config.xml
      2009-11-20 15:52:16,782 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure EndpointMetaData
      2009-11-20 15:52:16,782 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Added 0 PRE handlers
      2009-11-20 15:52:16,782 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Added 0 ENDPOINT handlers
      2009-11-20 15:52:16,782 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Added 0 POST handlers
      2009-11-20 15:52:16,782 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
      2009-11-20 15:52:16,798 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC@13b5a3a (Thread main)
      2009-11-20 15:52:16,808 DEBUG [org.jboss.ws.core.EndpointInvocation] setRequestParamValue: [name=String_1,value=java.lang.String]
      2009-11-20 15:52:16,809 DEBUG [org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC] bindRequestMessage:

      {http://org.jboss.webservice/example}

      helloString
      2009-11-20 15:52:16,841 DEBUG [org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC] Create RPC body element:

      {http://org.jboss.webservice/example}

      helloString
      2009-11-20 15:52:16,843 DEBUG [org.jboss.ws.core.EndpointInvocation] getRequestParamValue: String_1
      2009-11-20 15:52:16,843 DEBUG [org.jboss.ws.core.EndpointInvocation] transformPayloadValue: java.lang.String -> java.lang.String
      2009-11-20 15:52:16,868 DEBUG [org.jboss.ws.core.client.RemotingConnectionImpl] Get locator for: [addr=http://3ffe:ffff:100:f101::1:8080/admindevel,props=

      {javax.xml.rpc.service.endpoint.address=http://3ffe:ffff:100:f101::1:8080/admindevel}

      ]
      2009-11-20 15:52:16,911 DEBUG [org.jboss.remoting.Client] Client[17645325:5c4o02s-5tdv7z-g29fg5rh-1-g29fg80f-3].connect(null)
      2009-11-20 15:52:16,939 DEBUG [org.jboss.remoting.AbstractInvoker] locator: InvokerLocator http://192.168.0.100/admindevel?datatype=JBossWSMessage
      2009-11-20 15:52:16,940 DEBUG [org.jboss.remoting.AbstractInvoker] configuration:

      {enableLease=false}

      2009-11-20 15:52:16,949 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@848ecc connecting
      2009-11-20 15:52:16,949 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@848ecc connected
      2009-11-20 15:52:16,951 DEBUG [org.jboss.remoting.Client] Client[17645325:5c4o02s-5tdv7z-g29fg5rh-1-g29fg80f-3] connected to InvokerLocator http://192.168.0.100/admindevel?datatype=JBossWSMessage
      2009-11-20 15:52:16,951 DEBUG [org.jboss.ws.core.client.RemotingConnectionImpl] Remoting metadata: {HEADER=

      {SOAPAction="", Content-Type=text/xml; charset=UTF-8}

      , NoThrowOnError=true}
      2009-11-20 15:52:16,954 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Setting request header with SOAPAction : ""
      2009-11-20 15:52:16,955 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Setting request header with Content-Type : text/xml; charset=UTF-8
      2009-11-20 15:52:16,967 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Unable to retrieve response message
      java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.Socket.connect(Socket.java:520)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
      at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
      at sun.net.www.http.HttpClient.New(HttpClient.java:304)
      at sun.net.www.http.HttpClient.New(HttpClient.java:321)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
      at java.net.HttpURLConnection.getResponseMessage(HttpURLConnection.java:433)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:372)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:149)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:141)
      at org.jboss.remoting.Client.invoke(Client.java:1925)
      at org.jboss.remoting.Client.invoke(Client.java:786)
      at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:171)
      at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:331)
      at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
      at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
      at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
      at $Proxy3.helloString(Unknown Source)
      at org.jboss.test.webservice.admindevel.ExampleTestCase.testHelloString(ExampleTestCase.java:64)

      After some investigation, I found that clients requesting a WSDL from a given service would be passed a WSDL with an incorrectly formatted soap:address locator, even though the address locator in the jar was correct. Fixed by:
      modifying ServiceEndpointManager.getDisplayHost(), which was generating the display host URL incorrectly

      With these fixes, the admindevel tests in the testsuite passed. However, when fixing the problems, it's clear that a more thorough investigation of the potential problems which may arise when using IPv6 addresses is in order, as they can appear in a variety of places in webservices XML descriptors.

              rachmato@redhat.com Richard Achmatowicz
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: