2013-12-12 28 views
0

我的網絡服務出現錯誤。 錯誤是:錯誤找到以元素開頭的無效內容。預計此時沒有子元素

找到的元素'callerNumber'開頭的內容無效。預計在這一點上不會有子元素。

服務發送對象RelationCARO包含3個字符串:caName,roName和callerNumber(可選)。

當callerNumber爲NULL時,它工作,並且當callerNumber不爲NULL時,我有上述錯誤。

當我嘗試使用soapUI調用該服務時,即使使用callerNumber也可以工作。

的WSDL:

<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="RMDManagementService" targetNamespace="http://ws.mom.rmd.atos.net/ws"  xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.mom.rmd.atos.net/ws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
      <wsdl:types> 
     <xs:schema elementFormDefault="unqualified" targetNamespace="http://ws.mom.rmd.atos.net/ws" version="1.0" xmlns:tns="http://ws.mom.rmd.atos.net/ws" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 

     <xs:element name="createRelationCaRo" type="tns:createRelationCaRo" /> 
     <xs:element name="createRelationCaRoResponse" type="tns:createRelationCaRoResponse" /> 

     <xs:complexType name="createRelationCaRo"> 
     <xs:sequence> 
     <xs:element minOccurs="0" name="relationCaRo" type="tns:relationCaRo" /> 
     </xs:sequence> 
     </xs:complexType> 

     <xs:complexType name="relationCaRo"> 
     <xs:sequence> 
     <xs:element minOccurs="0" name="caName" type="xs:string" /> 
     <xs:element minOccurs="0" name="roName" type="xs:string" /> 
     <xs:element minOccurs="0" name="callerNumber" type="xs:string" /> 
     </xs:sequence> 
     </xs:complexType> 

     <xs:complexType name="createRelationCaRoResponse"> 
     <xs:sequence> 
     <xs:element minOccurs="0" name="return" type="tns:relationCaRoFeedback" /> 
     </xs:sequence> 
     </xs:complexType> 

     <xs:complexType name="relationCaRoFeedback"> 
     <xs:sequence> 
     <xs:element minOccurs="0" name="caName" type="xs:string" /> 
     <xs:element minOccurs="0" name="roName" type="xs:string" /> 
     <xs:element minOccurs="0" name="statusReturnCode" type="tns:statusReturnCodeEnum" /> 
     </xs:sequence> 
     </xs:complexType> 


     <xs:simpleType name="statusReturnCodeEnum"> 
     <xs:restriction base="xs:string"> 
     <xs:enumeration value="CDE_RMD000" /> 
     <xs:enumeration value="CDE_RMD001" /> 
     <xs:enumeration value="CDE_RMD300" /> 
     <xs:enumeration value="CDE_RMD303" /> 
     <xs:enumeration value="CDE_RMD304" /> 
     </xs:restriction> 
     </xs:simpleType> 

     </xs:schema> 
      </wsdl:types> 
      <wsdl:message name="createRelationCaRo"> 
      <wsdl:part element="tns:createRelationCaRo" name="parameters"> 
      </wsdl:part> 
      </wsdl:message> 
      <wsdl:message name="createRelationCaRoResponse"> 
      <wsdl:part element="tns:createRelationCaRoResponse" name="parameters"> 
      </wsdl:part> 
      </wsdl:message> 

      <wsdl:portType name="RMDManagement"> 
      <wsdl:operation name="createRelationCaRo"> 
       <wsdl:input message="tns:createRelationCaRo" name="createRelationCaRo"> 
      </wsdl:input> 
       <wsdl:output message="tns:createRelationCaRoResponse" name="createRelationCaRoResponse"> 
      </wsdl:output> 
      </wsdl:operation> 
      </wsdl:portType> 
      <wsdl:binding name="RMDManagementServiceSoapBinding" type="tns:RMDManagement"> 
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
      <wsdl:operation name="createRelationCaRo"> 
       <soap:operation soapAction="" style="document" /> 
       <wsdl:input name="createRelationCaRo"> 
       <soap:body use="literal" /> 
       </wsdl:input> 
       <wsdl:output name="createRelationCaRoResponse"> 
       <soap:body use="literal" /> 
       </wsdl:output> 
      </wsdl:operation> 
      </wsdl:binding> 
      <wsdl:service name="RMDManagementService"> 
      <wsdl:port binding="tns:RMDManagementServiceSoapBinding" name="RMDManagementSOAPPort"> 
       <soap:address location="http://...../RMDManagementService" /> 

      </wsdl:port> 
      </wsdl:service> 
     </wsdl:definitions> 

在客戶端,我產生的所有教學班的WSDL2Java。

我不明白這個問題,因爲只有3個字符串,沒有參數中的子元素。

謝謝您的幫助。

回答

0

你的wsdl總是很好。 請在這裏發佈你的代碼(消息上下文部分和soap信封創建也),我無法弄清楚你的問題。

+0

謝謝你的幫助。我把代碼放在這個地址上:http://www.4shared.com/folder/XAwiwIAx/_online.html – user2007861

+0

夥計,這個鏈接是什麼? :(請將代碼粘貼到這裏,它看起來像垃圾郵件網站,悲傷。 – kingAm

相關問題