I did exactly as shown in jwsdp/xws-security/samples/api-sample. Here is my config set up:
<xwss:SecurityConfiguration dumpMessages="true" xmlns:xwss="
http://java.sun.com/xml/ns/xwss/config" >
<!--
Note that in the <Sign> operation, a Timestamp is exported
in the security header and signed by default.
-->
<xwss:Sign includeTimestamp="false">
<xwss:X509Token
encodingType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
valueType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
certificateAlias="b6"
keyReferenceType="IssuerSerialNumber"/>
<xwss:CanonicalizationMethod algorithm="
http://www.w3.org/2001/10/xml-exc-c14n#"/>
<xwss:SignatureMethod algorithm="
http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<xwss:SignatureTarget type="uri" value="/S:Envelope/S:Body">
<xwss:DigestMethod algorithm="
http://www.w3.org/2000/09/xmldsig#sha1"/>
<xwss:Transform
algorithm="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#STR-Transform">
<xwss:AlgorithmParameter name="CanonicalizationMethod" value="
http://www.w3.org/2001/10/xml-exc-c14n#"/>
</xwss:Transform>
</xwss:SignatureTarget>
</xwss:Sign>
</xwss:SecurityConfiguration>
--- But, I am getting the following exception:
com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: java.lang.NullPointerException
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.secureOutboundMessage(XWSSProcessor2_0Impl.java:79)
Caused by: com.sun.xml.wss.XWSSecurityException: java.lang.NullPointerException
at com.sun.xml.wss.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:300)
at com.sun.xml.wss.impl.filter.SignatureFilter.process(SignatureFilter.java:294)
at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:64)
at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:218)
at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy(SecurityAnnotator.java:143)
at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage(SecurityAnnotator.java:118)
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.secureOutboundMessage(XWSSProcessor2_0Impl.java:77)
... 16 more
Caused by: java.lang.NullPointerException
at com.sun.xml.wss.impl.dsig.WSSPolicyConsumerImpl.getInclusiveNamespacePrefixes(WSSPolicyConsumerImpl.java:363)
at com.sun.xml.wss.impl.dsig.WSSPolicyConsumerImpl.generateSignedInfo(WSSPolicyConsumerImpl.java:337)
at com.sun.xml.wss.impl.dsig.WSSPolicyConsumerImpl.constructSignedInfo(WSSPolicyConsumerImpl.java:161)
at com.sun.xml.wss.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:276)
... 22 more
Any Ideas, or suggestions...I am kind of stuck here. Feel like close, but going nowhere.
my SOAP request is a follows:
<S:Envelope xmlns:S="
http://schemas.xmlsoap.org/soap/envelope/"><S:Header/><S:Body><z:submitEBXTDI xmlns:z="com.tb.ingest"><y:rawXML xmlns:y="com.tb.ingest"><![CDATA[<p3:CheckinDocument xmlns:p3="
http://www.xyz.com" SchemaVersion="1.0"><p3:MessageEvent>checkin</p3:MessageEvent><p3:MessageSentDateTime>2008-09-09T17:15:02.477-05:00</p3:MessageSentDateTime><p3:CarrierRouteId>XY0001</p3:CarrierRouteId><p3:CarrierCode>B6</p3:CarrierCode></p3:Passenger><p3:Counts><p3:CrewCount>2</p3:CrewCount><p3:PassengerCount>2</p3:PassengerCount></p3:Counts></p3:eBorders_TravelDocument>]]></y:rawXML></z:submitEBXTDI></S:Body></S:Envelope>
-Thanks for your time!!
Isharo.
[Message sent by forum member 'isharo' (isharo)]
http://forums.java.net/jive/thread.jspa?messageID=299935