Thursday Oct 29, 2009

Diameter Administration on SailFIn 2.0

Yamini has blogged about diameter configuration elements and Admin Cli commands here.

Wednesday Oct 28, 2009

Subscribing to user state using Sun Diameter Sh API.

Here is a code snippet that shows how to subscribe to a user state using Sun Diameter Sh API . The Notifications from the Home subscriber server(HSS) can be received by a Message Driver Bean(MDB). The code snippet of the MDB is also shown below.

The below Admin console snaps of Sailfin 2.0 show Home Subscriber server (pone) configured with Connector Pool(openims_pool) and Connector resource (openims)

PeerConfiguration
Connector Pool and Resource configuration

Here are simple steps :
1.Using Sailfin 2.0 Admin console(Sailfin 2.0 also supports cli commands)
a)Create a Diameter application
b)Create a Diameter Peer ---- Diameter Peer screen also allows you to configure connector pool and resource.
2.Write a SIP Servlet with code snippet shown above
3.Write a MDB as shown above
4.Deploy the sar and jar and you should be done.

Tuesday Mar 20, 2007

Disabling InclusivePrefixList in WSIT

XWSS 3.0 in WSIT by default generates InclusivePrefixList for Exclusive canonicalization algorithm under Signatures and not many implementations of WS Security support this element. So incase you face such a issue where WS Security implementation reject messages generated from WSIT for this reason. You can now disable use of InclusivePrefixList in outgoing messages generated by WSIT by adding “DisableInclusivePrefixList” policy assertion.

Server side policy assertion :
<sunsp:DisableInclusivePrefixListxmlns:sunsp="http://schemas.sun.com/2006/03/wss/server"></sunsp:DisableInclusivePrefixList>

Client side policy assertion :
<sunsp:DisableInclusivePrefixListxmlns:sunsp="http://schemas.sun.com/2006/03/wss/client"></sunsp:DisableInclusivePrefixList>

Sample Signature when DisableInclusivePrefixList is used.

<ds:Signature xmlns:ns10="http://schemas.xmlsoap.org/soap/envelope/" Id="1">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference URI="#5002">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>...........</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#3">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>...........</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>................</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
URI="#adf15bbb-2a98-4dd0-81f4-34072d05521a" />
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>




Technorati Tags: , , , , , , ,

powered by performancing firefox

Friday Feb 10, 2006

Constructing DOM using StAX Writers

I recently added support for createXMLStreamWriter(DOMResult result) method in SJSXP. It is of great use where implementations spit out XML documents to a StreamWriter and you want to construct a DOM tree instead of dumping it to the OuputStream. Following code snippet shows how to create a StAX writer that builds a Document.

XMLOutputFactory xof = XMLOutputFactory.newInstance();

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

DocumentBuilder db = dbf.newDocumentBuilder();

Document doc = db.newDocument();

XMLStreamWriter writer = xof.createXMLStreamWriter(new DOMResult(doc));


About

venu

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today