解析wsdl时出现异常

时间:2010-12-07 12:23:53

标签: java exception wsdl nullpointerexception

Description Resource    Path    Location    Type
WS-I: A problem occured while running the WS-I WSDL conformance check:
org.eclipse.wst.wsi.internal.analyzer.WSIAnalyzerException: null

  Nested exception is: 

  java.lang.NullPointerException
The WSDLAnalyzer was unable to validate the given WSDL File.
ChangedElements.wsdl    /wstest/WebContent/wsdl line 1  WSDL Problem

更新

Netbeans给出了这个错误:

cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'. [7]

wsdl的部分:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                    xmlns:tns="http://www.example.org/xxx/"
                    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    name="xxx"
                    targetNamespace="http://www.example.org/xxx/">

3 个答案:

答案 0 :(得分:3)

答案 1 :(得分:2)

将WSDL定义更改为

                xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"     
                xmlns:tns="http://www.example.org/xxx" 
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="xxx" 
                targetNamespace="http://www.example.org/xxx">

请注意正在删除尾随斜杠

答案 2 :(得分:0)

我遇到了同样的问题,似乎主要是引用了dotnet WCF和WSE服务。

我发现的唯一工作就是手动构建WSDL。