• Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis and encoding UTF-8  RSS feed

 
Nikhil Reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using axis framework to make webservice calls. I am a client to webservice. I have to sign every soap request with digital signature, I am doing it by a client handler and in the client handler, I am converting MessageContext into an inputStream and passing to a XMLSignature. After the request is signed, it is not adding this encoding part below.

<?xml version="1.0" encoding="UTF-8" ?>.

This is what i am doing

ByteArrayOutputStream boutStream = new ByteArrayOutputStream();

InputStream inStream = new java.io.ByteArrayInputStream(requestMessage.getSOAPPartAsBytes());

//Sign message
XMLSignature.sign(inStream, boutStream, xCert, privateKey);

Message signedMessage = new Message(boutStream.toByteArray());

//Setting the signed Message back
msgContext.setRequestMessage(signedMessage);


The SoapEnvelope before signing has the UTF-8 part, but after signing it doesn't have it. Is there a way to ensure that it has UTF-8 part.
Please advise.
 
Nikhil Reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it right way to extract inputStream, will it add special characters to it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!