File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML Schema Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Schema Problem" Watch "XML Schema Problem" New topic
Author

XML Schema Problem

Natasha Vernon
Greenhorn

Joined: Aug 11, 2006
Posts: 4
I am trying to validate SOAP input against the following schema. But it does not seem to like the schema even if I pass valid input. Is there anything wrong with the schema. I am very new to XML schemas.

<?xml version="1.0" encoding="UTF-8" ?>
- <xsd:schema targetNamespace="http://10.208.139.50/Retailer/" xmlns:impl="http://10.208.139.50/Retailer/" xmlns:intf="http://10.208.139.50/Retailer/" xmlns:tns2="http://Catalog.www.ws_i.org" xmlns:tns3="http://Order.www.ws_i.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <schema targetNamespace="http://10.208.139.50/Retailer/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://10.208.139.50/Retailer/" xmlns:intf="http://10.208.139.50/Retailer/" xmlns:tns2="http://Catalog.www.ws_i.org" xmlns:tns3="http://Order.www.ws_i.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://Order.www.ws_i.org" />
<import namespace="http://Catalog.www.ws_i.org" />
-
- <element name="getCatalogResponse">
-
- <complexType>
-
- <sequence>
<element name="getCatalogReturn" nillable="true" type="impl:ArrayOf_tns2_CatalogItem" />
</sequence>
</complexType>
</element>
-
- <element name="submitOrder">
-
- <complexType>
-
- <sequence>
<element name="orderItems" nillable="true" type="impl:ArrayOf_tns3_PartsOrderItem" />
<element name="customerDetails" nillable="true" type="tns3:CustomerDetailsType" />
</sequence>
</complexType>
</element>
-
- <element name="submitOrderResponse">
-
- <complexType>
-
- <sequence>
<element name="submitOrderReturn" nillable="true" type="impl:ArrayOf_tns3_PartsOrderResponseItem" />
</sequence>
</complexType>
</element>
-
- <element name="getCatalog">
-
- <complexType>
<sequence />
</complexType>
</element>
-
- <complexType name="ArrayOf_tns2_CatalogItem">
-
- <sequence>
<element maxOccurs="unbounded" minOccurs="0" name="CatalogItem" nillable="true" type="tns2:CatalogItem" />
</sequence>
</complexType>
-
- <complexType name="ArrayOf_tns3_PartsOrderItem">
-
- <sequence>
<element maxOccurs="unbounded" minOccurs="0" name="PartsOrderItem" nillable="true" type="tns3:PartsOrderItem" />
</sequence>
</complexType>
-
- <complexType name="ArrayOf_tns3_PartsOrderResponseItem">
-
- <sequence>
<element maxOccurs="unbounded" minOccurs="0" name="PartsOrderResponseItem" nillable="true" type="tns3:PartsOrderResponseItem" />
</sequence>
</complexType>
</schema>
-
- <schema targetNamespace="http://Catalog.www.ws_i.org" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://10.208.139.50/Retailer/" xmlns:intf="http://10.208.139.50/Retailer/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <complexType name="CatalogItem">
-
- <sequence>
<element name="name" nillable="true" type="xsd:string" />
<element name="description" nillable="true" type="xsd:string" />
<element name="productNumber" nillable="true" type="xsd:integer" />
<element name="category" nillable="true" type="xsd:string" />
<element name="brand" nillable="true" type="xsd:string" />
<element name="price" nillable="true" type="xsd:decimal" />
</sequence>
</complexType>
</schema>
-
- <schema targetNamespace="http://Order.www.ws_i.org" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://10.208.139.50/Retailer/" xmlns:intf="http://10.208.139.50/Retailer/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <complexType name="PartsOrderItem">
-
- <sequence>
<element name="productNumber" nillable="true" type="xsd:integer" />
<element name="quantity" nillable="true" type="xsd:integer" />
<element name="price" nillable="true" type="xsd:decimal" />
</sequence>
</complexType>
-
- <complexType name="CustomerDetailsType">
-
- <sequence>
<element name="custnbr" nillable="true" type="xsd:string" />
<element name="name" nillable="true" type="xsd:string" />
<element name="street1" nillable="true" type="xsd:string" />
<element name="street2" nillable="true" type="xsd:string" />
<element name="city" nillable="true" type="xsd:string" />
<element name="state" nillable="true" type="xsd:string" />
<element name="zip" nillable="true" type="xsd:string" />
<element name="country" nillable="true" type="xsd:string" />
</sequence>
</complexType>
-
- <complexType name="PartsOrderResponseItem">
-
- <sequence>
<element name="productNumber" nillable="true" type="xsd:integer" />
<element name="quantity" nillable="true" type="xsd:integer" />
<element name="price" nillable="true" type="xsd:decimal" />
<element name="comment" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
</xsd:schema>
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

"nv nv", welcome to the JavaRanch.

We're pleased you are here, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.
Natasha Vernon
Greenhorn

Joined: Aug 11, 2006
Posts: 4
I just updated my profile.
Thanks,
Natasha
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

What's with all those little hyphen (-) characters?

Can you post the error message you're getting? Sure would be nice to have a hint.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Schema Problem
 
Similar Threads
WSDL2Java Error
XML Schema Problem
How to change WSDL schema definition to suit incoming requests?
Webshere Integration Developer issues
java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.