묻고답하기

IIS의 웹서비스에 PHP로 통신을 해야 합니다.

IIS의 웹서비스를 개발한 회사에서 API를 줬는데...
GET,POST,SOAP 으로 통신이 가능합니다.
GET은 데이터 양때문에 사용못하구요...
POST로 구현을 했는데... 사정상 SOAP을 써야하는 상황이 생겨버렸네요... 우잉...

개발 환경은 제 PC에 IIS 와 웹서비스를 올렸구요.
APM 설치해서 8080 포트로 돌리고 있구요.
php에서 soap 관련 항목 enable 시켰습니다.

그들이 준 SOAP 에 관한 API는 딸랑... 아래와 같습니당... -_-

====================================================
POST /wcs/VICE.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://creo.com/webservices/vice/StreamingCreateOutputFile"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <StreamingCreateOutputFile xmlns="http://creo.com/webservices/vice">
      <Priority>Low or High</Priority>
      <SessionID>string</SessionID>
      <viceConfiguration>xml</viceConfiguration>
      <output_folder>string</output_folder>
      <output_name>string</output_name>
    </StreamingCreateOutputFile>
  </soap:Body>
</soap:Envelope>

====================================================

저는 Priority, SessionID, viceConfiguration, output_folder, output_name
을 적당한 값으로 전송해 줘야 하는데... 이 API를 보고 soap client를 어찌 만들어야 하는지 모르겠네요.

  $client = new SoapClient("http://localhost/wcs/VICE.asmx?WSDL",
                array("trace" => 1, "exceptions" => 0 ));

위에서 처럼 클라이언트를 만들었습니다.

그리고...

$Priority = "High";
$SessionID = "123456789";
$output_folder = "D:OUTPUT";
$viceConfiguration = "<?xml version='+ '+ '1.0' encoding='utf-8'?> 어쩌구 저쩌구...";
$output_name = "soaptest";

이렇게 변수 설정해서...

$soapstr =
"<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='+ 'http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
  <soap:Body>
    <StreamingCreateOutputFile xmlns='http://creo.com/webservices/vice'>
      <Priority>".$Priority."</Priority>
      <SessionID>".$SessionID."</SessionID>
      <viceConfiguration>".$viceConfiguration."</viceConfiguration>
      <output_folder>".$output_folder."</output_folder>
      <output_name>".$output_name."</output_name>
    </StreamingCreateOutputFile>
  </soap:Body>
</soap:Envelope>";

이렇게 API 비스무리하게 만들어서...

$detail = $client->StreamingCreateOutputFile($soapstr);

이렇게 웹서비스를 호출했거든요...
결과는... 에러... T_T

에러 메시지는 이렇게 나오네요...
    [message:protected] => System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object.
  at DarwinVICE.VICE.BeginStreamingCreateOutputFile(WorkItemPriority Priority, String SessionID, XmlNode viceConfiguration, String output_folder, String output_name, AsyncCallback cb, Object s)

API만 봐서는... AsyncCallback cb, Object s (이 2변수 뭔지도 모르겠군요... -_-)
위 변수 2개는 않보내도 될것 같은데...

API의 상단 4줄...
===============================================
POST /wcs/VICE.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://creo.com/webservices/vice/StreamingCreateOutputFile"
===============================================
이것들은 어쩌라는 건지 모르겠네요... -_-
SOAP 으로 통신하는것도 저런것들을 어딘가에 세팅해야 하나요?


이거 당췌 모르겠군요... 흠...
제발 도움 부탁드립니다~
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
oops 분류가 이게맞는지 모르겟네요..^^;;  
김홍석 노프레임을 나모로 작성중에 head.html에 문제가 있는데요 [1] 2007.08.10
김관석 select 박스에서 입체효과 없애기 [2] 2007.08.10
K.Y.W 홈페이지 메뉴버튼 만들 때 좋은 폰트 추천좀 해주세요! [4] 2007.08.10
채의수 음악감상실을 모뎀 사용자 들을라면 음질을...  
카ol 스크롤바를 오른쪽에서 왼쪽으로 옴기려면 어떻게해야해요??? [1] 2007.08.10
밥동자 IIS FTP 계정 추가 질문입니다.  
푸른솔 홈페이지만들기 [3] 2007.08.10
장기형 프레임을 나누어 쓸때 로그인이 적용이 되질 않습니다. [2] 2007.08.10
▒윤지니 모드설치후 warning오류  
stylebiz 페이지 내용을 암호화 시키는 자바스크립트가... [2] 2007.08.10
이영준 그라이데이션에 대한 질문입니다.  
송은지 링크된곳 클릭해서 새창띄우기 관련 질문; [1] 2007.08.10
김성국 ftp접속시 public_html 폴더로.. [3] 2007.08.10
박희찬 [엄청난!!]아악!! 미치겠다!! 미니돌요! [4] 2007.08.10
임현아 방명록에"글을 제대로 쓰시기 바랍니다"라는 문구만 뜹니다.. [2] 2007.08.10
심종희 게시판은 어떻게 다는거예요?  
김태우 글쓰기폼의 사이트링크에 음악경로 입력하면 배경음악 나오게... [2] 2007.08.10
최우재 IE 한영전환 안될때 [1] 2007.08.10
장호영 진자 초보적인 질문 시안에 관하여.. [1] 2007.08.10