Skip to Content
avatar image
Former Member

RFC Call: Missing namespace declaration

Dear experts,

I have a file to RFC scenario. I imported the RFC and create files exactly according to the RFC structure, so I don't use a mapping. When I create a file, it provides the following error in the adapter log:

<i>Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declaration(2)</i>

What do I need to do to fix this.

Thanks in advance!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 13, 2007 at 10:40 AM

    Hi,

    Try to check the RFC destination .............In TC "SM59" you can test the RFc destination...........may be there is a problem with RFc destination.......

    And also see if the host is reachable in TC "SM49"--


    >PING--


    > Additional Parameters(provide the host name here)

    Reward wuth points if helpful

    Regards

    Sai ganesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      This is the header of my input file:

      <?xml version="1.0" ?>

      <ZWM_TO_CREATE XMLNS="urn:sap-com:document:sap:rfc:functions">

      Any suggestions?

  • avatar image
    Former Member
    Dec 13, 2007 at 10:42 AM

    Hi,

    could you explain what you mean by

    "creating a file"?

    Regards Mario

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      By creating a file I mean putting an XML file in the FTP directory which XI picks up and sends to the R/3 system as a RFC call.

      This file has the structure of the RFC.

  • avatar image
    Former Member
    Dec 13, 2007 at 10:58 AM

    Hi Schotanus,

    first of all check whether you RFC is reachable or not from the T-Code SM49 >ping >provide host mane in additional parameters (as said by Sai).

    If the problem is not solved ,then to get the namespace declaration to appear in the XML string, You need to add,

    root.setAttribute("xmlns:ns2", "http://www.foo.com");

    or may be:

    root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:ns2",

    "http://www.foo.com");

    where ns2 will be the prefix for your namespace declaration.

    Hope this helps.

    Regards,

    Shibani

    *Reward with points if helpful*

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Henrique Pinto

      This is the whole message:

      I created my own interface and mapped it to the RFC:

      This is the message. Now it successfully pass XI and the adapter sais it is delivered.

      BUT nothing is seen in the target system... how is that possible???

      <?xml version="1.0" ?>

      <ns:MT_TO_CREATE xmlns:ns="urn://cchbc/w2/xi/mes/warehousetransfer">

      <LGNUM></LGNUM>

      <TIMEST>20071207094550.0000000</TIMEST>

      <WERKS>4510</WERKS>

      <ZLAST>0</ZLAST>

      <ZSCID>SCANPRD4</ZSCID>

      <I_LTAP>

      <item>

      <EAN11>5449000003096</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48.000</VSOLM>

      <LENUM>00345101239500010930</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:43:32</ZTIME>

      <BRGEW/>

      </item><item>

      <EAN11>2229000058744</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48</VSOLM>

      <LENUM>00000000003000002961</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:44:01</ZTIME>

      <BRGEW/></item><item>

      <EAN11>2229000058744</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48.000</VSOLM>

      <LENUM>00000000003000002978</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:44:32</ZTIME>

      <BRGEW/></item></I_LTAP></ns:MT_TO_CREATE>

      And the output is:

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

      - <ns1:ZWM_TO_CREATE xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

      <LGNUM />

      <TIMEST>20071207094550.0000000</TIMEST>

      <WERKS>4510</WERKS>

      <ZLAST>0</ZLAST>

      <ZSCID>SCANPRD4</ZSCID>

      - <I_LTAP>

      - <item>

      <EAN11>5449000003096</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48.000</VSOLM>

      <LENUM>00345101239500010930</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:43:32</ZTIME>

      <BRGEW />

      </item>

      - <item>

      <EAN11>2229000058744</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48</VSOLM>

      <LENUM>00000000003000002961</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:44:01</ZTIME>

      <BRGEW />

      </item>

      - <item>

      <EAN11>2229000058744</EAN11>

      <LETYP>E2</LETYP>

      <VSOLM>48.000</VSOLM>

      <LENUM>00000000003000002978</LENUM>

      <VFDAT>2008-12-11T00:00:00</VFDAT>

      <WDATU>2007-12-07</WDATU>

      <ZLINE>830</ZLINE>

      <ZTIME>09:44:32</ZTIME>

      <BRGEW />

      </item>

      </I_LTAP>

      </ns1:ZWM_TO_CREATE>