3 Replies Latest reply on Dec 26, 2007 11:07 PM by jalaja chintam

    WSS problem in JBossWS 1.0.4 sample

    ray lai Newbie

      I can run JBossWS 1.0.3 sample JSR181EJB3 and JSR181POJO on JBoss 4.0.5, and can view the WSS header. I can even modify the jboss-wsse-client.xml in the JSR181 EJB3 example to use username token. I can view the WSS username token in the SOAP header from the output/log/samples.log.

      However, once I upgrade to JBossWS 1.0.4 sample, I cannot view any WSS header in the SOAP header from any of the examples (including JSR181EJB3 and JSR181POJO). I did not modify the source code yet.

      I notice several changes in JBossWS 1.0.4. The JSR181EJB3 does not use any security handler. I add the security handler in the EJBbean03.java, as in JBossWS 1.0.3. I have to rename the class name because JBossWS 1.0.4 renames it with the package name org.jboss.ws.wsse.jaxrpc (an extra jaxrpc). However, I still cannot view the WSS header in the output/log/samples.log.

      I did attempt to use tcpmon, tcpspy to view the SOAP message but without luck to find the WSS header. I changed the client config file to use username token. The same result.

      It looks like the new JBossWS 1.0.4 samples can't generate any WSS. Pls refer to the log file below. It is possible that the security handler in JBossWS 1.0.4 reads the client config file, and cannot generate the security config, and thus it cannot generate the WSS header.

      2006-11-30 18:05:41,781 DEBUG [org.jboss.ws.metadata.config.WSConfigFactory:92] parse: jar:file:/C:/tools/jboss/jbossws-samples-1.0.4.GA/thirdparty/jbossws-client.jar!/META-INF/standard-jaxrpc-client-config.xml
      2006-11-30 18:05:42,203 DEBUG [org.jboss.ws.deployment.JSR109ClientMetaDataBuilder:131] END buildMetaData:
      UnifiedMetaData:
      implementation: jbossws-1.0.4.GA (date=200611150150)
      securityDomain: null

      ServiceMetaData:
      qname={http://org.jboss.ws/samples/jsr181ejb}TestService
      wsdName=null
      wsdlFile=jar:file:/C:/tools/jboss/server/default/tmp/deploy/tmp1581jaxws-samples-jsr181ejb-client.jar!/META-INF/wsdl/TestService.wsdl
      jaxrpcFile=http://www.jboss.org/jbossws/dummy-mapping-url
      publishLocation=null
      properties=null

      TypesMetaData:


      ClientEndpointMetaData:
      type=JAXRPC
      qname={http://org.jboss.ws/samples/jsr181ejb}EndpointInterfacePort
      address=http://MTVL04AL3M0346:8080/jaxws-samples-jsr181ejb/EJB3Bean01
      binding=http://schemas.xmlsoap.org/wsdl/soap/http
      seiName=org.jboss.test.ws.jaxws.samples.jsr181ejb.EndpointInterface
      configFile=META-INF/standard-jaxrpc-client-config.xml
      configName=Standard WSSecurity Client
      authMethod=null
      transportGuarantee=null
      properties=null

      OperationMetaData:
      qname={http://org.jboss.ws/samples/jsr181ejb}echo
      javaName=echo
      style=rpc/literal
      oneWay=false
      soapAction=
      ParameterMetaData:
      xmlName=String_1
      xmlType={http://www.w3.org/2001/XMLSchema}string
      javaType=java.lang.String
      mode=IN
      inHeader=false
      wrappedVariables=[]
      wrappedTypes=[]
      wrappedElementNames=[]
      ReturnMetaData:
      xmlName=result
      xmlType={http://www.w3.org/2001/XMLSchema}string
      javaType=java.lang.String
      mode=OUT
      inHeader=false
      wrappedVariables=[]
      wrappedTypes=[]
      wrappedElementNames=[]

      HandlerMetaDataJAXRPC:
      type=POST
      name=WSSecurityHandlerOutbound
      class=org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound
      params=[]
      headers=[]
      roles=[]
      ports=[]
      2006-11-30 18:05:42,203 DEBUG [org.jboss.ws.metadata.UnifiedMetaData:180] Eagerly initialize the meta data model
      2006-11-30 18:05:42,218 DEBUG [org.jboss.ws.metadata.OperationMetaData:240] Found best matching java method: public abstract java.lang.String org.jboss.test.ws.jaxws.samples.jsr181ejb.EndpointInterface.echo(java.lang.String) throws java.rmi.RemoteException
      2006-11-30 18:05:42,609 WARN [org.jboss.ws.metadata.HandlerMetaData:161] WS-Security requires security configuration
      2006-11-30 18:05:42,609 DEBUG [org.jboss.ws.jaxrpc.ServiceObjectFactory:308] Adding client side handler to endpoint '{http://org.jboss.ws/samples/jsr181ejb}EndpointInterfacePort': [class=org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound,headers=[],config={org.jboss.ws.metadata.HandlerMetaData$HandlerType=POST}]
      2006-11-30 18:05:42,625 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:93] Create a handler chain for roles: []
      2006-11-30 18:05:42,640 DEBUG [org.jboss.ws.jaxrpc.HandlerRegistryImpl:116] Add handler to: {http://org.jboss.ws/samples/jsr181ejb}EndpointInterfacePort
      HandlerMetaDataJAXRPC:
      type=ENDPOINT
      name=null
      class=org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound
      params=[]
      headers=[]
      roles=[]
      ports=[]
      2006-11-30 18:05:42,656 DEBUG [org.jboss.ws.jaxrpc.ServiceProxy:112] Invoke on jaxrpc service: getPort
      2006-11-30 18:05:42,671 DEBUG [org.jboss.ws.soap.MessageContextAssociation:46] pushMessageContext: org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC@19646fd
      2006-11-30 18:05:42,718 DEBUG [org.jboss.ws.binding.EndpointInvocation:94] setRequestParamValue: [name=String_1,value=java.lang.String]
      2006-11-30 18:05:42,718 DEBUG [org.jboss.ws.common.CommonSOAPBinding:131] bindRequestMessage: {http://org.jboss.ws/samples/jsr181ejb}echo
      2006-11-30 18:05:42,750 DEBUG [org.jboss.ws.common.CommonSOAPBinding:160] Create RPC body element: {http://org.jboss.ws/samples/jsr181ejb}echo
      2006-11-30 18:05:42,750 DEBUG [org.jboss.ws.binding.EndpointInvocation:100] getRequestParamValue: String_1
      2006-11-30 18:05:42,750 DEBUG [org.jboss.ws.binding.EndpointInvocation:237] transformPayloadValue: java.lang.String -> java.lang.String
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.soap.SOAPContentElement:334] setObjectValue: Hello world!
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:249] Enter: handleRequest
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:468] Replacing dirty handler: [state=DOES_NOT_EXIST,handler=org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound@189635d]
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerWrapper:93] init: org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound@da9ea4
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:298] Exit: handleRequest with status: true
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:249] Enter: handleRequest
      2006-11-30 18:05:42,765 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:298] Exit: handleRequest with status: true
      2006-11-30 18:05:42,781 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:249] Enter: handleRequest
      2006-11-30 18:05:42,781 WARN [org.jboss.ws.wsse.jaxrpc.WSSecurityHandler:92] Cannot obtain security configuration
      2006-11-30 18:05:42,781 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:298] Exit: handleRequest with status: true

      2006-11-30 18:05:42,796 DEBUG [org.jboss.ws.soap.SOAPConnectionImpl:202] Get locator for: [addr=http://MTVL04AL3M0346:8080/jaxws-samples-jsr181ejb/EJB3Bean01,props={javax.xml.rpc.service.endpoint.address=http://MTVL04AL3M0346:8080/jaxws-samples-jsr181ejb/EJB3Bean01, javax.xml.rpc.security.auth.password=thefrog, javax.xml.rpc.security.auth.username=kermit}]
      2006-11-30 18:05:42,796 DEBUG [org.jboss.remoting.Client:514] invoke called, but our invoker is disconnected, discarding and fetching another fresh invoker for: InvokerLocator [http://192.168.234.1:8080/jaxws-samples-jsr181ejb/EJB3Bean01]
      2006-11-30 18:05:42,796 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker:275] connect called for: org.jboss.remoting.transport.http.HTTPClientInvoker@9e8c34
      2006-11-30 18:05:42,812 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker:146] Setting request header with SOAPAction : ""
      2006-11-30 18:05:42,828 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker:146] Setting request header with Content-Type : text/xml; charset=UTF-8
      2006-11-30 18:05:42,843 DEBUG [org.jboss.ws.soap.SOAPContentElement:159] getXMLFragment from Object [xmlType={http://www.w3.org/2001/XMLSchema}string,javaType=class java.lang.String]
      2006-11-30 18:05:42,843 DEBUG [org.jboss.ws.jaxrpc.encoding.SimpleSerializer:56] serialize: [xmlName=String_1,xmlType={http://www.w3.org/2001/XMLSchema}string]
      2006-11-30 18:05:42,859 DEBUG [org.jboss.ws.soap.SOAPContentElement:185] xmlFragment: <String_1>Hello world!</String_1>
      2006-11-30 18:05:42,921 DEBUG [org.jboss.ws.binding.soap.SOAPMessageUnMarshaller:106] getMimeHeaders from: {X-Powered-By=[Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5], null=[HTTP/1.1 200 OK], ResponseCodeMessage=OK, http.basic.password=thefrog, Date=[Fri, 01 Dec 2006 02:05:42 GMT], http.basic.username=kermit, Content-Type=[text/xml;charset=UTF-8], Server=[Apache-Coyote/1.1], HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}, Transfer-Encoding=[chunked], ResponseCode=200}
      2006-11-30 18:05:42,953 DEBUG [org.jboss.ws.soap.MessageFactoryImpl:165] createMessage: [contentType=text/xml; charset=UTF-8]
      2006-11-30 18:05:42,968 DEBUG [org.jboss.ws.soap.SOAPContentElement:211] setXMLFragment: Hello world!
      2006-11-30 18:05:42,968 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:331] Enter: handleResponse
      2006-11-30 18:05:42,984 WARN [org.jboss.ws.wsse.jaxrpc.WSSecurityHandler:92] Cannot obtain security configuration
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:380] Exit: handleResponse with status: true
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:331] Enter: handleResponse
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:380] Exit: handleResponse with status: true
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:331] Enter: handleResponse
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl:380] Exit: handleResponse with status: true
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.common.CommonSOAPBinding:531] unbindResponseMessage: {http://org.jboss.ws/samples/jsr181ejb}echo
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.binding.EndpointInvocation:171] setReturnValue: org.jboss.ws.soap.SOAPContentElement
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.binding.EndpointInvocation:177] getReturnValue
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.soap.SOAPContentElement:231] getObjectValue [xmlType={http://www.w3.org/2001/XMLSchema}string,javaType=class java.lang.String]
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.jaxrpc.encoding.SimpleDeserializer:47] deserialize: [xmlName=result,xmlType={http://www.w3.org/2001/XMLSchema}string]
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.soap.SOAPContentElement:326] objectValue: java.lang.String
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.binding.EndpointInvocation:237] transformPayloadValue: org.jboss.ws.soap.SOAPContentElement -> java.lang.String
      2006-11-30 18:05:42,984 DEBUG [org.jboss.ws.soap.MessageContextAssociation:75] popMessageContext: org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC@19646fd

      Any input, suggestion?