PHP nusoap 사용시, addComplexType에서 definition 질문드립니다.

mozo2009의 이미지

nusoap을 이용해서 soap 통신을 하려고 하는데요,
클라이언트에서 call 할때는 아래와 같이 하고있습니다 (수정 불가)

=========================================================
$ddd = array($id, $pw);
$parameter = array($aaa, $bbb, $ccc, $ddd);

// Call the SOAP method
$result = $client->call('hello',$parameter);

=========================================================
그리고 서버쪽에는..


$server->wsdl->addComplexType(
'noKey',
'complexType',
'struct',
'all',
'',
array(
'0'=>array( 'name'=> '0', 'type' => 'xsd:string'),
'1'=>array( 'name'=> '1', 'type' => 'xsd:string')
)
);

$server->register('hello', // method name
array(
'aaa' =>'xsd:string',
'bbb' =>'xsd:string',
'ccc' =>'xsd:string',
'ddd' =>'tns:noKey'
), // input parameters

array('return' => 'xsd:string'), // output parameters
'urn:Exwsdl', // namespace
false, // soapaction
'rpc', // style
'encoded', // use
'Greet a person entering the sweepstakes' // documentation
);

function hello($aaa, $bbb, $ccc, $ddd) {
return $aaa.", ".$bbb.", ".$ccc.", ".$ddd[0].", ".$ddd[1];
}

로 되어있는데요, 문제는 $ddd쪽이 파싱이 제대로 안되는 것 같아요.

Array
(
[faultcode] => SOAP-ENV:Client
[faultactor] =>
[faultstring] => error in msg parsing:
XML error parsing SOAP payload on line 1: XML_ERR_NAME_REQUIRED
[detail] =>
)

이런 에러가 뜨고..

예제 소스들을 보면 파라미터를 key=>value 형식으로 넘기고 있는데..
key값 없이 nested array가 들어간 파라미터를 어떻게 파싱할 수 있는지..;;

조언 부탁드립니다. 감사합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.