cancel
Showing results for 
Search instead for 
Did you mean: 

XML Data Type as Ouput from Transaction

Former Member
0 Kudos

Hi,

I am trying to generate the output as XML from the Transaction, I am using the template Process Order list which is existing in Module libraries. I have added the Reference Schema Loader and configured it with B2MML-v0300-ProductionSchedule.xsd and later I assigned this as a reference document to the Output XML and when I execute the Transaction I get no errors but when I tried the WSDLsyntax "http://server:port/XMII/WSDL/<Transaction> to generate the output from I don't see the output as expected, am I doing something wrong here, please suggest.

Thanks,

Jai

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

http://server:port/XMII/WSDL/<Transaction>; will return the definition of webservice.

Consume this webservice and execute it. then you will get the output of transaction.

Regards

Anshul

Former Member
0 Kudos

Hi Anshul,

I tried the same syntax but it's not working for me.

Regards,

Jai

Former Member
0 Kudos

Any error are you getting while execution.

Your output is not as expected while consuming it or generating the web service.

regards

Anshul

Former Member
0 Kudos

Hi Anshul,

I am able to run the wsdl now after using the syntax "http://<server:port>/WSDLGen/<Transaction>

I get the ouput as below but I am expecting it to return in B2MML XML Code as I referenced the B2MML Schema to my OutputXML


 <?xml version="1.0" encoding="UTF-8" ?> 
- <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:element maxOccurs="1" minOccurs="0" name="AsOfDate" type="s:dateTime" /> 
  <s:element maxOccurs="1" minOccurs="0" name="CreateOutputXML" type="s:string" /> 
  <s:element maxOccurs="1" minOccurs="0" name="Debug" type="s:string" /> 
  <s:element maxOccurs="1" minOccurs="0" name="MRPType" type="s:string" /> 
  <s:element maxOccurs="1" minOccurs="0" name="Material" type="s:string" /> 
  <s:element maxOccurs="1" minOccurs="0" name="OrderType" type="s:string" /> 
  <s:element maxOccurs="1" minOccurs="0" name="ProdPlant" type="s:string" /> 
  </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">
  <soap:address location="http://vergis:80/XMII/SOAPRunner/sapmii/SAPProductionOrderListTransaction" /> 
  </port>
  </service>
  </definitions>

Thanks,

Jai

Former Member
0 Kudos

Hi Jai,

This will return soap protocol definition only.

I guess thats fine.

Now Run this url in Transaction with werservice action block

and check for the output

Former Member
0 Kudos

Hi Anshul,

Are you referring me to create new web service transaction, if so I just created a WEBSERVICE action block and run the Transaction as URL in web service action block but I am getting this error.

bold "SOAP service could not be loaded: XMLProxy Error: The markup in the document following the root element must be well-formed"

Thanks,

Jai

Former Member
0 Kudos

Check this like

This might help

Try to pass credentials as well.

Edited by: Anshul Sahu on Oct 6, 2011 1:54 PM

Former Member
0 Kudos

Hi Jai,

Well, the post you wanted me to refer was useful, I unchecked the WSDLGenSecurityEnabled check box in System administration menu and able to move ahead on webservice action block.When I run the transaction in URL and press Next I get to see the "XacuteWSSoap" in the Ports window and if click the next againI see "Xacute" in Operations window and I have to click on a Finish button. Before adding the reference schema and reference document I had a Xacute query to check my output and I still have the Xacute query which uses this transaction but I don't see any out from the Xacute query after adding the reference document to my Output XML but before that I am able to see the Output via Xacute Query.

Thanks,

Jai

Former Member
0 Kudos

Not understood exactly.

Refer this blog may be this will solve your problem

Forgot to tell you something.

In Input links to webservice call.

Check for XacuteQuery XML.

Map XacuteQuery ->LoginName and XacuteQuery ->LoginPassword with your MII username Password.

Check the result

Thanks

Anshul

Edited by: Anshul Sahu on Oct 6, 2011 2:15 PM

Former Member
0 Kudos

Hi Anshul,

Oh Sorry earlier I was referring to other issue. please ignore.

As you said I found the LoginName and LoginPassword in XacuteRequest and when I click on LoginName it shows me a Target XPath as "Web_Service_0.XacuteRequest{/ns1:XacuteRequest/ns1:LoginName} " ...where should I pass the LoginName here can you tell me the syntax. can you guide me here please

Thanks,

Jai

Edited by: jaimalhotra on Oct 6, 2011 4:12 PM

Edited by: jaimalhotra on Oct 6, 2011 4:21 PM

Former Member
0 Kudos

Hi

In Workbench from Webservice action block where you are calling the webservice.

Open links.

Search for XacuteRequest XML.

Open LoginName Node and assign your userName.

Same as with password.

Its simple assignment as other action blocks.

Regards

Anshul

Edited by: Anshul Sahu on Oct 6, 2011 4:37 PM

Former Member
0 Kudos

Thanks Anshul,

I am on MII 12.1 and it's not prompting me to enter the LoginName and Password. I have create a new Transaction where I only have webservice action block and nothing else added to the Webservice action block, when I pass the URL ( Transaction) onto Webservice action block I get the response as expected

Ports :XacuteWSSoap

Operations : Xacute.

I need help on how to get the required XML from this Webservice action block. I only created one Webservice action block to test the URL but I am also expecting to see my Output XML from this.

Thanks,

Jai

Former Member
0 Kudos

Hi Jai,

After Configuration.

Go to Configure LInks of your webservice action block.

There you can find the same. It wont prompt for username and password

Regards

Anshul

Former Member
0 Kudos

Thanks Anshul,

I added the LoginName and Password but when I execute it I dont see any Output XML. Sorry I dont have much expereince working with WEBSERVICE action block, am I doing anything wrong here.

Thanks,

Jai

Former Member
0 Kudos

Hi Jai,

Please check XacuteResponse after exacution. It should return the output of the transaction in XacuteResponse.

Former Member
0 Kudos

Anshul,

Sorry but where should I find the XacuteResponse XML in the link editor? Please guide

Thanks,

Jai