Hi James,

I did the following for it to work:

      Options opts = new Options(args);
      opts.setDefaultURL("http://www.abc.com/XService.asmx";);

      Service  service = new Service();
      Call     call    = (Call) service.createCall();
      call.setTargetEndpointAddress( new URL(opts.getURL()) );
      call.setUseSOAPAction(true);
      call.setSOAPActionURI("http://www.abc.com/blah";);

      org.apache.axis.message.SOAPEnvelope result =
call.invoke((org.apache.axis
.message.SOAPEnvelope)envelope);

      // envelope was created in the previous code

Regards
Sri

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 30, 2004 4:55 AM
Subject: Re: SOAP Action header does not get passed


> Hi.
>
> What did you do to get it working?
>
> Thanks
> James
>
>
>
>
> "Srilekha Mudumbai" <[EMAIL PROTECTED]>
> 30/03/2004 11:40
> Please respond to
> [EMAIL PROTECTED]
>
>
> To
> <[EMAIL PROTECTED]>
> cc
>
> Subject
> Re: SOAP Action header does not get passed
>
>
>
>
>
>
> Hi all
>
> I found another alternative which works. But it is not SOAP provider
> independent code.
> I have to use axis specific calls. I would still prefer the code mentioned
> here to work.
>
> Regards
> Sri
> ----- Original Message ----- 
> From: Srilekha Mudumbai
> To: [EMAIL PROTECTED]
> Sent: Tuesday, March 30, 2004 3:38 AM
> Subject: SOAP Action header does not get passed
>
> Hello all,
>
> Please review my following code and let me know why SOAPAction header is =
> not
> sent to the destination. When I send a message, shouldn't the headers of =
> the soap message be sent as part of the HTTP header information?
>
>     try {
>       SOAPConnectionFactory scf =3D SOAPConnectionFactory.newInstance();
>       SOAPConnection connection =3D scf.createConnection();
>       MessageFactory msgFactory =3D MessageFactory.newInstance();
>
>       SOAPMessage msg =3D msgFactory.createMessage();
>       SOAPEnvelope envelope =3D msg.getSOAPPart().getEnvelope();
>       MimeHeaders headers =3D msg.getMimeHeaders();
>       headers.addHeader( "SOAPAction", "http://www.abc.com/blah";);
>       SOAPBody body =3D envelope.getBody();
>
>       javax.xml.soap.SOAPBodyElement bodyElement =3D
>         body.addBodyElement(envelope.createName("GetGroup",
>           "", "http://www.abc.com/XServer";)
>       );
>
>       // other elements population here...
>       msg.saveChanges();
>       URLEndpoint endpoint =3D new =
> URLEndpoint("http://localhost:8080/XServices/abc.asmx";);
>
>       msg.writeTo(System.out);
>       SOAPMessage reply =3D connection.call(msg, endpoint);
>
>       // the call at the destination has a blank SOAPAction??
>
>       reply.writeTo(System.out);
>    } catch (......) {
>    }
>
> This is a very urgent situation. Any help or guidance is really =
> appreciated.
>
> Regards
> Sri
>
> This email is intended solely for the use of the named addressee(s). Any
> unauthorised disclosure, copying or distribution of the confidential
> information contained therein, or the taking of any action based on it, is
> prohibited. The sender disclaims any liability for the integrity of this
> email. Legally binding declarations must be in written form.
>

Reply via email to