]
CYRIL GERBIER edited comment on JBESB-3589 at 3/22/11 12:43 PM:
----------------------------------------------------------------
tested with SOAP 5.1.0 and JBoss Web Services - Stack Native Core 3.1.2.SP7 : the problem
is exactly the same
tested with SOAP 5.1.0 and JBoss Web Services - Stack CXF Runtime Server 3.1.2.SP7 :
it's works very fine, the problem is not here. But we cannot use CXF Stack for many
others reasons.
was (Author: cgerbier):
tested with SOAP 5.1.0 and JBoss Web Services - Stack Native Core 3.1.2.SP7 : the
problem is exactly the same
tested with SOAP 5.1.0 and JBoss Web Services - Stack CXF Runtime Server 3.1.2.SP7 :
it's works very fine, the problem is not here.
SOAP Header data from SOAPMessageContext in JAXWS Handlers.
------------------------------------------------------------
Key: JBESB-3589
URL:
https://issues.jboss.org/browse/JBESB-3589
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Web Services
Affects Versions: 4.7 CP2, 4.9
Environment: Release ID: JBoss [SOA] 5.0.2.GA_SOA (build: SVNTag=5.0.2.GA_SOA
date=201006221603)
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
Reporter: CYRIL GERBIER
Labels: Handlers., Header, JAXWS, SOAP, SOAPMessageContext
Attachments: boot.zip, server.zip, webservice_wsaddressingWithDataInHeader.zip
I would like to add some JAXWS handlers in web services SOAP. I am using JBOSS SOAP
5.0.2.GA_SOA release (see boot.log for more details).
I made a sample based on webservice_wsaddressing quickstart samples
(samples\quickstarts\webservice_wsaddressing):
- for WSAClient, I added a new JAXWS handler (MyClientHandler extends
SOAPHandler<SOAPMessageContext>). This one adds context data in SOAPHeader from xml
marshalled by JAXB.
- for StatefulEndpointImpl, I added a new JAXWS handler (MyServerHandler implements
SOAPHandler<SOAPMessageContext>). This one reads xml context data in SOAPHeader and
give an context object from JAXB.
This system works fine with JBOSS AS 4.2 and CXF stack.
But using, JBOSS SOAP 5.0.2.GA and native JBossws stack, I encountered severals
problems:
- on client side, data are not correctly sent :
hereafter a sample of HTTP SOAP Request sent :
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<cv:ContextVersion
xmlns:cv="http://si.msa.fr/GestionnaireEchangesInternes/SOA/AppelServices">1.0</cv:ContextVersion>
<ns2:MDWTargetContext
xmlns:ns2="http://si.msa.fr/GestionnaireEchangesInternes/SOA/AppelServices/Objets/Region/v1"/>
<wsa:To>uri:jaxrpc-samples-wsaddressing/TestService</wsa:To>
<wsa:ReplyTo>
<
wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Add...
<wsa:ReferenceParameters>
<ns1:clientid
xmlns:ns1="http://somens">clientid-2</ns1:clientid>
</wsa:ReferenceParameters>
</wsa:ReplyTo>
<wsa:Action>http://org.jboss.ws/addressing/stateful/action</wsa:Action>
<wsa:MessageID>urn:uuid:6f521ca2-fa85-49a7-9f1f-f9719237629e</wsa:MessageID>
</env:Header>
<env:Body>
<ns1:getItems
xmlns:ns1="http://webservice.webservicewsa.quickstart.samples.esb.so...
</env:Body>
</env:Envelope>
We can see that MDWTargetContext has no data when marshalling in SOAPHeader (just xml
structure) whereas it is correct when marshalling in System.out:
<MDWTargetContext
xmlns="http://si.msa.fr/GestionnaireEchangesInternes/SOA/AppelServices/Objets/Region/v1">
<CORGAMO>021</CORGAMO><DPT>82</DPT><ED>E</ED><ND>N</ND></MDWTargetContext>
- on server side, when I send a manually a correct request (because of issue on client)
:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<cv:ContextVersion
xmlns:cv="http://si.msa.fr/GestionnaireEchangesInternes/SOA/AppelServices">1.0</cv:ContextVersion>
<ns2:MDWTargetContext
xmlns:ns2="http://si.msa.fr/GestionnaireEchangesInternes/SOA/AppelServices/Objets/Region/v1">
<ns2:CORGAMO>021</ns2:CORGAMO>
<ns2:DPT>82</ns2:DPT>
<ns2:ED>E</ns2:ED>
<ns2:ND>N</ns2:ND>
</ns2:MDWTargetContext>
<wsa:To>uri:jaxrpc-samples-wsaddressing/TestService</wsa:To>
<wsa:ReplyTo>
<
wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Add...
<wsa:ReferenceParameters>
<ns1:clientid
xmlns:ns1="http://somens">clientid-2</ns1:clientid>
</wsa:ReferenceParameters>
</wsa:ReplyTo>
<wsa:Action>http://org.jboss.ws/addressing/stateful/action</wsa:Action>
<wsa:MessageID>urn:uuid:6f521ca2-fa85-49a7-9f1f-f9719237629e</wsa:MessageID>
</env:Header>
<env:Body>
<ns1:getItems
xmlns:ns1="http://webservice.webservicewsa.quickstart.samples.esb.so...
</env:Body>
</env:Envelope>
datas from ns2:MDWTargetContext are correctly unmarshalled, by I can't read
ContextVersion data : node is found but getTextContent returns null:
17:34:15,953 INFO [MyServerHandler] Fournisseur : Request message
17:34:15,984 INFO [MyServerHandler] ContextVersion :
17:34:15,984 INFO [MyServerHandler] TargetContext : ED E
17:34:15,984 INFO [MyServerHandler] TargetContext : ND N
17:34:15,984 INFO [MyServerHandler] TargetContext : CORGAMO 021
17:34:15,984 INFO [MyServerHandler] TargetContext : DPT 82
Can you help me to solve this problem :
- to send xml context data from client in SOAP Header
- to receive correcly ContextVersion (why getTextContext returns null).
I attach quickstart sample in order to reproduce the problem. Please copy it to
quickstart sample directory and type "ant deploy" to deploy esb archive and
"ant runtest" to test from client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: