Andy,

Besides reading the docs, you also can take a WSDL, do a "java
org.apache.axis.wsdl.WSDL2Java file.wsdl" on it and study the generated bind
stub code.

Sjaak

> -----Original Message-----
> From: Andy Kriger [mailto:akriger@;greaterthanone.com]
> Sent: 05 November, 2002 22:13
> To: Axis-User
> Subject: SOAPConnection - how do you set the soapAction?
> 
> 
> 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));
> 
> 


-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 

Reply via email to