cancel
Showing results for 
Search instead for 
Did you mean: 

MII Transaction as webservce ?

Former Member
0 Kudos

Hi,

I have requirement to use MII  trasaction in BIW. I know that we can use transaction as webservice as

"http://server:port/XMII/WSDLGen/FullTransaction path and TransactionName?IllumLoginName=username&IllumLoginPassword=password"

But What should i use against "WSDLGen" in above url.

I have seen in some threads that , "Runner?"  is using against WSDLGen . Can I use the it or we look in to somewhere.

And also please let me know that can we use xacute query as webservice instead of  Transaction .if so what is the syntax.

Regards,

Pooja

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pooja,

WSDLGEN : When you use WSDLGen in a URL with a transaction path after it, MII exposes this transaction as a web service. You can then use the generated wsdl in any web service (SOAP) Client and execute the transaction by sending the appropriate request.

You cannot use Runner against WSDLGen. They both behave very differently.

Runner: You use this servlet to make a HTTP Call and run the transaction.

Runner Servlet --> Runs the transaction as HTTP Call.

WSDLGen --> Exposes the transaction as a web service so that it can be consumed by SOAP Clients.

Xacute Query:  An xacute query is used when you want to run the transaction like a query template in MII. One major benefit I see by this is , you get the response in MII's format that is Rowsets-->Rowset--Row . This helps in parsing as I am used to this format.

Xacute Query can also be called via a HTTP Call. Infact, any query can be called via a HTTP Call. http://server:port/XMII/Illuminator?QueryTemplate=FullPathOfTemplate&content-type=text/xml

You could add the credentials as you add for WSDLGen.

So in short,

WSDLGen-> SOAP .

Runner & Xacute Query --> HTTP Call.

Now it depends what BIW expects.

I would suggest you to go through

Web Service Interface - SAP Documentation

Transaction Calls Using URLs - SAP Documentation

Regards

Tufale Ashai

Former Member
0 Kudos

Hi Ashai,

Thanks for your quick reply.

1.

I executed my transaction on browser using the syntax

http://<server>:50000/XMII/Runner?<TrxPath>

It is asking the credential and after that it is giving fatal error instead of xml result.

Error given as below

"This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Rowsets DateCreated="2013-11-15T15:53:54" EndDate="2013-11-15T15:53:54" StartDate="2013-11-15T15:53:54" Version="14.0.3 Build(24)">

<FatalError>

Could not service request, Transaction name does not exist.

</FatalError>

</Rowsets>"

I have given the correct trx path .

2.

     And executed the same transaction on browser using WSDLGen

     http://<server>:50000/XMII/WSDLGen/<TrxPath>

     It is not giving exact transaction result but got some result without error.

3.   But when I have executed the same transaction with xacute query as a url on browser it is giving       xml result.

So can I use this xacute query as wevservice as I have use this trasaction results in BIW.

if not then how can I resolve it Please give some sol.

Regards,

Pooja.



former_member211944
Active Participant
0 Kudos

Hi Pooja,

1. You are using a wrong URL. The correct URL is like this:

http://server:port/XMII/Runner?transaction=<path of the transaction>

2. When you use this URL

http://server:port/XMII/WSDLGen/<path of transaction>?IllumLoginName=<user>&IllumLoginPassword=<password>

This URL will give you the WSDL created for this transaction as Tufale has already mentioned it.

So you can use this URL in any of the SOAP clients to run this transaction as a web service.

Regards,

Rohit Negi.

Former Member
0 Kudos

Hi Pooja,

    As i already mentioned, Xacute query can be used to pull data from MII but it would be a HTTP Call and it is not a webservice. To use web service you need to use the WSDLGen service.

What does BIW need inorder to get the data? A webservice or just any HTTP Call ?

I had mentioned this in .  Former Member was looking for something similar.

You might also want to look at Web Service Interface - SAP Documentation for explanation on WSDLGen

Regards

Tufale

Former Member
0 Kudos

HI Ashai,

Our requirement in BIW is a webservice.

I used the ( http://<server>:50000/XMII/WSDLGen/<TrxPath>) syntax to generate webservice and getting output as below and I could not see the

any data in result.

I followed the below threads but could not solve my issue.

I given xml structure to outputXML parameter and taken outputXML as string parameter but still I could not generate the webservice.

https://scn.sap.com/thread/1974888 

https://scn.sap.com/thread/1974888

http://<server>:50000/XMII/WSDLGen/<TrxPath>   

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">

<!--  Types  -->

<types>

<s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">

<s:complexType name="InputParams">

<s:sequence id="InputSequence"></s:sequence>

</s:complexType>

<s:element name="XacuteRequest">

<s:complexType>

<s:sequence>

<s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string"/>

<s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string"/>

<s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams"/>

</s:sequence>

</s:complexType>

</s:element>

<s:complexType name="Rowset">

<s:sequence>

<s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row"/>

</s:sequence>

<s:attribute name="Message" type="s:string"/>

</s:complexType>

<s:complexType name="Row">

<s:sequence id="RowSequence">

<s:any maxOccurs="132" minOccurs="1" type="s:string"/>

</s:sequence>

</s:complexType>

<s:element name="XacuteResponse">

<s:complexType>

<s:sequence>

<s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset"/>

</s:sequence>

</s:complexType>

</s:element>

</s:schema>

</types>

<!--  Messages  -->

<message name="XacuteSoapIn">

<part element="s0:XacuteRequest" name="parameters"/>

</message>

<message name="XacuteSoapOut">

<part element="s0:XacuteResponse" name="parameters"/>

</message>

<!--  Ports  -->

<portType name="XacuteWSSoap">

<operation name="Xacute">

<input message="s0:XacuteSoapIn"/>

<output message="s0:XacuteSoapOut"/>

</operation>

</portType>

<!--  Bindings  -->

<binding name="XacuteWSSoap" type="s0:XacuteWSSoap">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="Xacute">

<soap:operation soapAction="http://www.sap.com/xMII" style="document"/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

</operation>

</binding>

<!--  Service mapping  -->

<service name="XacuteWS">

<port binding="s0:XacuteWSSoap" name="XacuteWSSoap">

</port>

</service>

</definitions>

And I linked Query result to outputXML  parameter of type xml in transaction.

whenever I appended this outputXML ( 

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

to url I am getting error.

Thanks,

Pooja.

Former Member
0 Kudos

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

This URL is wrong Pooja, You cannot use OutputParameter in URL with WSDLGen.

WSDLGen will only and only give you the wsdl and not the Data.

To get the data, you would need to create a client or a consumer proxy. The client / consumer would then use this wsdl and generate request and response objects.

Looking at the wsdl from your above reply, it looks like the transaction does not have any input or output parameter. To make a paramter as an output parameter you need to create a transaction property and check the output parameter checkbox. Also, you need to map the result to the output parameter.

When you want to consume a transaction as webserivce, you need a client / proxy to get the data. The WSDLGen URL will only give you the WSDL.

Regards

Tufale Ashai