>From reading the docs, it looks like there are many ways to send a SOAP
message to a server. I thought I'd try to do it with SOAPConnection.

However, I cannot figure out how you set the SOAP action doing this. The
only objects with a setSOAPActionUri method are Call and MessageContext. You
can get MessageContext from a Message object, but it does not appear to be
initialized. Looking quickly at the source, I don't see how it gets
initialized.

So, how do you use SOAPConnection to send SOAP requests when you cannot set
the SOAPActionUri? Any ideas would be appreciated (guess I'll try using Call
in the meanwhile).

Here's some sample code (soapRequest is my request encapsulating object)...

org.apache.axis.Message msg = soapRequest.toSOAPMessage();
org.apache.axis.MessageContext ctx = msg.getMessageContext();
// ctx is null here???

SOAPConnectionImpl cnx =
        SOAPConnectionFactoryImpl.newInstance().createConnection();

javax.xml.soap.SOAPMessage soapResponse =
        cnx.call(msg, new javax.xml.messaging.URLEndpoint(WSDL));


Reply via email to