Skip to Content
0
Jul 30, 2013 at 01:33 PM

B1 Service Call / R3KeyExpansion - issue: Prefix 'b1ie' is not mapped to namespace

27 Views

Dear Experts,

In my integration scenario I receive an event from a SAP B1 UDO in the B1iSN interface.

The content of this event (code of object) I want to use in a R3-KeyExpansion to call a R3-function via RFC.

Unfortunately I have issues in getting the Object Code of the event in my KeyExpansion.

The error message is: "Could not load stylesheet.com.sap.engine.lib.xml.util.NestedException: Prefix not mapped: b1ie -> java.lang.Exception: XMLParser: Prefix 'b1ie' is not mapped to a namespace". But I tried to add the namespace to the stylesheets and documents.

The Sender-Object is created with category: "ObjectType Definition for B1 Service Calls".

biu.Mainprogram.xsl

<xsl:stylesheet 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:targetxsl="http://TargetXSLPrefixAlias" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" sim:force="" b1im:force="" jdbc:force="" rfc:force="" b1ie:force="">

KeyExpansionR3.xsl

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet 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:sim="urn:com.sap.b1i.sim:entity" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" sim:force=""> <?B1iSNPackage_B1iSNTools 3.46?><xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output><xsl:variable name="Key01" select="//sim:TargetObjectType/sim:ObjectKeyList/sim:ObjectKey[@FieldName=&apos;MATNR&apos;]/@FieldValue"></xsl:variable><xsl:template match="/"> <ZR3_FUNCTIONCALL xmlns="urn:sap-com:document:sap:rfc:functions"><P_MATNR><xsl:value-of select="$Key01"></xsl:value-of></P_MATNR></ZR3_FUNCTIONCALL> </xsl:template></xsl:stylesheet>BIUMETA.xsl<?xml version="1.0" encoding="UTF-8"?><BIU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns="urn:com.sap.b1i.sim:entity" xsi:schemaLocation="urn:com.sap.b1i.sim:entity ../../com.sap.b1i.system.sld.repository/General.xsd/SemanticIntegrationModel.xsd" SenderSysTypeId="B1.8.8" ReceiverSysTypeId="ECC6.0" SenderCountryCode="*" ReceiverCountryCode="*" SenderMainObjectTypeId="Z.B1.8.8_UDOTEST" ReceiverMainObjectTypeId="Z.ECC6.0_DEBMAS05" ReceiverResponseObjectTypeId="" MainBizflow="Main.bfd" Name="Z.B1ITEM2R3DISTR"> <KeyExpansionRule side="S"> </KeyExpansionRule> <KeyExpansionRule side="R"> <TargetObjectType ObjectNameSpace="urn:sap-com:document:sap:rfc:functions" ObjectTypeId="ECC6.0_AskForDistribution" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.B1ITEM2R3DISTR/KeyExpansionR3.xsl"> <ObjectKeyList> <!--<ObjectKey FieldName="MATNR" SelectionPath="//b1ie:B1IEvent/b1ie:PrimaryKeyList/b1ie:PrimaryKey/@Value"></ObjectKey>--> <ObjectKey FieldName="MATNR" SelectionPath="/b1im:B1IMessage/b1im:Body/b1im:Payload[@ObjectRole=&apos;A&apos;]/b1ie:B1IEvent/b1ie:PrimaryKeyList/b1ie:PrimaryKey/@Value"></ObjectKey> </ObjectKeyList> </TargetObjectType> </KeyExpansionRule> <PropertyList/></BIU> Part of the Message from B1 (should be processed)<b1im:Body xmlns:b1im="urn:com.sap.b1i.sim:b1imessage">      <b1im:Payload ObjectTypeId="" ObjectRole="A">        <b1ie:B1IEvent xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" SysId="0010000118" SysTypeId="B1.8.8" Task="I" LocalObjectType="TEST" UserName="manager">          <b1ie:PrimaryKeyList>            <b1ie:PrimaryKey Key="Code" Value="123456789"/>          </b1ie:PrimaryKeyList>        </b1ie:B1IEvent>      </b1im:Payload>      <b1im:Payload ObjectTypeId="Z.B1.8.8_UDOTEST" ObjectRole="S"/>....How can I get the the Value of the event in the B1-Message and reference on it in the R3KeyExpansion?Thanks for your help!With kind regards,GB