cancel
Showing results for 
Search instead for 
Did you mean: 

XSD As Transaction Input Property

Former Member
0 Kudos

We are running Mii Version 12.1.4 Build (53).

It is entirely possible I am not doing something correctly but I've searched through the forum and the documentation and I need to validate that I understand how this should be working.

I want to use the XSD below as an input to my BLT. I want the XSD Schema to be available in my WSDL for the calling application. So far all I am getting is a reference to the schema in my WSDL. I was hoping the actual structure would be available in the WSDL.

Any idea what I'm doing wrong?

Here is the XSD format:

<?xml version="1.0" encoding="utf-8" standalone="no"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema">

<xs:complexType name="TAG">

<xs:sequence>

<xs:element name="TAGNAME" type="xs:string"/>

<xs:element name="TAGVALUE" type="xs:string"/>

</xs:sequence>

</xs:complexType>

<xs:element name="TAGLIST">

<xs:complexType>

<xs:sequence>

<xs:element name="TAG" type="s0:TAG"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Here is the WSDL:

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

- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mii0="http://www.w3.org/2001/XMLSchema" 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:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://xxxx.xxx.com:50000/XMII/WSDLGen/db/MES_FA/MES_OPC/TRANSACTIONS/FA_WRITE_TAG.xsd" />

- <s:complexType name="InputParams">

- <s:sequence id="InputSequence">

- <s:element maxOccurs="1" minOccurs="0" name="I_XML">

- <s:complexType>

- <s:sequence>

<s:element ref="mii0:TAGLIST" />

</s:sequence>

</s:complexType>

</s:element>

</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://xxxx.xxx.com:50000/XMII/SOAPRunner/MES_FA/MES_OPC/TRANSACTIONS/FA_WRITE_TAG_XML" />

</port>

</service>

</definitions>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Maybe I can pose my question in a different way. In my BLS, I want to have a Transaction Propery of type XML, used as Input, named I_XML. I want to call this BLS as a Web Service.

This is the XML structure I've assigned to I_XML using various methods (Reference Document Loader Assignment, Reference Schema Loader Assignment, direct assignment of XSD via the Transaction Property iteself).

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

<TAGLIST>

<TAG>

<TAGNAME></TAGNAME>

<TAGVALUE></TAGVALUE>

</TAG>

</TAGLIST>

I want the above structure to be available in the WSDL so the calling application understands the input structure.

Instead of seeing the structure above in the WSDL, this is what I get:

- <s:complexType name="InputParams">

- <s:sequence id="InputSequence">

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

</s:sequence>

</s:complexType>

Please tell me what I am doing wrong.

0 Kudos

Brad,

You're not doing anything wrong other than running a older version of MII where this was a bug in that the XSD element wouldn't populate in the drop down for selection in the transaction property and sometimes when it did populate it wouldn't translate into the type definition of the WSDL. This was fixed in SP06 and newer but if you're going to update your instance you should go to the latest SP08 Patch 3 release.

Hope this helps and I hope you didn't spend too much time chasing this one down.

Regards,

Sam

Former Member
0 Kudos

Hello there,

I'm using version 12.1.8 Build 20 and am also having the same problem.

Thanks,

Marcelo

Former Member
0 Kudos

I want to share my use of XSD I am using MII 12.1.7 and have observed XSD issues when I save file inside the WEB directory. Once you save the file and use that XSD to validate your XML, it throws error like " [ERROR] [Validate_XML_0]Error occured while trying to validate the XML.

[ERROR] [Validate_XML_0]Fatal Error in Parsing : The processing instruction target matching "[xX][mM][lL]" is not allowed."

If you open the XSD and remove space at very beginning than it goes fine and successfully validate the xml.

Try removing a space before <?xml version="1.0" encoding="utf-8" ?>. Although this white space could be due to the XSD editor which might be generating white space prior to the encoding declaration or root xml node.

-Ram Upadhayay

Former Member
0 Kudos

Thank you for your response but unfortunately this is not the same problem I am encountering.

Former Member
0 Kudos

First the xsd is not correctly formed ....it throws error while validate your given input xml in a BLS transaction

"[ERROR] [Validate_XML_0]Error in Parsing : cvc-elt.1: Cannot find the declaration of element 'TAGLIST'."\

use this xsd

<?xml version="1.0" encoding="utf-8" ?>

<!Created with Liquid XML Studio Developer Edition (Trial) 8.1.6.2625 (http://www.liquid-technologies.com) Developer Ram Upadhayay, creation date 04-13-2011>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="TAGLIST">

<xs:complexType>

<xs:sequence>

<xs:element name="TAG" minOccurs="1" maxOccurs="1">

<xs:complexType>

<xs:sequence>

<xs:element name="TAGNAME" type="xs:string" minOccurs="1" maxOccurs="unbounded" />

<xs:element name="TAGVALUE" type="xs:string" minOccurs="1" maxOccurs="unbounded" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

-


In order to make web service request format visible to other applications, make the SOAP Request format so when they will access MII Web Service using the SOAPRunner url, they will be able to see the available MII service and the request format.

0 Kudos

Ram,

The XSD is technically correct and the XML that it's expecting is as follows:

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

<TAGLIST xmlns="http://www.w3.org/2001/XMLSchema">

<TAG xmlns="">

<TAGNAME/>

<TAGVALUE/>

</TAG>

</TAGLIST>

{/code}

The issue here is not on the MII side for his release as I previously stated. This appears to be an issue with the MES product and the SAP Service Browser not understanding the schemaLocation declaration that is created for the XSD reference. As proof that this is the case you can point the MII Web Service action to the Transaction WSDL and you will see the proper request structure being generated.

Regards,

Sam

Former Member
0 Kudos

My XSD imports and parses just fine in Mii 12.1.8.