Skip to Content

Prefix not mapped

Hi!

I'm having trouble with namespaces and this is not the first time.

I'm developing a scenario step that has inbound BusinessPartner event and void output. The BP information is sent to a salesforce webservice in 5 http call atoms inside the step.

Last week this worked very well.

But now, after adding more atoms and logic, I get the exception "Prefix not mapped: soapenv".

  1. I have now put the namespace definition xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" in every possible places in all xsl-files and in the bdf-file. But this doesn't help.

  2. I found Bastians recommendation and added all namespaces in the Inbound Channel Identification Namespace list:
    xmlns:b1e="urn:com.sap.b1i.sim:b1event"

xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent"

xmlns:b1im="urn:com.sap.b1i.sim:b1imessage"

xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms"

xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter"

xmlns:rfc="urn:sap-com:document:sap:rfc:functions"

xmlns:sim="urn:com.sap.b1i.sim:entity"

xmlns:utils2="com.sap.b1i.bpc_tools.Utilities"

xmlns:vpf="urn:com.sap.b1i.vplatform:entity"

xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

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

xmlns:xup="urn:com.sap.b1i.xcellerator:upltdoc"

xmlns:urn="urn:enterprise.soap.sforce.com"

xmlns:urn1="urn:sobject.enterprise.soap.sforce.com"

But this results in an exception in an atom that uses the document function: "Exception while sending warning. in 'document' - function"

The code for the document is:

<xsl:variable name="vpSF_SYSTEM" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;SF_SYSTEM&apos;]/@value"></xsl:variable>

<xsl:variable name="sysIdDocPath" select="concat(&apos;/com.sap.b1i.system.sld.directory/SysId.xml/&apos;,$vpSF_SYSTEM,&apos;(Id)&apos;)"/>

<xsl:variable name="sysIdDoc" select="document($sysIdDocPath)"/>

<xsl:variable name="sysIdHTTA" select="$sysIdDoc/sim:SysId/sim:ConnectivityList/sim:Connectivity[./@ConnectivityTypeId=&apos;HTTA&apos;]"/>

Both sim and vpf is in the namespace list. Why is this happening?

This code works if I don't add the namespaces in the Inbound channel.

Any help appreciated!

Regards

Lars

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 30, 2015 at 09:53 AM

    Hi Lars,

    most of the namespaces are already part of the B1i namespace list, you don't need to define them explicitly at the inbound again.

    The already embedded namespaces are automatically created. E.g. after creation of an new xform you can see them directly added into the xsl file as attributes of xsl:stylesheet.

    => In your step inbound definition you only need to add those which are not explicitly listed in xsl:stylesheet.

    In the inbound step definition, please be aware that the namespaces must not be defined twice using different prefixes (for all scenario steps):

    • Don't use different prefixes for the same url in different scenario step inbound definitions.
    • Don't use different urls for the same prefix in different scenario step inbound definitions.

    E.g. the following namespace is used in the sap.B1Mobile scenario: xmlns:b1mb="http://tempuri.org/"


      Best regards

      Bastian


      P.S.: In a xslt mapping you can also avoid explicit namepace usage by applying the following construct:

      /*[local-name()=&apos;<name_of_your_element>&apos;],

      e.g. select="/*[local-name()=&apos;Msg&apos;]/..." instead of select="/vpf:Msg/..."


      Add comment
      10|10000 characters needed characters exceeded

      • Hi Bastian!

        Thanks for your answer. And for the explantion of how B1i uses the namespaces. It seems a bit sensitive to have the two restrictions that you are writing. That can explain some strange behaviours that I have been faced.

        I now deleted the namespacelist in inbound channel, deleted all soapenv namespace declarations in all xsl files. Then I used local-name() in the atoms that made this error to occur.

        Now it works.

        I have used local-name before and yes, it's a convenient way to get rid of namespace problems. The drawback is that the code is harder to read (and write).

        Wish you a nice weekend!

        Regards

        Lars