Skip to main content
Participant
March 11, 2009
Question

Format issues with SOAP Header

  • March 11, 2009
  • 1 reply
  • 1087 views
Hi,

I am adding seurity(authentication) elements to SOAp Header using addSOAPRequestHeader() function. I am passing the mustUnderstand value as true.

The generated output is as follows

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Header>

<wsse:Security soapenv:actor="" soapenv:mustUnderstand="1" xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

I am not adding any soapenv:actor attribte anywhere in my code. But this attribute is created with a blank value. My web service request is failing for this reason. I am getting fault exception from AXIS Server.

I need to remove this attribute to make it work. Does anybody know how I can do this?

Thanks in Advance
Manohar
This topic has been closed for replies.

1 reply

Inspiring
March 11, 2009
mano.coolguy wrote:
> Hi,
>
> I am adding seurity(authentication) elements to SOAp Header using
> addSOAPRequestHeader() function. I am passing the mustUnderstand value as true.
>
> The generated output is as follows
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
>
> <soapenv:Header>
>
> <wsse:Security soapenv:actor="" soapenv:mustUnderstand="1"
> xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s
> ecext-1.0.xsd">
>
> I am not adding any soapenv:actor attribte anywhere in my code. But this
> attribute is created with a blank value. My web service request is failing for
> this reason. I am getting fault exception from AXIS Server.
>
> I need to remove this attribute to make it work. Does anybody know how I can
> do this?

I had this problem when trying to access a .net web service. I ended up
creating the soap request XML manually.

--
Mack
Inspiring
March 11, 2009
mano.coolguy wrote:
> Mack,
>
> Thanks a lot for your reply. Can you please help me in creating the SOAP
> request XML manually. We are in very critical project.
> Sample code would help me a lot.

Sorry, I can't post the code or extracts but there are 2 steps:
- use cfsavecontent to build your xml (syntax might be wrong, written
directly in the e-mail):
<cfsavecontent variable="xmlRequest">
<soap:Envelope>
<soap:Header>...</soap:Header>
<soap:Body>...</soap:Body>
</soap:Envelope>
</cfsavecontent>

- use cfhttp to post the XML to the web service (I built a simple c#
program to access the web service and then used Wireshark to see how a
correct request looks like).

--
Mack