Hi All,

I am trying to implement a Web Services application using Axis 1.6.2 and 
Rampart 1.6.2, based on the MessageID in the SOAP header request I want to log 
and Map that to the outgoing SOAP response. But right now my response doesn't 
have any headers. do i need to configure anything in the services.xml or 
anything in rampart? Any help is appreciated.

>From Log:


Request: <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header 
xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 soapenv:mustUnderstand="1"><wsu:Timestamp 
wsu:Id="TS-1"><wsu:Created>2012-09-04T13:03:10.709Z</wsu:Created><wsu:Expires>2012-09-04T13:08:10.709Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken
 wsu:Id="UsernameToken-2"><wsse:Username>alice</wsse:Username><wsse:Password
 
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>bobPW</wsse:Password></wsse:UsernameToken></wsse:Security><wsa:To>https://xxx.xx.com:9443/axis2/services/FugenBank-WS</wsa:To><wsa:MessageID>urn:uuid:7d2ab165-759e-4f0d-b99f-c0406c6e455e</wsa:MessageID><wsa:Action>urn:test</wsa:Action></soapenv:Header><soapenv:Body><ns1:test
 
xmlns:ns1="http://xxx.xx.com";><CID>6002005828</CID></ns1:test></soapenv:Body></soapenv:Envelope>



Response: [INFO] <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><ns:testResponse
 
xmlns:ns="http://xxx.xx.com";><ns:return>test</ns:return></ns:testResponse></soapenv:Body></soapenv:Envelope>

both my policy.xml and services.xml are same

-- services.xml--

<service>

<operation name="test">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
<parameter name="ServiceClass" locked="false">xx.xx.IDEnrollment
</parameter>

<module ref="rampart" />
<module ref="addressing" />
<module ref="sample-logging" />

<wsp:Policy wsu:Id="UTOverTransport"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic128 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
</wsp:Policy>
</sp:TransportBinding>
<sp:SignedSupportingTokens
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";
 />
</wsp:Policy>
</sp:SignedSupportingTokens>
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy";>
<ramp:passwordCallbackClass>xx.xx.PWCBHandler</ramp:passwordCallbackClass>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</service>

Thanks,
Ram.

Reply via email to