[WebService] Message part {urn:dslforum-org:cwmp-1-1}Inform was not recognized

无双Rama 2012-03-22
拼一个完整无误的SOAP,然后发布服务,返回的SOAP里面报错

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-1">
	<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
		<cwmp:Inform>
			<DeviceId>
				<Manufacturer></Manufacturer>
				<OUI></OUI>
				<ProductClass></ProductClass>
				<SerialNumber>FAP0002011</SerialNumber>
			</DeviceId>
			<Event xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cwmp:EventStruct[1]">
				<EventStruct>
					<EventCode>1 BOOT</EventCode>
					<CommandKey></CommandKey>
				</EventStruct>
			</Event>
			<MaxEnvelopes>1</MaxEnvelopes>
			<CurrentTime>1970-01-01T00:53:53Z</CurrentTime>
			<RetryCount>0</RetryCount>
			<ParameterList xsi:type="SOAP-ENC:Array"
				SOAP-ENC:arrayType="cwmp:ParameterValueStruct[10]">
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.DeviceSummary</Name>
					<Value xsi:type="xsd:string">InternetGatewayDevice:1.1[](Baseline:1,Time:1,IPPing:1,TraceRoute:1,Download:1,DownloadTCP:1,Upload:1,UploadTCP:1),FAPService:1.0[1](Baseline:1,ACS:1,LocalIPAccess:1,REMWCDMAFDD:1,REMGSM:1,GPS:1,TransportSCTP:1,TransportRealTime:1,IPsecTunnel:1,UMTSBaseline:1,UMTSSelfConfig:1,UMTSSelfConfigNLInUseIntraFreqCell:1,UMTSSelfConfigNLInUseInterFreqCell:1,UMTSSelfConfigNLInUseInterRATCell:1,UMTSCellConfigBaseline:1,UMTSCellConfigAdvanced:1,UMTSCellConfigFreqMeasurement:1,UMTSCellConfigFreqMeasurement:1,UMTSCellConfigNLIntraFreqCell:1,UMTSCellConfigNLInterFreqCell:1,UMTSCellConfigNLInterRATCell:1,FaultMgmtSupportedAlarms:1,FaultMgmtActive:1,FaultMgmtHistory:1,FaultMgmtExpedited:1,FaultMgmtQueued:1,PerfMgmt:1)
					</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
					<Value xsi:type="xsd:string"></Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
					<Value xsi:type="xsd:string">PC7302</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
					<Value xsi:type="xsd:string">1.1</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
					<Value xsi:type="xsd:string"></Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL
					</Name>
					<Value xsi:type="xsd:string">http://192.168.1.184:7547/FAP0002011</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>
					<Value xsi:type="xsd:string"></Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress
					</Name>
					<Value xsi:type="xsd:string">192.168.1.184</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.Services.FAPService.1.FAPControl.OpState
					</Name>
					<Value xsi:type="xsd:boolean">0</Value>
				</ParameterValueStruct>
				<ParameterValueStruct>
					<Name>InternetGatewayDevice.Services.FAPService.1.FAPControl.RFTxStatus
					</Name>
					<Value xsi:type="xsd:boolean">0</Value>
				</ParameterValueStruct>
			</ParameterList>
		</cwmp:Inform>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


返回的:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<soap:Fault>
			<faultcode>
				soap:Client
			</faultcode>
			<faultstring>
				Message part {urn:dslforum-org:cwmp-1-1}Inform was not recognized.  (Does it exist in service WSDL?)
			</faultstring>
		</soap:Fault>
	</soap:Body>
</soap:Envelope>



控制台报异常:
警告: Interceptor for {http://impl.initate.webservice.com/}InformServiceImplService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Message part {urn:dslforum-org:cwmp-1-1}Inform was not recognized.  (Does it exist in service WSDL?)

请各位大大指点
无双Rama 2012-03-22
我是用CXF代码优先的方式发布服务的, 不明白的一点是 
xmlns:cwmp="urn:dslforum-org:cwmp-1-1" 要怎么在代码中定义?
yzh2158 2014-11-03
我也遇到了。用cxf发布的webService 然后用soap调用接口的方式。最后
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Message part {http://server.why.com/}printContext was not recognized. (Does it exist in service WSDL?)</faultstring>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
你有解决方法么?我需要下载附件的。
Global site tag (gtag.js) - Google Analytics