2010-08-09 3 views
6

PHP/SOAP 비누 헤더 질문이 있습니다.PHP 비누 헤더 도움말

내가 필요한 것은 다음과 같습니다.

<ns1:Identity token="123456789"></ns1:Identity> 

여기 soapui를 사용

$headers[] = new SoapHeader('http://qpricer.com/Services/Pricing','Identity',array('token'=> '123456789')); 
$client->__setSoapHeaders($headers); 

...이 코드를 사용

<ns1:Identity><item><key>token</key><value>123456789</value></item></ns1:Identity> 

... 내가 무엇을 얻을, 나는 여기이 오른쪽 아래로 내 문제를 좁혔다.

두 번째 것부터 첫 번째 것까지 어떻게 가야하나요?

도움을 주시면 감사하겠습니다. 시간을내어 감사드립니다.

답변

2

이렇게 설정해야하는 유일한 헤더이기 때문에 다음 코드를 사용하여 수정할 수있었습니다.

$headers[] = new SoapHeader('http://www.qpricer.com/Services/Pricing','Identity token="123456789"',null); 

이 다음과 같은 XML을

<ns1:Identity token="123456789"/> 

를 생산하고 일했다!