Hi
I have the following problem.
I'm calling a webservice from within a VB.net 2005 Windows program.
For this i got a WSDL file and loaded that in VB.
Until now i just call the webservice and everything works OK.
Now i need to add an extra attribute/header element to the SOAP header
before i contact the webservice.
The webservice needs this to be in the SOAP header.
Where and how do i do this? I have no clue at all.
From the company that runs the webservice i got an example code in
Java, but i have no idea where this had to be placed.
Hope that soemone can help me or can direct me in a direction to find
a solution
JAVA Code:
// Construct the header
QName headerName = new QName(" http://ech.client.nl/vendor",
"Vendor");
SOAPHeaderEleme nt headerElement = new SOAPHeaderEleme nt(headerName);
headerElement.s etValue("ECH Gui");
headerElement.s etMustUnderstan d(true);
try {
Message message = arg0.getCurrent Message();
message.getSOAP Header().addChi ldElement(heade rElement);
} catch (SOAPException se) {
logger.error("K an niet SOAP header 'Vendor' toevoegen", se);
}
I have the following problem.
I'm calling a webservice from within a VB.net 2005 Windows program.
For this i got a WSDL file and loaded that in VB.
Until now i just call the webservice and everything works OK.
Now i need to add an extra attribute/header element to the SOAP header
before i contact the webservice.
The webservice needs this to be in the SOAP header.
Where and how do i do this? I have no clue at all.
From the company that runs the webservice i got an example code in
Java, but i have no idea where this had to be placed.
Hope that soemone can help me or can direct me in a direction to find
a solution
JAVA Code:
// Construct the header
QName headerName = new QName(" http://ech.client.nl/vendor",
"Vendor");
SOAPHeaderEleme nt headerElement = new SOAPHeaderEleme nt(headerName);
headerElement.s etValue("ECH Gui");
headerElement.s etMustUnderstan d(true);
try {
Message message = arg0.getCurrent Message();
message.getSOAP Header().addChi ldElement(heade rElement);
} catch (SOAPException se) {
logger.error("K an niet SOAP header 'Vendor' toevoegen", se);
}
Comment