그래서 나는 PELVG02.wsdl라는 이름의 WSDL 파일에 정의되어 <soap:address location="http://212.205.47.226:9003"/>
PHP를 통해 비누를 사용하려고하면 "호스트에 연결할 수 없습니다"오류가 반환됩니다. SoapUi를 사용하는 동일한 wsdl 파일이 정상적으로 작동합니다. 내가 뭘 놓치고 있니?
에서 특정 응답을 얻기 위해 PHP에서 사용하는 WSDL 파일을 가지고있다. 그 내용은 다음과 같습니다.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<definitions name="PELVG02" targetNamespace="/PELVG02" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="/PELVG02" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Micro Focus NetExpress generated WSDL document-->
<types>
<schema elementFormDefault="qualified" targetNamespace="/PELVG02" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="/PELVG02">
<element name="READ">
<complexType>
<sequence>
<element name="pel_user_code" type="string"/>
<element name="pel_user_pass" type="string"/>
<element name="pel_apost_code" type="string"/>
<element name="pel_paral_name" type="string"/>
<element name="pel_paral_address" type="string"/>
<element name="pel_paral_area" type="string"/>
<element name="pel_paral_tk" type="string"/>
<element name="pel_paral_thl_1" type="string"/>
<element name="pel_paral_thl_2" type="string"/>
<element name="pel_service" type="string"/>
<element name="pel_baros" type="string"/>
<element name="pel_temaxia" type="string"/>
<element name="pel_paral_sxolia" type="string"/>
<element name="pel_sur_1" type="string"/>
<element name="pel_sur_2" type="string"/>
<element name="pel_sur_3" type="string"/>
<element name="pel_ant_poso" type="string"/>
<element name="pel_ant_poso1" type="string"/>
<element name="pel_ant_poso2" type="string"/>
<element name="pel_ant_poso3" type="string"/>
<element name="pel_ant_poso4" type="string"/>
<element name="pel_ant_date1" type="string"/>
<element name="pel_ant_date2" type="string"/>
<element name="pel_ant_date3" type="string"/>
<element name="pel_ant_date4" type="string"/>
<element name="pel_asf_poso" type="string"/>
<element name="pel_ref_no" type="string"/>
</sequence>
</complexType>
</element>
<element name="READResponse">
<complexType>
<sequence>
<element name="st_flag" type="integer"/>
<element name="st_title" type="string"/>
<element name="vg_code" type="string"/>
<element name="return_vg" type="string"/>
<element name="epitagh_vg" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="READInput">
<part element="tns:READ" name="parameters"/>
</message>
<message name="READOutput">
<part element="tns:READResponse" name="parameters"/>
</message>
<portType name="PELVG02">
<operation name="READ">
<input message="tns:READInput"/>
<output message="tns:READOutput"/>
</operation>
</portType>
<binding name="PELVG02" type="tns:PELVG02">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="READ">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="PELVG02">
<port binding="tns:PELVG02" name="PELVG02">
<documentation>
<wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0"/>
</documentation>
<soap:address location="http://212.205.47.226:9003"/>
</port>
</service>
</definitions>
SoapUI에 입력하면 그 파일은 정상적으로 작동합니다. 데이터를 보내고받을 수 있습니다. 내가 PHP를 사용하여 동일한 작업을 수행하려고하면 "호스트에 연결할 수 없습니다"오류가 발생합니다.
<?php
//Create the client object
try
{
$soapclient = new SoapClient('./PELVG02.wsdl');
//Use the functions of the client, the params of the function are in
//the associative array
$pel = array('pel_user_code' => '9999999', 'pel_user_pass' => '9999999', 'pel_apost_code' => '999999999', 'pel_paral_name' => 'DOKIMI', 'pel_paral_address' => 'DOKIMI 13', 'pel_paral_area' => 'THESSALONIKI', 'pel_paral_tk' => '54646', 'pel_paral_thl_1' => '6973262626', 'pel_paral_thl_2' => '', 'pel_service' => '', 'pel_baros' => '12.50', 'pel_temaxia' => '', 'pel_paral_sxolia' => 'DOKIMI SXOLIA', 'pel_sur_1' => '', 'pel_sur_2' => '', 'pel_sur_3' => '', 'pel_ant_poso' => '', 'pel_ant_poso1' => '', 'pel_ant_poso2' => '', 'pel_ant_poso3' => '', 'pel_ant_poso4' => '', 'pel_ant_date1' => '', 'pel_ant_date2' => '', 'pel_ant_date3' => '', 'pel_ant_date4' => '', 'pel_asf_poso' => '', 'pel_ref_no' => '');
$response = $soapclient->READ($pel);
var_dump($response);
}
catch(SoapFault $e)
{
var_dump($e);
}
?>
내가 숫자와 문자의 조합을 포함하는 $ 응답 변수에 간단한 응답을 받아야한다 : 여기
은 샘플이 오류가 발생 PHP입니다.<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns0:READResponse xmlns:ns0="/PELVG02">
<ns0:st_flag>0</ns0:st_flag>
<ns0:st_title/>
<ns0:vg_code>NZ000034401GR</ns0:vg_code>
<ns0:return_vg/>
<ns0:epitagh_vg/>
</ns0:READResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
는 내가 PHP를 작동시킬 수없는 이유 나를 알아내는 데 도움이 시겠어요 : 여기
내가 XML에 soapUI 프로그램에서 얻을 응답이 샘플을 가지고있다? 나는 거기에서 무엇을 놓치고 있습니까?고지.
편집 : 당신은 결과를 얻을 수 및 확인 sourceui에서 다음 데이터를 공급할 수있는 내가 작품 위에 붙여 넣은 PELVG02.wsdl 파일 :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pel="/PELVG02">
<soapenv:Header/>
<soapenv:Body>
<pel:READ>
<pel:pel_user_code>9999999</pel:pel_user_code>
<pel:pel_user_pass>9999999</pel:pel_user_pass>
<pel:pel_apost_code>999999999</pel:pel_apost_code>
<pel:pel_paral_name>DOKIMI</pel:pel_paral_name>
<pel:pel_paral_address>DOKIMI 13</pel:pel_paral_address>
<pel:pel_paral_area>THESSALONIKI</pel:pel_paral_area>
<pel:pel_paral_tk>54646</pel:pel_paral_tk>
<pel:pel_paral_thl_1>6973206899</pel:pel_paral_thl_1>
<pel:pel_paral_thl_2></pel:pel_paral_thl_2>
<pel:pel_service></pel:pel_service>
<pel:pel_baros>12.50</pel:pel_baros>
<pel:pel_temaxia>1</pel:pel_temaxia>
<pel:pel_paral_sxolia>DOKIMI SXOLIA</pel:pel_paral_sxolia>
<pel:pel_sur_1></pel:pel_sur_1>
<pel:pel_sur_2></pel:pel_sur_2>
<pel:pel_sur_3></pel:pel_sur_3>
<pel:pel_ant_poso></pel:pel_ant_poso>
<pel:pel_ant_poso1></pel:pel_ant_poso1>
<pel:pel_ant_poso2></pel:pel_ant_poso2>
<pel:pel_ant_poso3></pel:pel_ant_poso3>
<pel:pel_ant_poso4></pel:pel_ant_poso4>
<pel:pel_ant_date1></pel:pel_ant_date1>
<pel:pel_ant_date2></pel:pel_ant_date2>
<pel:pel_ant_date3></pel:pel_ant_date3>
<pel:pel_ant_date4></pel:pel_ant_date4>
<pel:pel_asf_poso></pel:pel_asf_poso>
<pel:pel_ref_no></pel:pel_ref_no>
</pel:READ>
</soapenv:Body>
</soapenv:Envelope>
편집 : 나는 내 PC에 MAMP를 설치하고이 보인다 PHP 코드는 MAMP 또는 XAMPP를 통해 작동합니다.
그런 다음 나를 때렸다! 방화벽 ... 나가는 연결을 허용했습니다 tcp|out|d=9003|d=212.205.47.226
csf.allow에서 soap 기능이 작동했습니다. 나는 우리가 그 문제를 해결할 수 있다고 생각한다. D