Hi Ilya,
My request is :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken Id="UsernameToken-1">
<Username>Compant\Name</Username>
<Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</Password>
</UsernameToken>
</Security>
</soap:Header>
<soap:Body>
<Lattice_ListEntityTypes xmlns="https://secure.eloqua.com/API/1.2" />
</soap:Body>
</soap:Envelope>
And it get exception as :
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2013-09-16T08:19:51.810Z</u:Created>
<u:Expires>2013-09-16T08:24:51.810Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">The creator of this fault did not specify a Reason.</faultstring>
<detail>
<UnexpectedErrorFault xmlns="https://secure.eloqua.com/API/1.2" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
When using the auto-made request got from Service-References way to get data, It works. The request is as below:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2013-09-16T08:26:56.144Z</u:Created>
<u:Expires>2013-09-16T08:31:56.144Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-6a6f6018-c501-4ce9-9a0c-e044d2c45bfc-2">
<o:Username>Compant\Name</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</o:Password>
</o:UsernameToken>
<o:UsernameToken u:Id="uuid-6a6f6018-c501-4ce9-9a0c-e044d2c45bfc-1">
<o:Username>Compant\Name</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<ListEntityTypes xmlns="https://secure.eloqua.com/API/1.2"/>
</s:Body>
</s:Envelope>
I don't know what necessary is missed.
I don't know SOAP quite well. So, could you tell me why there are 2 UsernameTokens with the same username and password (different ids) in the request header?
Thank you very much.
Best Regards,
Biao