This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes weblogic.webservice.tools.wsdlp.WSDLParseException: [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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "weblogic.webservice.tools.wsdlp.WSDLParseException: [WSDL Parser]:first element is not definitions" Watch "weblogic.webservice.tools.wsdlp.WSDLParseException: [WSDL Parser]:first element is not definitions" New topic
Author

weblogic.webservice.tools.wsdlp.WSDLParseException: [WSDL Parser]:first element is not definitions

srikanth katipelly
Greenhorn

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 :
weblogic.webservice.tools.wsdlp.WSDLParseException: 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());
log.info("WRIDBYSON Service START");
System.out.println("logger created");
service = new EdgeService_Impl(wsurl);
log.info("Edgeservice instance created");
System.out.println("Edgeservice instance created");
port = service.getedgeInterface();
log.info("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="http://edge.att.com/edgews" xmlns:ch="http://cio.att.com/commonheader/v3" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" name="edgeServicesDescription" targetNamespace="http://edge.att.com/edgews">
<wsdl:types>
<xsd:schema targetNamespace="http://edge.att.com/edgews" elementFormDefault="qualified">
<xsd:include schemaLocation="edge-local.xsd"/>
<xsd:import namespace="http://cio.att.com/commonheader/v3" schemaLocation="CommonHeaderV3_3.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="WSException">
<wsdl:part name="WSException" element="ch:WSException"/>
</wsdl:message>
<wsdl:message name="retrieveWridBySONRequest">
<wsdl:part name="retrieveWridBySONRequest" element="tns:retrieveWridBySONRequest"/>
<wsdl:part name="WSHeader" element="ch:WSHeader"/>
</wsdl:message>
<wsdl:message name="retrieveWridBySONResponse">
<wsdl:part name="retrieveWridBySONResponse" element="tns:retrieveWridBySONResponse"/>
<wsdl:part name="WSResponseHeader" element="ch:WSResponseHeader"/>
</wsdl:message>
<wsdl:message name="forceGetDetailsRequest">
<wsdl:part name="forceGetDetailsRequest" element="tns:forceGetDetailsRequest"/>
<wsdl:part name="WSHeader" element="ch:WSHeader"/>
</wsdl:message>
<wsdl:message name="forceGetDetailsResponse">
<wsdl:part name="forceGetDetailsResponse" element="tns:forceGetDetailsResponse"/>
<wsdl:part name="WSResponseHeader" element="ch:WSResponseHeader"/>
</wsdl:message>
<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>
<wsdlperation name="forceGetDetails">
<wsdl:input name="forceGetDetailsRequest" message="tns:forceGetDetailsRequest"/>
<wsdlutput name="forceGetDetailsResponse" message="tns:forceGetDetailsResponse"/>
<wsdl:fault name="WSException" message="tns:WSException"/>
</wsdlperation>
</wsdl:portType>
<wsdl:binding name="edgeBinding" type="tns:edgeInterface">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="retrieveWridBySON">
<soapperation soapAction="http://edge.att.com/edgews/retrieveWridBySON"/>
<wsdl:input>
<soap:header message="tns:retrieveWridBySONRequest" part="WSHeader" use="literal"/>
<soap:body parts="retrieveWridBySONRequest" use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:header message="tns:retrieveWridBySONResponse" part="WSResponseHeader" use="literal"/>
<soap:body parts="retrieveWridBySONResponse" use="literal"/>
</wsdlutput>
<wsdl:fault name="WSException">
<soap:fault name="WSException" use="literal"/>
</wsdl:fault>
</wsdlperation>
<wsdlperation name="forceGetDetails">
<soapperation soapAction="http://edge.att.com/edgews/forceGetDetails"/>
<wsdl:input>
<soap:header message="tns:forceGetDetailsRequest" part="WSHeader" use="literal"/>
<soap:body parts="forceGetDetailsRequest" use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:header message="tns:forceGetDetailsResponse" part="WSResponseHeader" use="literal"/>
<soap:body parts="forceGetDetailsResponse" use="literal"/>
</wsdlutput>
<wsdl:fault name="WSException">
<soap:fault name="WSException" use="literal"/>
</wsdl:fault>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="edgeService">
<wsdl:port name="edgePort" binding="tns:edgeBinding">
<soap:address location="http://crmdev2.bcs.att.com:1234/mockey/service/forcegetdetails"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

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.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: weblogic.webservice.tools.wsdlp.WSDLParseException: [WSDL Parser]:first element is not definitions