I am using a web service that places an authentication token in the header of a SOAP envelope. It appears (looking at the samples that come with WS WSLL) that if a stub is generated in .NET, this header information is opened through a member variable in the stub class. However, when I create my Axis2 Java header using WSDL2Java, it does not appear anywhere.
What is the correct way to extract this information from the SOAP envelope header?
WSDL:
http://www.vbar.com/zangelo/SecurityService.wsdl
C # example:
using System;
using SignInSample.Security;
using SignInSample.Document;
namespace SignInSample
{
class SignInSampleClass
{
[STAThread]
static void Main(string[] args)
{
SecurityService secSvc = new SecurityService();
secSvc.Url = "http://localhost/AutodeskDM/Services/SecurityService.asmx";
secSvc.SecurityHeaderValue = new SignInSample.Security.SecurityHeader();
secSvc.SignIn("Administrator", "", "Vault");
DocumentServiceWse docSvc = new DocumentServiceWse();
docSvc.Url = "http://localhost/AutodeskDM/Services/DocumentService.asmx";
docSvc.SecurityHeaderValue = new SignInSample.Document.SecurityHeader();
docSvc.SecurityHeaderValue.Ticket = secSvc.SecurityHeaderValue.Ticket;
docSvc.SecurityHeaderValue.UserId = secSvc.SecurityHeaderValue.UserId;
}
}
}
The sample illustrates what I would like to do. Note that the instance secSvchas a member variable SecurityHeaderValuethat populates after a successful call secSvc.SignIn().
API SignIn:
< > , SecurityHeaderValue . SecurityHeaderValue -.