0

I am developing webservices usin CXF-WS 2.2.1. I had developed and tested the services earlier but now the generated wsdl is different from the earlier one here is the old one

<?xml version="1.0" ?> 
- <wsdl:definitions name="ICodeTableServiceService" targetNamespace="http://codetable.service.esps.cvs.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://codetable.service.esps.cvs.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://codetable.service.esps.cvs.com/" xmlns:tns="http://codetable.service.esps.cvs.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="ESPSException" type="tns:ESPSException" /> 
- <xsd:complexType name="ESPSException">
- <xsd:sequence>
  <xsd:element name="logged" nillable="true" type="xsd:boolean" /> 
  <xsd:element name="priority" nillable="true" type="xsd:int" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="getCodeTableDataMultiple" type="tns:getCodeTableDataMultiple" /> 
- <xsd:complexType name="getCodeTableDataMultiple">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="codeTypeName" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="getCodeTableDataMultipleResponse" type="tns:getCodeTableDataMultipleResponse" /> 

and the old one is like

<?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions name="ICodeTableServiceService" targetNamespace="http://codetable.service.esps.cvs.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://codetable.service.esps.cvs.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://codetable.service.esps.cvs.com/" xmlns:tns="http://codetable.service.esps.cvs.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="sayHello" nillable="true" type="tns:sayHello" /> 
  <xs:element name="sayHelloResponse" nillable="true" type="tns:sayHelloResponse" /> 
  <xs:element name="ESPSException" type="tns:ESPSException" /> 
- <xs:complexType name="ESPSException">
- <xs:sequence>
  <xs:element name="logged" nillable="true" type="xs:boolean" /> 
  <xs:element name="priority" nillable="true" type="xs:int" /> 
  </xs:sequence>
  </xs:complexType>
  <xs:element name="getCodeTableData" nillable="true" type="tns:getCodeTableData" /> 
  <xs:element name="getCodeTableDataResponse" nillable="true" type="tns:getCodeTableDataResponse" /> 

As you can see the wsdl is different right from the first line.. With no change in configurations or the jars used in the project. Could anyone please help me out with why such a thing is happening. As soon as possible would be appreciated cos this has to move to a build day after tomorrow.

Thanks in advance Adhir Aima

4

1 回答 1

3

很多事情都可能导致其中的一些。encoding="UTF-8" 对我来说很奇怪。不确定是什么导致该解析器似乎缺少以某种方式被拾取的不同解析器。也许不同的JDK?我不太确定。

其余的更改看起来就像模式中元素/类型的顺序和属性顺序的顺序差异。在这两种情况下,答案都是一样的。这些东西存储在内存中的 HashMaps 中。不能保证 HashMap 的顺序,并且在各种情况下很容易不同。不同的解析器(见上文)可以以不同的顺序调用 put(..) 来影响事物。不同的 JRE 可以对它们进行不同的排序。此外,从 getClass().getMethods() 返回的 Method[] 的顺序可能会产生影响(例如,已知 IBM JDK 以与 Sun JDK 不同的顺序返回它们),因为 CXF 会以不同的顺序自省. 不同的编译器可以以不同的顺序将方法放在 .class 文件中。ETC....

于 2009-08-26T18:48:59.730 回答