I think you need to put the Username and Password inside
CredentialSoapHeader. Try creating a struct with those two fields in
it and pass it to the webservice as CredentialSoapHeader. CF should
handle the rest.

One tool I like to use is the web service explorer in Eclipse. It is a
part of the Web Tools Platform. Granted, it does not monitor what you
send out, but it does allow you to test wsdl's without writing any
code and it helps you figure out what fields you need to pass.

Hope this helps.

Kevin

On Tue, Feb 17, 2009 at 1:52 PM, Shane <studio...@gmail.com> wrote:
> Hopefully posting this way will work:
>
> I'm having problems consuming an XML service that is wrapped in SOAP.  Here
> is the service:
>
> POST /services/xxxx/Mapservice.asmx HTTP/1.1
> Host: demo.xxxx.com
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
> SOAPAction: "http://demo.xxxx.com/services/GetPlayDefinition";
>
> <?xml version="1.0" encoding="utf-8"?>
> <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/";>
>   <soap:Header>
>     <CredentialSoapHeader xmlns="http://demo.xxxx.com/services/";>
>       <Username>string</Username>
>       <Password>string</Password>
>     </CredentialSoapHeader>
>   </soap:Header>
>   <soap:Body>
>     <GetPlayDefinition xmlns="http://demo.xxxx.com/services/";>
>       <WMSPlayDefinitionID>int</WMSPlayDefinitionID>
>     </GetPlayDefinition>
>   </soap:Body>
> </soap:Envelope>
>
> Here is my request:
>
> <cfscript>
>
>  // Create the web service object.
>  ws = CreateObject("webservice",
> "http://demo.xxx.com/services/gmap/Mapservice.asmx?wsdl";);
>
>  // Set the username header as a string.
>  addSOAPRequestHeader(ws, "http://demo.xxx.com/services/";, "Username",
> "xxx", true);
>
>  // Set the password header as a string.
>  addSOAPRequestHeader(ws, "http://demo.xxx.com/services/";, "Password",
> "xxx", true);
>
> WMSInfo=ws.GetPlayDefinition(500);
>
>
>  </cfscript>
>
> I do not believe I am sending out a properly structured request.  Here is
> the error message: "SOAP header Username was not understood" .
>
> I cannot seem to get any kind of tool working to view my outgoing  HTTP
> header.  I'm tired, stressed and under a sick deadline.  What stupid thing
> am I doing wrong?
>
> Thanks everyone!
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink
> -------------------------------------------------------------


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to