Call Axis WebService exception: Org.xml.sax.SAXException:Bad envelope tag:definitions

Source: Internet
Author: User
Tags wsdl

Using the WebService client created directly with Eclipse, call WebService:
String endpoint = "xxxservice?wsdl"new  xxxserviceproxy (endpoint); Try {    = proxy.request ();    SYSTEM.OUT.PRINTLN (result);} Catch (RemoteException e) {    e.printstacktrace ();      }

An exception occurred calling WebService:

At Org.apache.axis.message.EnvelopeBuilder.startElement (envelopebuilder.java:71) at Org.apache.axis.encoding.DeserializationContext.startElement (deserializationcontext.java:1048) at Com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement (Unknown Source) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement (Unknown Source) at Com.sun.org.apache.xerces.internal.impl.xmlnsdocumentscannerimpl$nscontentdriver.scanrootelementhook (Unknown Source) at Com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next ( Unknown source) at Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdriver.next (Unknown source ) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (Unknown Source) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (Unknown Source) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source) at Com.sun.org.apache. Xerces.internal.parsers.XML11Configuration.parse (Unknown Source) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (Unknown Source) at Com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (Unknown Source) at Com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (Unknown Source) at Com.sun.org.apache.xerces.internal.jaxp.saxparserimpl$jaxpsaxparser.parse (Unknown Source) at Com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse (Unknown Source) at Org.apache.axis.encoding.DeserializationContext.parse (deserializationcontext.java:227) at Org.apache.axis.SOAPPart.getAsSOAPEnvelope (soappart.java:696) ... more Find a solution online:String endpoind = "xxxservice?wsdl";When creating endpoint, you cannot add the WSDL, instead:String endpoint = "Xxxservice";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.