If you are using Axis 1.2.1, you must use the stubs setHeader() APIs to
set SOAP headers in the request.

--
Tom Jordahl
Macromedia Server Development

> -----Original Message-----
> From: KV, Jayadev (GE Consumer & Industrial)
[mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 1:51 PM
> To: [email protected]
> Subject: Need help :Error shows the message must contain a wsa:To
header
> 
> Hi,
> I am using apache axis tool behind the firewall to communicate with
the
> web services hosted in micro soft .net
> I have created all the required stubs using WSDL2Java
> 
> One of the stub class i have modified is as below to add the
wsa:action,
> wsa:To and UserTokens at run time
> 
> org.apache.axis.client.Call _call = createCall();
>         _call.setOperation(_operations[1]);
> /* To add the wsa:action and wsa:To elements */
> 
>         _call.setUseSOAPAction(true);
> 
>
_call.setSOAPActionURI("https://KDSL.com/KDSLServices/KDSLGateWay/AddNew
Su
> pplier");
> 
>
_call.setTargetEndpointAddress("https://gateway.kdsl.com/kdslservices/kd
sl
> .asmx");
> /* To add the usertoken */
> 
>
_call.setProperty(UsernameToken.PASSWORD_TYPE,WSConstants.PASSWORD_TEXT)
;
>         _call.setProperty(WSHandlerConstants.USER, "testuser");
> 
> But i am getting "Axis Fault Server was unable to process request.
-->
> The message must contain a wsa:To header"
> 
> Am i doing it in the right way ? Please advice
> 
> Thanks,
> Jayadev
> 
> 
> 

Reply via email to