C
chandra
I would like to know how to access the SOAP Header data?
I'm building an infopath application using JScript that will consume a
C#-implemented web service.
The infopath application already generated the following SOAP message,
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
<soap:Header>
<Security>
<Username>Demo User</Username>
<Password>Demo Password</Password>
</Security>
</soap:Header>
<soap:Body>
<GetResumeList
xmlns="http://microsoft.com/Solutions/InformationWorker/Recruiting/Resume/"/>
</soap:Body>
</soap:Envelope>
The web service method looks like this,
public class Submission
{
public LogonInfo Info;
[ WebService(Description="Server Variables",
Namespace="http://microsoft.com/Solutions/InformationWorker/Recruiting/Resume/")]
[WebMethod]
[SoapHeader("Info", Direction=SoapHeaderDirection.InOut)]
public string GetResumeList()
{if (Info == null)
{.......}
......
}
where LogonInfo is,
public class LogonInfo : SoapHeader
{
public string username;
public string password;
public LogonInfo()
{....
}
}
My question is why the object "Info" is alway null from inside the above web
service method?. Just for info I could set a new value of the object "Info"
from within the web service method (for instance, username="aaa",
password="bbb" and the infopath apps could see the new value.
Many thanks in advance.
I'm building an infopath application using JScript that will consume a
C#-implemented web service.
The infopath application already generated the following SOAP message,
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
<soap:Header>
<Security>
<Username>Demo User</Username>
<Password>Demo Password</Password>
</Security>
</soap:Header>
<soap:Body>
<GetResumeList
xmlns="http://microsoft.com/Solutions/InformationWorker/Recruiting/Resume/"/>
</soap:Body>
</soap:Envelope>
The web service method looks like this,
public class Submission
{
public LogonInfo Info;
[ WebService(Description="Server Variables",
Namespace="http://microsoft.com/Solutions/InformationWorker/Recruiting/Resume/")]
[WebMethod]
[SoapHeader("Info", Direction=SoapHeaderDirection.InOut)]
public string GetResumeList()
{if (Info == null)
{.......}
......
}
where LogonInfo is,
public class LogonInfo : SoapHeader
{
public string username;
public string password;
public LogonInfo()
{....
}
}
My question is why the object "Info" is alway null from inside the above web
service method?. Just for info I could set a new value of the object "Info"
from within the web service method (for instance, username="aaa",
password="bbb" and the infopath apps could see the new value.
Many thanks in advance.