WSDLException:没有内容类型:java.net.UnknownServiceException:没有内容类型

时间:2018-08-07 15:43:06

标签: java wsdl axis urlconnection wsdl2java

当我尝试从远程URL解析WSDL时,我的 WSDLException 的值为无内容类型:java.net.UnknownServiceException:无内容类型

这是我的环境:

工具:

  • ant 1.9.13
  • 从轴1.4开始的wsdl2java

JRE:Java 1.7

Retrieving schema at 'http://staging-api.dss.gov.au/datacollection/dex?WSDL&type=XSD&file=file%3A%2FC%3A%2FCCSApps%2FDataCollection%2FBranches%2FDEX_V2%2FOSB%2FDataCollection.Recipient%2FResources%2FSchema%2FRecipient.External.xsd', relative to 'file:/Users/tye/Documents/DSS_2018/DSS_Change_Documentation/staging_2018_08_01.wsdl'.
     [java] WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'http://staging-api.dss.gov.au/datacollection/dex?WSDL&type=XSD&file=file%3A%2FC%3A%2FCCSApps%2FDataCollection%2FBranches%2FDEX_V2%2FOSB%2FDataCollection.Recipient%2FResources%2FSchema%2FRecipient.External.xsd', relative to 'file:/Users/tye/Documents/DSS_2018/DSS_Change_Documentation/staging_2018_08_01.wsdl'.: no content-type: java.net.UnknownServiceException: no content-type
     [java]     at java.net.URLConnection.getContentHandler(URLConnection.java:1251)
     [java]     at java.net.URLConnection.getContent(URLConnection.java:749)
     [java]     at java.net.URL.getContent(URL.java:1051)
     [java]     at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
     [java]     at java.lang.Thread.run(Thread.java:745)
     [java]
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
     [java]     at java.lang.Thread.run(Thread.java:745)

请帮助。

0 个答案:

没有答案