An old thread but perhaps the following is still helpful…
I find it odd to view writing code to publish a document to the Broker as a “requirement.” At best it is a design decision that has been made for you. 
As Kevin Williams mentioned, one approach is to use the JMS API along with the Broker as a JMS provider. Another is to use the Broker Java API directly (it’s proprietary). Another is exposing a web service on IS. Yet another is calling an IS service via HTTP get or post (post is probably more appropriate).
If it were me, I’d do plain ol’ XML (POX) over HTTP post.
#webMethods#BPM#webMethods-BPMS