I am having trouble migrating a WS from JAX-WS RI 2.0/JBoss 4.0.5.GA to JBossWS/JBoss
4.2.0.GA.
The WS starts ok and I can connect a client but the request and response headers are
always null.
For example, I have an operation SubmitBasket which is defined as follows:
| @WebMethod(operationName = "SubmitBasket")
| @WebResult(name = "receipt", targetNamespace =
"http://www.m-bar-go.com", partName = "response")
| public Receipt submitBasket(
| @WebParam(name = "header", targetNamespace =
"http://www.m-bar-go.com", header = true)
| Header inboundHeader,
| @WebParam(name = "header", targetNamespace =
"http://www.m-bar-go.com", header = true, mode = WebParam.Mode.OUT)
| Holder<Header> outboundHeader,
| @WebParam(name = "basket", targetNamespace =
"http://www.m-bar-go.com", partName = "request")
| Basket request) throws BadBasketFault, BadRequestFault;
|
But when I try to access either the inboundHeader or outboundHeader params they are both
null.
Looking in the log I can see the following:
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.MessageFactoryImpl]
[user-agent=Java/1.5.0_06]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.MessageFactoryImpl]
[host=127.0.0.1:8080]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.MessageFactoryImpl]
[connection=keep-alive]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.MessageFactoryImpl]
[content-length=540]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl]
createMessage: [contentType=text/xml; charset=utf-8]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.MessageFactoryImpl]
createMessage
| <?xml version="1.0" ?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:He...
xmlns="http://www.m-bar-go.com"><uid>01156986742242df80c7a68036a39aaf</uid></header></S:Header><S:Body><basket
xmlns="http://www.m-bar-go.com"><scheme-name>test</scheme-name><customer-id>05000005</customer-id><store-id>501</store-id><type>sale</type><basket><item><product-id>05010103</product-id></item><item><product-id>05010202</product-id></item><item><product-id>05010301</product-id></item></basket></basket></S:Body></S:Envelope>
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.utils.DOMUtils] createElement
{http://schemas.xmlsoap.org/soap/envelope/}S:Envelope
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://schemas.xmlsoap.org/soap/envelope/}Envelope
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://schemas.xmlsoap.org/soap/envelope/}Envelope
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl]
addNamespaceDeclaration:
xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.utils.DOMUtils] createElement
{http://schemas.xmlsoap.org/soap/envelope/}S:Header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://schemas.xmlsoap.org/soap/envelope/}Header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl]
addChildElement: {http://schemas.xmlsoap.org/soap/envelope/}Envelope ->
{http://schemas.xmlsoap.org/soap/envelope/}Header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.utils.DOMUtils] createElement
{http://schemas.xmlsoap.org/soap/envelope/}S:Body
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://schemas.xmlsoap.org/soap/envelope/}Body
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl]
addChildElement: {http://schemas.xmlsoap.org/soap/envelope/}Envelope ->
{http://schemas.xmlsoap.org/soap/envelope/}Body
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.utils.DOMUtils] createElement
{http://www.m-bar-go.com}header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://www.m-bar-go.com}header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl]
addChildElement: {http://schemas.xmlsoap.org/soap/envelope/}Header ->
{http://www.m-bar-go.com}header
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPContentElement]
setAttribute:
[
nsURI=http://www.w3.org/2000/xmlns/,name=xmlns,value=http://www.m-bar-go.com]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] removeContents
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.utils.DOMUtils] createElement
{http://www.m-bar-go.com}basket
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl] new
SOAPElementImpl: {http://www.m-bar-go.com}basket
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPBodyImpl] addChildElement:
{http://www.m-bar-go.com}basket
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPElementImpl]
addChildElement: {http://schemas.xmlsoap.org/soap/envelope/}Body ->
{http://www.m-bar-go.com}basket
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPBodyImpl] appendChild:
basket
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.soap.SOAPContentElement]
setAttribute:
[
nsURI=http://www.w3.org/2000/xmlns/,name=xmlns,value=http://www.m-bar-go.com]
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.MessageTrace] Incoming Request
Message
| <S:Envelope
xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'>
| <S:Header>
| <header xmlns='http://www.m-bar-go.com'>
| <uid>01156986742242df80c7a68036a39aaf</uid>
| </header>
| </S:Header>
| <S:Body>
| <basket xmlns='http://www.m-bar-go.com'>
| <scheme-name>test</scheme-name>
| <customer-id>05000005</customer-id>
| <store-id>501</store-id>
| <type>sale</type>
| <basket>
| <item>
| <product-id>05010103</product-id>
| </item>
| <item>
| <product-id>05010202</product-id>
| </item>
| <item>
| <product-id>05010301</product-id>
| </item>
| </basket>
| </basket>
| </S:Body>
| </S:Envelope>
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.CommonMessageContext] put:
APPLICATION:javax.xml.ws.binding.attachments.inbound={}
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS]
callRequestHandlerChain: POST
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl]
getHandlerChain:
[
type=POST,info=[service={http://www.m-bar-go.com}MbargoPayPointImplServic...]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor]
Create a handler executor: []
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.CommonMessageContext]
get(javax.xml.ws.handler.message.outbound):
APPLICATION:javax.xml.ws.handler.message.outbound=false
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.CommonMessageContext]
get(javax.xml.ws.addressing.context.inbound): null
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.soap.SOAPMessageDispatcher]
getDispatchDestination: {http://www.m-bar-go.com}SubmitBasket
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS]
unbindRequestMessage: {http://www.m-bar-go.com}SubmitBasket
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.EndpointInvocation]
setRequestParamValue:
[name={http://www.m-bar-go.com}header,value=org.jboss.ws.core.soap.SOAPHeaderElementImpl]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.EndpointInvocation]
setRequestParamValue: [name={http://www.m-bar-go.com}header,value=null]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.EndpointInvocation]
setRequestParamValue:
[name={http://www.m-bar-go.com}basket,value=org.jboss.ws.core.soap.SOAPBodyElementDoc]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS]
callRequestHandlerChain: ENDPOINT
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl]
getHandlerChain:
[
type=ENDPOINT,info=[service={http://www.m-bar-go.com}MbargoPayPointImplSe...]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor]
Create a handler executor: []
| 2007-06-01 16:43:40,864 TRACE [org.jboss.ws.core.CommonMessageContext]
get(javax.xml.ws.handler.message.outbound):
APPLICATION:javax.xml.ws.handler.message.outbound=false
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS]
callRequestHandlerChain: PRE
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl]
getHandlerChain:
[
type=PRE,info=[service={http://www.m-bar-go.com}MbargoPayPointImplService...]
| 2007-06-01 16:43:40,864 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor]
Create a handler executor: []
| 2007-06-01 16:43:40,880 TRACE [org.jboss.ws.core.CommonMessageContext]
get(javax.xml.ws.handler.message.outbound):
APPLICATION:javax.xml.ws.handler.message.outbound=false
| 2007-06-01 16:43:40,880 TRACE [org.jboss.ws.core.CommonMessageContext] put:
APPLICATION:org.jboss.ws.allow.expand.dom=true
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.server.ServiceEndpointInvokerJSE]
invokeServiceEndpoint: submitBasket
| 2007-06-01 16:43:40,880 TRACE [org.jboss.ws.core.CommonMessageContext]
get(javax.xml.ws.servlet.request):
APPLICATION:javax.xml.ws.servlet.request=org.apache.catalina.connector.RequestFacade@14f1c67
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
getRequestPayload
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
getRequestParamValue: {http://www.m-bar-go.com}header
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
transformPayloadValue: null -> null
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
syncEndpointInputParam: null -> null(0)
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
getRequestParamValue: {http://www.m-bar-go.com}basket
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.soap.SOAPContentElement]
-----------------------------------
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.soap.SOAPContentElement]
Transitioning from XML_VALID to OBJECT_VALID
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.soap.XMLContent] getObjectValue
[xmlType={http://www.m-bar-go.com}>basket,javaType=class
com.thelightagency.mbargo.ws.lightweight.paypoint.Basket]
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.jaxws.JAXBDeserializer] deserialize:
[xmlName={http://www.m-bar-go.com}basket,xmlType={http://www.m-bar-go.com}>basket]
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.jaxws.JAXBDeserializer] deserialized:
com.thelightagency.mbargo.ws.lightweight.paypoint.Basket
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.soap.XMLContent] objectValue:
com.thelightagency.mbargo.ws.lightweight.paypoint.Basket
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.soap.SOAPContentElement]
-----------------------------------
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
transformPayloadValue: org.jboss.ws.core.soap.SOAPBodyElementDoc ->
com.thelightagency.mbargo.ws.lightweight.paypoint.Basket
| 2007-06-01 16:43:40,880 DEBUG [org.jboss.ws.core.EndpointInvocation]
syncEndpointInputParam: com.thelightagency.mbargo.ws.lightweight.paypoint.Basket ->
com.thelightagency.mbargo.ws.lightweight.paypoint.Basket(2)
|
As you can see the message on the wire has a header but for some reason it is reported as
null during the unbind.
Any ideas?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050554#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...