2012-03-12 2 views
0

php 클라이언트와 AKAIK가있는 WCF 웹 서비스 (1.2)를 사용해야하므로 PHP는 기본적으로 wsHttpBinding 메서드 (true?)를 준수하지 않습니다. 내가 노력하고 내가 WSDL 파일을 사용하여 오류를 가지고 :php와 WCF WebServices 간의 상호 운용성을위한 제 3 자 해결 방법

"Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'https://vk3fend/..." 

을하고하지 않고 :

는 는 는 SOAP 1.2을 지원하지 않는 Nusoap 나를 도울 수

, 또 다른 해결 방법이 내가 할 수있다

"Fatal error: Uncaught SoapFault exception: [s:Sender] The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/...." 
WSO2 (너무 복잡하여 통합)와 별도로 사용합니까?

<?xml version="1.0" encoding="utf-8" ?> 
<wsdl:definitions name="myServerWs" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 
<wsp:Policy wsu:Id="WSHttpBinding_ImyServerWs_policy"> 
<wsp:ExactlyOne> 
<wsp:All> 
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 
<wsp:Policy> 
<sp:TransportToken> 
<wsp:Policy> 
    <sp:HttpsToken RequireClientCertificate="false" /> 
    </wsp:Policy> 
    </sp:TransportToken> 
<sp:AlgorithmSuite> 
<wsp:Policy> 
    <sp:Basic256 /> 
    </wsp:Policy> 
    </sp:AlgorithmSuite> 
<sp:Layout> 
<wsp:Policy> 
    <sp:Strict /> 
    </wsp:Policy> 
    </sp:Layout> 
    </wsp:Policy> 
    </sp:TransportBinding> 
    <wsaw:UsingAddressing /> 
    </wsp:All> 
    </wsp:ExactlyOne> 
    </wsp:Policy> 
<wsdl:types> 
<xsd:schema targetNamespace="http://tempuri.org/Imports"> 
    <xsd:import schemaLocation="https://host/myServerWs/myServerWs.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
    <xsd:import schemaLocation="https://host/myServerWs/myServerWs.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
    <xsd:import schemaLocation="https://host/myServerWs/myServerWs.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/myServer_WS" /> 
    <xsd:import schemaLocation="https://host/myServerWs/myServerWs.svc?xsd=xsd3" /> 
    </xsd:schema> 
    </wsdl:types> 
<wsdl:message name="ImyServerWs_ign_myFunction_InputMessage"> 
    <wsdl:part name="parameters" element="tns:ign_myFunction" /> 
    </wsdl:message> 
<wsdl:message name="ImyServerWs_ign_myFunction_OutputMessage"> 
    <wsdl:part name="parameters" element="tns:ign_myFunctionResponse" /> 
    </wsdl:message> 
<wsdl:portType name="ImyServerWs"> 
<wsdl:operation name="ign_myFunction"> 
    <wsdl:input wsaw:Action="http://tempuri.org/ImyServerWs/ign_myFunction" message="tns:ImyServerWs_ign_myFunction_InputMessage" /> 
    <wsdl:output wsaw:Action="http://tempuri.org/ImyServerWs/ign_myFunctionResponse" message="tns:ImyServerWs_ign_myFunction_OutputMessage" /> 
    </wsdl:operation> 
    </wsdl:portType> 
<wsdl:binding name="WSHttpBinding_ImyServerWs" type="tns:ImyServerWs"> 
    <wsp:PolicyReference URI="#WSHttpBinding_ImyServerWs_policy" /> 
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
<wsdl:operation name="ign_myFunction"> 
    <soap12:operation soapAction="http://tempuri.org/ImyServerWs/ign_myFunction" style="document" /> 
<wsdl:input> 
    <soap12:body use="literal" /> 
    </wsdl:input> 
<wsdl:output> 
    <soap12:body use="literal" /> 
    </wsdl:output> 
</wsdl:operation> 
    </wsdl:binding> 
<wsdl:service name="myServerWs"> 
<wsdl:port name="WSHttpBinding_ImyServerWs" binding="tns:WSHttpBinding_ImyServerWs"> 
    <soap12:address location="https://host/myServerWs/myServerWs.svc" /> 
<wsa10:EndpointReference> 
    <wsa10:Address>https://host/myServerWs/myServerWs.svc</wsa10:Address> 
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> 
    <Dns>localhost</Dns> 
    </Identity> 
    </wsa10:EndpointReference> 
    </wsdl:port> 
    </wsdl:service> 
    </wsdl:definitions> 
+0

WSF/PHP는 설명서와 지원이 부족하기 때문에 통합하기가 매우 어렵지만 WSF/PHP에서는 여전히 많은 것들이 가능합니다. 추가 조사를위한 코드를 제공 할 수 있습니까? WSDL 및 WS-SecurityPolicy 파일도 훌륭합니다. –

+0

WSDL 파일을 추가했지만 정책 파일이 없습니다. 내가 사용하는 PHP 버전은 귀하의 답장을 위해 5.3.9 – eugenio

답변

0

PHP는 1.1과 1.2 모두 작동 비누 클래스 내장되어 있습니다 : 어떤 조언

여기에 편집 에 대한

덕분에 WSDL 파일입니다. http://php.net/manual/en/class.soapclient.php

WSO 나 Nusoap만큼 포괄적으로 보이지는 않지만 작업이 완료 될 수 있습니다.

+0

주셔서 감사합니다. php soap 클래스는 wshttpbinding을 지원하지 않으며 소비해야하는 ws를 사용합니다. – eugenio

관련 문제