on 06-29-2007 9:09 PM
Hi,
SAP XI has exposed one of its Message Interface as a webservice (wsdl).
I have made a standalone vb.net app that should consume this webservice.
I've imported the wsdl OK in visual studio.
I now have a xml document in memory that I want to send via WS to SAP XI.
The problem I'm having is that the input parameter to the WS is a object of the class ORDERS. I'm not very intrested in setting all this values to all this classes. I just want to send my xml doc.... which is a perfect match to the SAP XI Message Interface.
Maybe there is a smart way in converting my xml document into this type ORDERS?
I can see that vb.net has made a lot of methods in the back...all looking the same as my xml doc...
Dim mysrv As sapxid.MI_WEB_SalesOrder_OUTService
.....
mysrv.MI_WEB_SalesOrder_OUT(myorder) ' myorder is of type sapxid.orders
My XML in memory is looking like this...
<ORDERS xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<EDI_DC40>
<DOCTYP>ORDERS05</DOCTYP>
<MESTYP>ORDERS</MESTYP>
<DIRECT>2</DIRECT>
<SNDPOR>WEB_ALE_T</SNDPOR>
<SNDPRT>LS</SNDPRT>
.....
Regards
Martin
Use the DataSet method ReadXML to create a DataTable based on xml structure in memory.
If the structure of source (DataTable) and target structure exactly same (as you said) then all you need is a small sub/function using .NET reflection which will copy the values from source to destination.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
how are you doing ?
a xsd mapping would be useful for creating a template of conversion, which can be invoked at run time, and it should give you quick results too.
with respect,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.