on 06-14-2011 6:24 PM
Hello everyone,
I'm having some problems while using the XML datatype as an output for a transaction and would like your input on this.
I've created a transaction that has one output property set as a XML. This transaction reads information from a SAP BAPI call and I assigns the response XML to the output parameter. I've checked the output value with a trace block and it is ok.
This transaction is called from within another transaction, but when I read the output parameter after the transaction block is executed, the output parameter is empty...
The only work-around this problem that I have found it to encode the XML as a string and then decode it in the outer transaction, but that just doesn't seem like the right thing to do... There must be a reason to have a XML datatype!
Thanks in advance,
Marcelo
Hi Marcelo,
What version of MII are you working on? There was a release of 12.1 some time ago that had the behavior similar to what you describe, but I don't remember which (12.1.5?). Check the release notes. It should have been documented.
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you looked at the module library templates on SDN - they do this for both the Request and Response XML from the underlying BAPI.
Did you assign a reference document to the output xml property - mapping your transaction output to look like another object (the BAPI response). This assignment should expose the xml structure to a calling transaction action block.
Marcelo,
I too tried this on 12.1.8 build 20 and this seems to be working for me.
Here's what I did, I am calling BAPI_ALM_ORDER_DETAIL in the "called" transaction. This has an output property called "outXML" of type XML.
I assign the response of the BAPI to outXML after the BAPI is executed.
I tried a tracer here and all's well.
In the "calling" transaction I have a tracer after the Transaction call where am able to see the respose from the called transaction.
Thanks
Udayan
Hi Udayan,
Sorry for the long delay, but I missed your reply.
To call the transaction from within MII it works fine.
But the main reason to call the transaction as a web service is to be able to call it from a third party system. When doing that, the web service doesn't respond with the data. You can try using SoapUI, VisualStudio, Eclipse or any other solution to make a web service call and test it.
Hi Jeremy,
you also talked about a "calling transaction", but the problem only happens when the request side of the web service is not a MII transaction, but a third party application. I believe that this is the main purpose of using the MII as web services, since doing a transaction call from within MII can be done directly and it doesn't have to go through a SOAP request.
Thanks!
Hi,
In order to access XML output of your MII trasnaction from outside MII, you need to make your output XML as "Reference Document"
so that the xml can be read/used in non-MII environment.
I tried the same with Visual Studio ( called MII transaction as a webs ervice from C# code), and it worked fine with me
Regards,
Shalaka
Hi Shalakap,
Would you be able to send me the export file for the transaction that you've used as a web service?
I just want to look at a sample to understand what needs to be done in order to get this working properly.
If possible, also the WSDL that you get from the MII WSDLGen.
Thanks for the help,
Marcelo
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.