[jboss-dev-forums] [JBoss AS 7 Development] - Cached Web Service Client sends wrong SoapAction in HTTP header

Wilhelm Berger do-not-reply at jboss.com
Tue Dec 11 03:40:08 EST 2012


Wilhelm Berger [https://community.jboss.org/people/greendale] created the discussion

"Cached Web Service Client sends wrong SoapAction in HTTP header"

To view the discussion, visit: https://community.jboss.org/message/782733#782733

--------------------------------------------------------------
Hi all,

I have a problem with an application which I have migrated from JBoss AS5 to AS7. Parts of the application contain a JaxWS webservice client which makes calls to a remote web service. The former implementation was based on the +jboss-ws native+ stack. For performance reasons the web service client instance was cached and reused. When migrating to AS7 I have not changed the webservice client code so far, at least at first glance it looked like everything is working fine.

But, whenever a JaxWS client is reused - taken from the pool - it sends a wrong *SoapAction* in the HTTP Headers. For Example 

server.log:
---------------------------
ID: 3
Address: http://server:8080/....ServiceInterface
Encoding: UTF-8
Content-Type: text/xml
Headers: {Accept=[*/*], Accept-Encoding=[gzip], SOAPAction=["http://..../wsdl:*GetConfigurations*"]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
   <nsh:AuthenticationHeader xmlns:nsh="http:....">...</nsh:AuthenticationHeader>
</soap:Header>
<soap:Body>
   <*GetTemplates* xmlns="....."> ... </*GetTemplates*>
</soap:Body></soap:Envelope>
--------------------------------------

So as one sees, the actual call is '*GetTemplates*' but the SoapAction in the header is '*GetConfigurations*', which causes an Error-500 on the remote server.


For the moment - as a hack - I remove the SoapAction from the HttpHeaders, before putting back the client stup into the pool:

Map httpHeaders = ((BindingProvider)stub).getRequestContext();
httpHeaders.remove("org.apache.cxf.message.Message.PROTOCOL_HEADERS");


But I do not feal very comfortable with this hack. Does any ody know about this issue, or have I missed something during migration?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/782733#782733]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121211/04584c61/attachment.html 


More information about the jboss-dev-forums mailing list