2011 Sep 02 3:59 PM
Hello ! :
I need to do an application in Java. This application will receive and XML from WebServices.
But, I never did anything like that. So,I have some questions about this :
1- The webservice will return the execution of an RFC, so, how get Java this XML Code that contains the information of the parameters and tables? With tags?.
2- How i can traduce this xml code / tags, for example, to print a grid with the information received of the table parameter?
3- Will you have an example of xml that comes from a webservice or rfc?
As you can see.. i really need your help.
Sorry about my english and thanks for reading.
Bye!
2011 Sep 02 4:23 PM
Hi,
please let me rephrase it to see if I understand well:
1) at SAP side, there is an RFC-enabled function module called "RFCFM"
2) at SAP side, a web service "WsRfcFm" has been (automatically) created from RFCFM
3) You have to write a java program outside SAP, that calls WsRfcFm (that calls RFCFM)
4-a) Either you want to know how to call WsRfcFm and how the XML will look like?
4-b) or you want to know if you can call directly RFCFM?
For 4-a, here it is not a Java forum, so... About the XML, it is like any other Web service. So the data will depend on the RFC FM parameters...
For 4-b, you can also call RFCFM directly, but you need to add the Java RFC library so that to be able to communicate directly with the SAP system.
Sandra
2011 Sep 02 4:23 PM
Hi,
please let me rephrase it to see if I understand well:
1) at SAP side, there is an RFC-enabled function module called "RFCFM"
2) at SAP side, a web service "WsRfcFm" has been (automatically) created from RFCFM
3) You have to write a java program outside SAP, that calls WsRfcFm (that calls RFCFM)
4-a) Either you want to know how to call WsRfcFm and how the XML will look like?
4-b) or you want to know if you can call directly RFCFM?
For 4-a, here it is not a Java forum, so... About the XML, it is like any other Web service. So the data will depend on the RFC FM parameters...
For 4-b, you can also call RFCFM directly, but you need to add the Java RFC library so that to be able to communicate directly with the SAP system.
Sandra
2011 Sep 02 6:33 PM
Sandra:
thanks for replying !!
you're right, the 4-a option is correct.
I know that the XML contains the structure, for example, the table returned by the RFC, but,what label contains the information? maybe something like <table> xxxxx </table> ?
Also, I read that XML only contains the structures of the parameters, So, where I receive the information that keeps the table?
Thanks again!!
Regards!
2011 Sep 02 10:37 PM
Hi,
For instance, here I have used BAPI_BANK_GETLIST. I generated a WSDL, then I did a "loopback" by generating a client proxy so that to know how to call it, started the ICF recording (SICF), tested the proxy, and I obtain that:
Request:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/">
<TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel>
</n0:Trace>
</soap-env:Header>
<soap-env:Body>
<nr1:BankGetlist xmlns:nr1="urn:sap-com:document:sap:soap:functions:mc-style">
<BankCtry>FR</BankCtry>
<BankList></BankList>
<MaxRows>0</MaxRows>
</nr1:BankGetlist>
</soap-env:Body>
</soap-env:Envelope>
Response:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<n0:BankGetlistResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<BankList>
<item>
<BankCtry>FR</BankCtry>
<BankKey>1234567890</BankKey>
<BankName>AAAAAAAAAAAAA</BankName>
...
</item>
...
</BankList>
<Return>
<Type></Type>
...
</Return>
</n0:BankGetlistResponse>
</soap-env:Body>
</soap-env:Envelope>
Sandra
2011 Sep 05 2:15 PM