on 04-21-2008 7:39 PM
Hello friends
I am trying to import an XSD file as an external definition.
The following code is creating a problem because of the colon ( in the element name that i have used in the code. However, removing that ':' makes the problem dissappear. However, the customer needs that ( and so would like to know if there is any way I can use Colon the way it is and still make it work.
The part of the XSD that is causing the problem is as follows
=================================================
<xs:element name="asx:abap">
<xs:complexType>
<xs:sequence>
<xs:element name="asx:values">
<xs:complexType>
<xs:sequence>
<xs:element name="VERSION">
===================================================
After importing this file, the error that I am getting when i click on WSDL tab is as follows
Unable to convert imported document to WSDL
Reason: Unable to recognize document as valid XSD
Check the selected category
==================================================
Any feedback or comment will be highly appreciated.
Thanks
Ram
I think your customer wants namespace prefixes in the XML structure and not element names starting with asx:
Try to change your xsd in a way, that there are namespaces.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response
But the problem is with "asx:abap"
The other XS: is syntactically correct and it works fine. However when I try asx:abap, it fails. I tried just putting asxabap, and it works. But the customer's requirement is"'asx:abap" which is what is causing the error expalained above. If you have any other suggestions or comments, I would appreciate it.
Thanks
Ram
Thanks a lot guys for all the responses.
Here is the XML stuff you wanted.
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VERSION>1.0</VERSION>
<SENDER>abcATmail.com</SENDER>
<ACCOUNT>ZTEST</ACCOUNT>
<ID>Test</ID>
<SOURCE>
<O2PARAVALU>
<NAME>General</NAME>
<VALUE><![CDATA[General Text]]></VALUE>
</O2PARAVALU>
<O2PARAVALU>
<NAME>Message</NAME>
<VALUE><![CDATA[Test Message]]></VALUE>
</O2PARAVALU>
</SOURCE>
</asx:values>
</asx:abap>
As I mentioned before: the colon is not part of the element name, it is a namespace prefix.
So create your xsd with element names without asx:
Here is a short introduction about namespaces:
http://www.w3schools.com/xml/xml_namespaces.asp
Hope that helps
Stefan
Here is the info needed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://sap.com/xi/XI/Mail/30" targetNamespace="http://sap.com/xi/XI/Mail/30">
<xs:element name="Test">
<xs:complexType>
<xs:sequence>
<xs:element name="Subject" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional subject line
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="From" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional sender email address (required for SMTP)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="To" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional one or more receiver email addresses (required for SMTP)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Reply_To" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional reply-to email addresses
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Content_Type" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional content type (default is text/plain)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Content_Description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional content description
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Content_Disposition" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional content disposition
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Date" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional date
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Message_ID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional message id
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="X_Mailer" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
optional mail program name
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Content" minOccurs="0">
<xs:annotation>
<xs:documentation>
any mixed content type
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="abap">
<xs:complexType>
<xs:sequence>
<xs:element name="values">
<xs:complexType>
<xs:sequence>
<xs:element name="VERSION">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="SENDER">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="ACCOUNT">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="ID">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="SOURCE">
<xs:complexType>
<xs:sequence>
<xs:element name="O2PARAVALU" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="NAME">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="VALUE">
<xs:complexType mixed="true" />
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:NMTOKEN" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="encoding" type="xs:string">
<xs:annotation>
<xs:documentation>
optional encoding name (base64, quoted-printable)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Hi,
Are you sure about your "xs: in your tag "<xs:*blabla> ??
Because, personnaly for all my XSD file (inlcuding unbounded Idoc), I have something like that "xsd:"
<xsd:complexType>
<xsd:sequence>
<xsd:element name="myField" type="xsd:string" minOccurs="0" />
do a copy of your xsd file and try to replace all your "<xs:" by "<xsd:" and after that import it again into your IR.
Give me the result.
regards.
Mickael
Edited by: Mickael Huchet on Apr 21, 2008 8:16 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One of the postings said that it is not a best practice to use Colon. Is that true? But the customer needs it and also I couldn't find any escape charater to make this work.
Any help will be greatly appreciated.
Thanks
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.