<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="GetSomethingWS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:getsome="urn://schema.com/services/GetSomething" xmlns:ws="urn://schema.com/services/GetSomething" targetNamespace="urn://schema.com/services/GetSomething">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:getsome="urn://schema.com/services/GetSomething" targetNamespace="urn://schema.com/services/GetSomething" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema"/>
<xs:element name="getSomething" type="getsome:GeneticType"/>
<xs:complexType name="GeneticType">
<xs:sequence>
<xs:element ref="xs:schema"/>
<xs:any/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getSomething">
<wsdl:part name="parameters" element="getsome:getSomething"/>
</wsdl:message>
<wsdl:portType name="GetSomethingWS">
<wsdl:operation name="getSomething">
<wsdl:input message="ws:getSomething"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="GetSomethingWSPortBinding" type="ws:GetSomethingWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getSomething">
<soap:operation soapAction="urn:getSomething" style="document"/>
<wsdl:input>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="GetSomethingWSService">
<wsdl:port name="GetSomethingWSPort" binding="ws:GetSomethingWSPortBinding">
<soap:address location="http://host:port/my.getSomethingWS"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<project default="wsimport">
<target name="wsimport">
<echo>java home=${java.home}</echo>
<property name="wsdl.path" value="./"/>
<property name="wsdl.name" value="GetSomethingWS.wsdl"/>
<exec executable="${java.home}/../bin/wsimport">
<arg line="-keep -s ./src -p ./ -d ./bin -wsdllocation classpath:${wsdl.path}/${wsdl.name} src/${wsdl.path}/${wsdl.name}" />
</exec>
<copy file = "src/${wsdl.path}/${wsdl.name}" todir="./bin/${wsdl.path}" overwrite="true"/>
</target>
</project>
我得到以下警告和错误:
wsimport:
[echo] java home=C:\SoftwareAG32\jvm\jvm160_32\jre
[exec] parsing WSDL...
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema'.
[exec] line 5 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema'.
[exec] line 8 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '12 September 2005'.
[exec] line 10 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Table of contents'.
[exec] line 13 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Introduction'.
[exec] line 15 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Resources'.
[exec] line 16 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Introduction'.
[exec] line 20 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'This document describes the '.
[exec] line 21 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema'.
[exec] line 21 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'namespace.
[exec] It also contains a directory of links to these related resources, using '.
[exec] line 22 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Resource Directory Description Language'.
[exec] line 23 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '.'.
[exec] line 23 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Related Resources for XML Schema'.
[exec] line 26 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Schemas for XML Schema'.
[exec] line 28 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'DTD'.
[exec] line 31 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'A (non-normative) DTD '.
[exec] line 32 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XMLSchema.dtd'.
[exec] line 32 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'for XML Schema. It
[exec] incorporates an auxiliary DTD, '.
[exec] line 33 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'datatypes.dtd'.
[exec] line 33 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '.'.
[exec] line 33 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema'.
[exec] line 38 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'An '.
[exec] line 39 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema schema document'.
[exec] line 39 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'for XML Schema
[exec] schema documents. Last updated with release of XML Schema 2nd edition'.
[exec] line 40 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'in July 2004.'.
[exec] line 41 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Normative References'.
[exec] line 48 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema Part 1:
[exec] Structures'.
[exec] line 53 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '(2nd Edition)'.
[exec] line 53 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema Part 2:
[exec] Datatypes'.
[exec] line 56 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '(2nd Edition)'.
[exec] line 56 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'XML Schema Part 0:
[exec] Primer'.
[exec] line 59 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '(2nd Edition)'.
[exec] line 59 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-schema-ns: The namespace of element 'html' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.
[exec] line 3 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] s4s-elt-invalid: Element 'html' is not a valid element in a schema document.
[exec] line 3 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] src-import.2: The root element of document 'http://www.w3.org/2001/XMLSchema' has to have the namespace name 'http://www.w3.org/2001/XMLSchema' and the local name 'schema'.
[exec] line 3 of http://www.w3.org/2001/XMLSchema
[exec] [WARNING] src-resolve: Cannot resolve the name 'xs:schema' to a(n) 'element declaration' component.
[exec] line 9 of file:/C:/Users/yanja001/Documents/tools/workspace/WsdlValidation/src/GetSomethingWS.wsdl#types?schema1
[exec] [ERROR] Unexpected <html> appears at line 3 column 135
[exec] line 3 of http://www.w3.org/2001/XMLSchema
JAXB或我的WSDL有问题吗?
我今天在处理同样的问题。
我认为您只需要修复您的schemaLocation值:
JAXB或我的WSDL有问题吗?
我需要将XML转换为另一个XML,并更改名称空间。我需要在根元素中添加名称空间t。输入XML:- 我需要以下预期输出XML:- 我尝试了以下XSLT,但没有得到预期的结果:- 但作为:-
我遇到了JAXB编组器的问题。根据文档,当@xmlelement(required=true)(缺省为nillable=false)时,省略了一个null实例,但我在生成的xml中看到,我应该如何让JAXB从xml中完全省略“ExternalEventID”。
我得到以下错误时运行我的应用程序:附加信息:错误在第2行位置64.从命名空间http://www.w3.org/2001/XMLSchema-instance期待元素CustomeLeads...遇到名称为“自定义线索”、命名空间的“元素”。 我不明白为什么我会收到这个错误消息,因为正如你从XML中看到的,“自定义领导”包含在XML中。如果我取出命名空间,文件将不会读取元素。包括命名空间似乎工作,
我正在尝试验证这个XML文件 使用这个XSD文件 但是我得到这个错误消息: XmlSchema错误:元素http://www.w3.org/2001/XMLSchema:complexType在此上下文中无效。 如果我只有麦克风元素的属性定义,程序运行正常。我不知道我做错了什么。我试图让XSD验证mic元素的数据类型。谁能告诉我我做错了什么?
如何删除xmlns:I=”http://www.w3.org/2001/XMLSchema-instance“使用DataContractSerializer时。 这就是我得到的: 我想得到这样的东西: 这是我的模型: 我试图避免使用字符串替换来删除它。