Java Code to Post Soap Request (from existing xml) with Signature

115 Views Asked by At

I'm looking for a complete Java code (along with imports and maven dependencies) to post a soap request with signature. I've a XML file, the Java code should read this XML and post it with Outgoing and Incoming Web Security configurations. I'm able to post this request with signature in Soap UI tool.

Outgoing WS Config:

Keystore: Cert.jks file from C:\Certificates

Alias: TestCert

Key Identifier Type: Binary Security Token

Signature Algorithm: rs-sha512

Signature Canonicalization: xml-exc-c14n#

Digest Algorithm: xmlenc#sha512

Use Single Certificate: Checked

Parts:

TimeStamp: URL as Element

Incoming WS Config:

Decrypt Keystore: Cert.jks file from C:\Certificates

I've tried with DocumentBuilder but when I parse the XML file I'm getting [#document:null].

Any support will be highly helpful.

0

There are 0 best solutions below