• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML with SOAP wrapper

New Here ,
Feb 17, 2009 Feb 17, 2009

Copy link to clipboard

Copied

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!
TOPICS
Advanced techniques

Views

586

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2009 Feb 18, 2009

Copy link to clipboard

Copied

LATEST
I'm also having an issue getting my SOAP request to work properly.

I have used this tool to see the outgoing request. Seems to work pretty well: http://www.nirsoft.net/utils/smsniff.html

I was able to retrieve what I was sending out. It was formatted correctly, but needs to use MTOM when sending it out. I'm going to post a question about it after this reply.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation