jQuery in Action, 2nd edition*
The moose likes Web Services and the fly likes Error While Testing Webservice using Web service Explorer in RAD 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 » Java » Web Services
Bookmark "Error While Testing Webservice using Web service Explorer in RAD" Watch "Error While Testing Webservice using Web service Explorer in RAD" New topic
Author

Error While Testing Webservice using Web service Explorer in RAD

nitin grover
Greenhorn

Joined: Feb 14, 2008
Posts: 1
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

Joined: Aug 19, 2005
Posts: 2906
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 succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error While Testing Webservice using Web service Explorer in RAD
 
Similar Threads
jax-ws clients and jboss
xsd:unique not working with xml beans
Cannot create service instance, service 'x' not found in wsdl
How to access byte array web method
ws-i compliance questions