on 02-25-2014 10:56 AM
Hi All,
I am trying to import an XSD into NWDS but cannot figure out how When I right click on "External Definitions" I get no options, I thought there might be an option to import an XSD as an external definition:
I can however import the XSD using the following option but do not know how to reference the imported definition in my ESR object:
File -> Import -> Webservices -> XSD
FYI it is not a webservice I wish to implement, just a simple async message whose definition is in the XSD.
Thanks
Che
Hello Che,
When you would try importing the same XSD in ESR swing client as a normal data type, you would get the same error "Type definition not found". Please try and check.
So, please modify sample XSD as suggested by Hareesh and import. In such a case, there is a caution though. When you try activating the object, it will error out complaining missing simple data types included. So, you may have to break the XSD into its simple data types, import them first and then, import the complex data type.
But when you are able to import the same XSD as external definition in XSR swing client, it should not be a show stopper.
Regards,
Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Che - I'm not sure what is the issue with the above xsd. I'm able to import it in ESR but not in NWDS.
However i modified a bit and i'm able to import with the below.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="//your target name space">
<xs:complexType name="shiporder">
<xs:sequence>
<xs:element name="orderperson" type="xs:string"/>
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="item" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="note" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:positiveInteger"/>
<xs:element name="price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="orderid" type="xs:string" use="required"/>
</xs:complexType>
</xs:schema>
May be you can try..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hareesh,
I did not notice you have changed the XSD definition, replacing "element name="shiporder" with "complexType name="shiporder">".
You are correct the above will work but is a pain and I do not want to edit the given XSD.
What Ankit suggests is correct and I will use the XSD imported via the swing client.
Thanks
Che
Hello Che,
Please refer to the link Importing Data Types - Creating Design Objects using SAP NetWeaver Developer Studio - SAP Library
Regards,
Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit,
I already tried that but the import is not able to pickup the message type in the XSD:
I am able to import the same XSD using the swing client but NWDS is having problems with even the most basic XSD. To prove I have taken a simple example XSD from the net:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder">
<xs:complexType>
<xs:sequence>
<xs:element name="orderperson" type="xs:string" />
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="address" type="xs:string" />
<xs:element name="city" type="xs:string" />
<xs:element name="country" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="item" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<xs:element name="note" type="xs:string" minOccurs="0" />
<xs:element name="quantity" type="xs:positiveInteger" />
<xs:element name="price" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="orderid" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
Can you try importing to NWDS?
Thanks
Che
It is not External Definitions. The Input will be imported as a normal Datatype. Which is good in some cases. But it does not allow external definitions where you want to import documents that does not fit into a namespace in your system. If it is an UBL document the UBL document namespace will be created with the datatype contained.
So you will still have to use the Swing to import external definitions unfortunately.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.