cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Error : The prefix "soapenv" for element "soapenv:Envelope" is not bound.

Former Member
0 Kudos

Hello Everyone,

We are trying to implement the SOAP to PI to Proxy scenario wherein the PI interface is exposed as a webservice to an external system. The Client Program is trying to send the following message to the PI webservice :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xx.xxx.com:xxx:xxxxxxxxx_POC">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:MT_ClientRequest>

         <Name>am</Name>

      </urn:MT_ClientRequest>

   </soapenv:Body>

</soapenv:Envelope>

It is failing while mapping and giving the error "The prefix "soapenv" for element "soapenv:Envelope" is not bound." When I checked SXMB_MONI for the request message it is showing me the below given message

<MT_ClientRequest xmlns='urn:xx.xxx.com:xxx:xxxxxxxxx_POC'>

          <soapenv:Envelope>

                         <soapenv:Header/>

                              <soapenv:Body>

                                             <MT_ClientRequest>

                                                            <Name xmlns=''>am10May</Name>

                                             </MT_ClientRequest>

                              </soapenv:Body>

          </soapenv:Envelope>

</MT_ClientRequest>

Clearly it is failing because it is not able to find a reference to "soapenv" in the body.

I have tried the below mentioned remedies

  1. Make the sender channel adjustments to "Do Not Use SOAP Envelope". This fails because, the Body of the message is not passed to the mapping program in this case.
  2. Created an XSLT to add namespace xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/". This fails with the error "The prefix "soapenv" for element "soapenv:Envelope" is not bound."
  3. Created an XSLT to remove prefix soapenv. This fails with the error "The prefix "soapenv" for element "soapenv:Envelope" is not bound."

I have read a few blog entries about using the XMLAnonymizerBean but I am not sure if it will work on the SOAP Sender Adapter Channel.

Any help to overcome the error will be highly appreciated.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Few suggestions..

>Make the sender channel adjustments to "Do Not Use SOAP Envelope". This fails because, the Body of the message is not passed to the mapping program in this case.

You should get payload. I don't understand.

After choosing do not use envelope create the XSL mapping and see if that helps. example as below..

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/

xmlns:urn="urn:xx.xxx.com:xxx:xxxxxxxxx_POC">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>


<xsl:template match="*">
  <soapenv:Envelope>
   <soapenv:Header>

</soapenv:Header>
    <soapenv:Body>

<xsl:copy-of select="/*"/>
          </soapenv:Body>
  </soapenv:Envelope>
</xsl:template>
</xsl:stylesheet>

Another option is test using soapui and see what do you get?

I also suspect client system has some issues.

stefan_grube
Active Contributor
0 Kudos

Your message type structure should be like this:

      <urn:MT_ClientRequest xmlns:urn="urn:xx.xxx.com:xxx:xxxxxxxxx_POC">

         <Name>am</Name>

      </urn:MT_ClientRequest>

Nothing else.

The envelope is created or removed by the SOAP adapter automatically.

Former Member
0 Kudos

Hi Stefan,

I have pulled the request message type from SXMB_MONI. Just retrieved the WSDL from Sender Agreement and gave it to the client. I am not sure, why the request message is not coming in the format given by you.

Is there some setting that needs to be done at the message level or ESR/IB?

Regards

stefan_grube
Active Contributor
0 Kudos

Have you considered that the SOAP client does not work correctly?

Which client do you use? Is it something standard like Axis, or is it something self-developed?

When I worked with SOAP adapter, I have often noticed, that the issue comes from the connected system.