on 12-13-2007 10:32 AM
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!
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*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
Hi,
could you explain what you mean by
"creating a file"?
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"--
> Additional Parameters(provide the host name here)
Reward wuth points if helpful
Regards
Sai ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.