This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Services and the fly likes [WSDL Parser]:first element is not definitions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark " [WSDL Parser]:first element is not definitions" Watch " [WSDL Parser]:first element is not definitions" New topic
Author [WSDL Parser]:first element is not definitions

srikanth katipelly

Joined: Apr 24, 2009
Posts: 1
Hi ,

i am facing issue in webservice Development using weblogic 8.1 , i am getting below Error while creating instance for Service class, As same code is working fine in Weblogic 10 ,

Error : ERROR[WSDL Parser]:first element is not definitions ,

java Code :

public void retrieveWRIDBYSON(String wsurl , String son)throws IOException , ServiceException

try {
System.out.println("in Cline class");
log=Logger.getLogger(this.getClass().getName());"WRIDBYSON Service START");
System.out.println("logger created");
service = new EdgeService_Impl(wsurl);"Edgeservice instance created");
System.out.println("Edgeservice instance created");
port = service.getedgeInterface();"EdgeInterface instance created");
WebServiceContext context = service.context();

i am getting Error in below line
service = new EdgeService_Impl(wsurl);

WSDL File :

<wsdl:definitions xmlns:tns="" xmlns:ch="" xmlns:soap="" xmlns:wsdl="" xmlns:xsd="" xmlns:ns="" name="edgeServicesDescription" targetNamespace="">
<xsd:schema targetNamespace="" elementFormDefault="qualified">
<xsd:include schemaLocation="edge-local.xsd"/>
<xsd:import namespace="" schemaLocation="CommonHeaderV3_3.xsd"/>
<wsdl:message name="WSException">
<wsdl:part name="WSException" element="ch:WSException"/>
<wsdl:message name="retrieveWridBySONRequest">
<wsdl:part name="retrieveWridBySONRequest" element="tns:retrieveWridBySONRequest"/>
<wsdl:part name="WSHeader" element="ch:WSHeader"/>
<wsdl:message name="retrieveWridBySONResponse">
<wsdl:part name="retrieveWridBySONResponse" element="tns:retrieveWridBySONResponse"/>
<wsdl:part name="WSResponseHeader" element="ch:WSResponseHeader"/>
<wsdl:message name="forceGetDetailsRequest">
<wsdl:part name="forceGetDetailsRequest" element="tns:forceGetDetailsRequest"/>
<wsdl:part name="WSHeader" element="ch:WSHeader"/>
<wsdl:message name="forceGetDetailsResponse">
<wsdl:part name="forceGetDetailsResponse" element="tns:forceGetDetailsResponse"/>
<wsdl:part name="WSResponseHeader" element="ch:WSResponseHeader"/>
<wsdl:portType name="edgeInterface">
<wsdlperation name="retrieveWridBySON">
<wsdl:input name="retrieveWridBySONRequest" message="tns:retrieveWridBySONRequest"/>
<wsdlutput name="retrieveWridBySONResponse" message="tns:retrieveWridBySONResponse"/>
<wsdl:fault name="WSException" message="tns:WSException"/>
<wsdlperation name="forceGetDetails">
<wsdl:input name="forceGetDetailsRequest" message="tns:forceGetDetailsRequest"/>
<wsdlutput name="forceGetDetailsResponse" message="tns:forceGetDetailsResponse"/>
<wsdl:fault name="WSException" message="tns:WSException"/>
<wsdl:binding name="edgeBinding" type="tns:edgeInterface">
<soap:binding style="document" transport=""/>
<wsdlperation name="retrieveWridBySON">
<soapperation soapAction=""/>
<soap:header message="tns:retrieveWridBySONRequest" part="WSHeader" use="literal"/>
<soap:body parts="retrieveWridBySONRequest" use="literal"/>
<soap:header message="tns:retrieveWridBySONResponse" part="WSResponseHeader" use="literal"/>
<soap:body parts="retrieveWridBySONResponse" use="literal"/>
<wsdl:fault name="WSException">
<soap:fault name="WSException" use="literal"/>
<wsdlperation name="forceGetDetails">
<soapperation soapAction=""/>
<soap:header message="tns:forceGetDetailsRequest" part="WSHeader" use="literal"/>
<soap:body parts="forceGetDetailsRequest" use="literal"/>
<soap:header message="tns:forceGetDetailsResponse" part="WSResponseHeader" use="literal"/>
<soap:body parts="forceGetDetailsResponse" use="literal"/>
<wsdl:fault name="WSException">
<soap:fault name="WSException" use="literal"/>
<wsdl:service name="edgeService">
<wsdl:port name="edgePort" binding="tns:edgeBinding">
<soap:address location=""/>

Can some one help in this ,

Thanks & Regards
Srikanth reddy

Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Srikanth,
Your WSDL might have problems. Trying adding
<?xml version="1.0" encoding="UTF-8"?> on the top. Also, validate your WSDL before using.

(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
I agree. Here's the link:
subject: [WSDL Parser]:first element is not definitions
Similar Threads
i'm trying to create a webservice using netbeans 6.8 for weblogic 10.3.2 and J2EE 5
MS Exchange web service: If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute
Java class to WSDL
soap fault return empty <detail> element.
How to call update functionality from Java using web service