I am looking for a fast way to transform a javax.xml.soap.SOAPMessage into byte using fast infoset.
Has someone a clue for me?
Can you please describe your usecase?
As seems you're trying to duplicate JAX-WS work...
The use case is quite easy:
Send SOAP messages over JMS.
I could build a normal SOAP message and send it as string, but - well, this would not be an increase in performance.
Seems what you can do is:
1) serialize SOAPMessage SOAPMessage.writeTo(OutputStream) to ByteBufferOutputStream.
2) Transform it to ByteArrayInputStream
3) Checkout FastInfoset sources from  and look at class .
But actually this way seems quite strange for me.
Probably it could be good to reuse simplicity JAX-WS proposes to you:
1) Plug in jms transport 
2) Turn on FastInfoset 
3) Call web service stub
And I think it will work faster...
> Seems what you can do is:
> 1) serialize SOAPMessage
> SOAPMessage.writeTo(OutputStream) to
> 2) Transform it to ByteArrayInputStream
> 3) Checkout FastInfoset sources from  and look at
> class .
This works fine, but you do not need an extra InputStream;
baos = new ByteArrayOutputStream(DEFAULT_MESSAGE_SIZE);
> But actually this way seems quite strange for me.
> Probably it could be good to reuse simplicity JAX-WS
> proposes to you:
> 1) Plug in jms transport 
> 2) Turn on FastInfoset 
> 3) Call web service stub
This way might really work faster, but the application I am working on is a generic SOAP messages router (without any wsdl). For a simple deployment and reuse, it is forbidden to use any generated data.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.