4 Replies Latest reply on Mar 11, 2009 1:14 PM by Newsgroup_User

    Format issues with SOAP Header

    mano.coolguy
      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
        • 1. Re: Format issues with SOAP Header
          Level 7
          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
          • 2. Re: Format issues with SOAP Header
            mano.coolguy Level 1
            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.

            Your help will be highly appriciated.

            Thanks and Regards
            Manohar Botlagunta
            • 3. Re: Format issues with SOAP Header
              mano.coolguy Level 1
              hi,

              I can to know that it is SOAP version issue

              actor attribute is not supported by SOAP1.2. But coldfusion uses SOAP 1.1 by default

              Can some body please help me in changing the SOAP version in codlfusion
              • 4. Re: Format issues with SOAP Header
                Level 7
                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