This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error While Testing Webservice using Web service Explorer in RAD  RSS feed

 
nitin grover
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have an xsd file (code as below):

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:tns="http://webservices.target.com/2008/01/DWM/WMServices" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://webservices.target.com/2008/01/DWM/WMServices">
<!-- Message Header -->
<xsd:complexType name="MessageHeaderType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="SenderAppName" nillable="false" type="xsd:string"/>
<xsd:element default="DWM" maxOccurs="1" minOccurs="0" name="ReceiverAppName" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="UserId" nillable="false" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<!-- Message Header -->
<!-- fault Message -->
<xsd:complexType name="FaultMessageType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="FaultCode" nillable="false" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FaultString" nillable="false" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<!-- fault Message -->
</xsd:schema>

and a wsdl file wherein I am including the above xsd file:

portion of the code from wsdl is as below:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions xmlns:bnd="http://webservices.target.com/2008/01/DWM/WMServices/bnd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservices.target.com/2008/01/DWM/WMServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WMServices" targetNamespace="http://webservices.target.com/2008/01/DWM/WMServices">
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://webservices.target.com/2008/01/DWM/WMServices" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="WMSchema.xsd"/>
<!-- CartonDestination -->
<xsd:complexType name="CartonDestinationRequestEnvelope">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="header" nillable="false" type="tns:MessageHeaderType"/>
<xsd:element maxOccurs="1" minOccurs="1" name="body" type="tns:CartonDestinationRequestBody"/>
</xsd:sequence>
..........
..........
</wsdl:service>
</wsdl efinitions>

The problem is, when I am trying to test the webservice in rad using "Web Service Explorer", I am getting the following errors:

IWAB0380E Errors were encountered while validating XML schemas.
XSD: The location 'WMSchema.xsd' has not been resolved
XSD: Type reference 'http://webservices.target.com/2008/01/DWM/WMServices#MessageHeaderType' is unresolved
XSD: Type reference 'http://webservices.target.com/2008/01/DWM/WMServices#MessageHeaderType' is unresolved
XSD: Type reference

Would appreciate if anyone has any idea why I am getting this error.

I WSDL and XSD files have the same targetNameSpace.

Thanks!
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

Originally posted by nitin grover:
IWAB0380E Errors were encountered while validating XML schemas.
XSD: The location 'WMSchema.xsd' has not been resolved


Based on this error message my guess is that it cannot find the file "WMSchema.xsd".
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!