Quantcast
Viewing all articles
Browse latest Browse all 4841

Re: Transaction error

Hello Laxman,

 

The XML type is only know to SAP MII. The WSDL don't have anything called as XML type. So even if a transaction has XML type as a property it will be shown as STRING in the wsdl.

 

So if you want to pass an XML to a transaction convert it to STRING and then pass it to the transaction. And then within the transaction you can convert from STRING to XML. But i guess this is not your scenario.

 

If you have a XML type property as Output for a transaction, It will again be returned as a STRING. So you need to handle the returned string in the calling application. For example, an output xml as shown below

 

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

<root>

          <menu>

                    <id>file</id>

                    <value>File</value>

                    <popup>

                              <menuitem>

                                        <element>

                                                  <value>New</value>

                                                  <onclick>CreateNewDoc()</onclick>

                                        </element>

                                        <element>

                                                  <value>Open</value>

                                                  <onclick>OpenDoc()</onclick>

                                        </element>

                                        <element>

                                                  <value>Close</value>

                                                  <onclick>CloseDoc()</onclick>

                                        </element>

                              </menuitem>

                    </popup>

          </menu>

</root>

 

will be returned as a String as shown below

 

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;

&lt;root&gt;

    &lt;menu&gt;

        &lt;id&gt;file&lt;/id&gt;

        &lt;value&gt;File&lt;/value&gt;

        &lt;popup&gt;

            &lt;menuitem&gt;

                &lt;element&gt;

                    &lt;value&gt;New&lt;/value&gt;

                    &lt;onclick&gt;CreateNewDoc()&lt;/onclick&gt;

                &lt;/element&gt;

                &lt;element&gt;

                    &lt;value&gt;Open&lt;/value&gt;

                    &lt;onclick&gt;OpenDoc()&lt;/onclick&gt;

                &lt;/element&gt;

                &lt;element&gt;

                    &lt;value&gt;Close&lt;/value&gt;

                    &lt;onclick&gt;CloseDoc()&lt;/onclick&gt;

                &lt;/element&gt;

            &lt;/menuitem&gt;

        &lt;/popup&gt;

    &lt;/menu&gt;

&lt;/root&gt;

 

As Rohit already mentioned warning "[WARN] Unused line parameter [OUTPUTXML]" will not create any problems while calling the web service.

 


But calling a webservice using following syntax is not the right way to do it.

http://<server>:50000/XMII/WSDLGen/<TrxPath>&OutputParameter=outputXML

 

You can use OutputParameter in the URL with Runner servlet by making http calls but not with WSDLGen. Refer to the below link for details on Runner servlet

 

Transaction Calls Using URLs - SAP Documentation

 

Thanks, Prashant


Viewing all articles
Browse latest Browse all 4841

Trending Articles