I am forced to use jax-rpc, generating code with WSDL2LJAVA.
The calling code is like so:
InformationPort_ServiceLocator loc = new InformationPort_ServiceLocator();
InformationInterface port = loc.getInformationPort();
return port.addressVerification(new AddressVerificationRequest(new AddressVerificationInformation(null, number, subDescription, street, streetType, null, suburb, null, null, null, null, null)));
The question is, when I go to call the web service, how do I load the Header as above? I can certainly construct the XML from SOAPElements, but I've no idea how to generate the data required to be embedded in them.
From your sample soap message, it looks like your service expects x509 security. In case you are using J2ee based client (client implementation in WAR or EAR file) this security could be configure using deployment descriptor. It requires a number of settings to be done in deployment descriptor along with the certificate.
I do not remember the detailed steps but the point I am making here is, you do not make that kind of soap message using SOAPElement or so. Direct yourself to find the right configurations to be done for the same.