2011-06-10 2 views
1

Windows WCF 서비스를 만들고 WSDL을 생성했습니다. 기본 http 바인딩을 사용하고 있습니다. 생성 된 basicHttpBinding wsdl2objc 클래스를 사용하여 IOS에서 호출하려고하면 WCF 메서드 중 하나를 호출 할 때 오류가 발생합니다. 오류 (logXMLInOut의)는 주소 불일치로 인한 문제라고 말하지만이 디버깅 방법과 내가 잘못하고있는 것에 대한 단서가 없습니다. 여기 주소 불일치가있는 WSDL2OBJC 문제


전체 오류 메시지입니다 :

2011-06-10 11:54:05.534 IpadWebServiceTest[10149:207] OutputHeaders: 
{ 
    "Content-Length" = 462; 
    "Content-Type" = "application/soap+xml; charset=utf-8"; 
    Host = "192.168.1.69"; 
    Soapaction = "FredIannon.TestService/IHelloIndigoService/FredContractNoParm"; 
    "User-Agent" = wsdl2objc; 
} 
2011-06-10 11:54:05.536 IpadWebServiceTest[10149:207] OutputBody: 
<?xml version="1.0"?> 
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:HelloIndigoService="FredIannon.TestService" xmlns:tns1="http://schemas.microsoft.com/2003/10/Serialization/" xsl:version="1.0"> 
    <soap:Body> 
    <HelloIndigoService:FredContractNoParm/> 
    </soap:Body> 
</soap:Envelope> 
2011-06-10 11:54:05.589 IpadWebServiceTest[10149:207] ResponseStatus: 500 
2011-06-10 11:54:05.590 IpadWebServiceTest[10149:207] ResponseHeaders: 
{ 
    "Content-Length" = 615; 
    "Content-Type" = "application/soap+xml; charset=utf-8"; 
    Date = "Fri, 10 Jun 2011 16:54:05 GMT"; 
    Server = "Microsoft-HTTPAPI/2.0"; 
} 
2011-06-10 11:54:05.591 IpadWebServiceTest[10149:207] ResponseBody: 
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>a:DestinationUnreachable</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.</s:Text></s:Reason></s:Fault></s:Body></s:Envelope> 
다음

는 호스트가 WCF 서비스가 비누를 수신

<services> 
     <service 
      behaviorConfiguration="serviceBehavior" 
       name="HelloIndigo.HelloIndigoService"> 

      <endpoint address="HelloIndigoService" 
         binding="basicHttpBinding" 
         bindingNamespace="FredIannon.TestService" 
         name="basicHttp" 
         contract="HelloIndigo.IHelloIndigoService" /> 

      <endpoint binding="mexHttpBinding" 
         name="mex" 
         contract="IMetadataExchange" /> 

      <host> 
       <baseAddresses> 
        <add baseAddress="http://192.168.1.69:8000/HelloIndigo/HelloIndigoService" /> 
<!--      <add baseAddress="http://localhost:8000/HelloIndigo/HelloIndigoService" /> --> 
       </baseAddresses> 
      </host> 
     </service> 
    </services> 

답변

2

의 app.config이지만 수 없습니다 wsdl2objc 프록시에 의해 생성 된 비누 헤더를 올바르게 구문 분석하십시오. 이 게시물의 내용은 good description of the actual problem입니다. 필요한 헤더가 무엇인지 확인하려면 먼저 서비스를 성공적으로 호출하는 .NET WCF 클라이언트를 만듭니다. 예상되는 헤더가 보내는 비누를 캡처하여 예상되는 헤더를 확인하십시오. 프록시 코드를 수정하여 정확한 비누 헤더를 .NET 클라이언트로 생성하십시오.