After quite a bit of messing around to get Apache Muse working for a subscribe notify request I have run into quite a few problems: wsdl2java errors , authentication support and other issues. It seems that the Muse project is no longer even supported.
Since the msg I want to send is sent rarely (basically to turn on subscription notification) I want to send the xml manually through a soap client. I have the correct soap xml (including soap header) from using soapUI to test the service.
There must be a straightforward way to do this but I can't find one. I'm using Jboss 4.2 (JAX-WS which was not compatible with Muse) and the Jboss Seam app framework as well, although I can and probably will skip seam to get this working.
Have you considered Apache HttpClient?
Strictly speaking, if you just want to send a HTTP request carrying a payload (the SOAP message), then Java SE is sufficient.
Are there any requirements regarding interpreting the response?
You can certainly use an existing copy of the XML client SOAP message as a template and send the request with HttpClient.
I did exactly that for a client, saving a whole bunch of fiddling with AXIS2 classes. I modified the template by replacing values with "@1" *@2" etc placeholders which got replaced with new values while sending the request.
posted 10 years ago
Bill/Ivan - Thanks for the replies
HttpClient - Great suggestion. I have used that in the past and had forgotten about it.
I do need to read the response to ensure the request was successful, which I can do.
HttpClient may well be the solution since I have to embed WSSE security info in the SOAP header and configuring security for this one message is a royal pain.
This msg will basically be sent once. If we ever need to turn subscriptions off, I will have another servlet to send an unsubscribe.
posted 10 years ago
I just read another post you commented on regarding this subject a couple of years ago:
"httpclient for accessing webservice"
You suggested using HttpURLConnection - I think this is the approach I want, correct, since I am invoking a web service - and I need to read the response?
I need to send via a Post.
For my next trick, I'll need the help of a tiny ad ...