I need to write a java client for a .NET secure web service.
I am using axis 1.4 and wss4j-1.5.4
After constructing my stub files with WSDL2java I wrote my client code as
follows;
public static void main(String[] args)throws Exception {
ServiceLocator locator = new ServiceLocator();
ServiceSoapStub service = (ServiceSoapStub)locator.getServiceSoap();
//here I try to set the security configuration
service._setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);
service._setProperty(WSHandlerConstants.USER, "user");
service._setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PASSWORD_TEXT);
service._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
"PWCBHandler.class");
service._setProperty(Constants.ENV_ADDRESSING_NAMESPACE_URI,
Constants.NS_URI_ADDRESSING_2004_08);
//here I try to call the remote operation
WsSahisArac[] araclar = service.plakaDanAracBul("01AT076",
"486278", "AktifBanK-EGM-RehinSerVICE-L6", 137);
System.out.println(araclar[0].getAd());
}
But I am always getting the error
Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate
recipient is required but not present in the message.
I am really having a hard time to solve this problem for a few days, I will
appreciate any help.
Thanks in advance,
Fatih