Skip to main content
Participant
July 10, 2015
Question

SOAP Namespace Prefix

  • July 10, 2015
  • 1 reply
  • 923 views

Good pm!

Client is interfacing with me through web service. My soap response looks like this


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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

  <soapenv:Body>

    <ns:WhatPasswordResponse xmlns:ns="http://ws">

      <ns:return>password </ns:return>

    </ns:WhatPasswordResponse>

  </soapenv:Body>

</soapenv:Envelope>

but client is expecting it to look like this

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

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body>

    <ns2:WhatPasswordResponse xmlns:ns2="http://ws">

      <ns2:return>password </ns2:return>

    </ns2:WhatPasswordResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>


I have already tried passing xml as string, but client does not like that.Is there a way to do this? Your help would be most appreciated. Thank you!

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 10, 2015

    What version of Coldfusion are you using?

    If CF10/11 have you configured the web services section in the administrator to use Axis2 / Version 2?

    Participant
    July 13, 2015

    Hello haxtbh! I am testing Coldfusion 11 and encountered the ff. results:

    Version 1:

    <?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:Body>

        <ns1:WhatPasswordResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws">

          <WhatPasswordReturn xsi:type="xsd:string">password </WhatPasswordReturn>

        </ns1:WhatPasswordResponse>

      </soapenv:Body>

    </soapenv:Envelope>

    Version 2:

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

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

      <soapenv:Body>

        <ns:WhatPasswordResponse xmlns:ns="http://ws">

          <ns:return>password </ns:return>

        </ns:WhatPasswordResponse>

      </soapenv:Body>

    </soapenv:Envelope>

    I was previously using Coldfusion MX 6.1 so I was really hoping an upgrade would solve my problem...