묻고답하기

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 남기남
saliey 모바일페이지 잘리는 현상 file  
히피♬ XE 주민번호 수집관련하여 - [1] 2013.07.23 by 도라미
태그맨 1.7.3.4 버전에서 상단메뉴,좌측메뉴는 어떻게 출력시키죠? [1] 2013.07.23 by CKEQ
EEMEEN 하루에 얻을 수 있는 일정 포인트를 설정하는 법좀알려주세요..  
llppll [도와주세요] 최근 이미지 표시 위젯 첨부 이미지 없어도 기본 이미지 표시 file  
오락실주인 동영상 아이콘표시 및 모바일 아이콘표시 file  
연시랑 전에 올렸던 질문 다시 재질문 드립니다ㅠ [1] 2013.07.23 by 킴똥똥
오락실주인 추천인 사용방법 가르켜주세여 ~ [1] 2013.07.23 by 킴똥똥
태그맨 익스프레스 엔진에 팝업모듈은 없습니까? [1] 2013.07.23 by 킴똥똥
Sojusoft xe 게시판의 내용을 json 형태로 가져오고 싶습니다.  
ttt22 여러번 업데이트 후 여러가지 오류문제들이 나타납니다 [1] 2013.07.23 by 똑디
아싸로또1등맞고싶어 게시판 익명과 닉네임 나오게 하는 방법을 알고싶습니다  
찌공이 게시판xe 모듈이 이상합니다.. 일주일 째 끙끙대고 있어요 도와주세요 [1] 2013.07.23 by 똑디
오락실주인 애드센스 재가입 질문 ㅠ [1] 2013.07.23 by 큰성565
ttt22 사이트맵에서 메뉴를 삭제했더니 원래 게시판도 모두 삭제되었습니다; [1] 2013.07.23 by 종스
본체 퍼미션이요.. 설치가 안됩니다. [3] file 2013.07.23 by 휘즈
아아이디 워드프레스 게시판을 포함시킬 수 있을까요?  
CoffeeMix 소셜로그인 버튼중에 페이스북 요즘 지우고싶어요. file  
bonui 위젯 페이지내 게시판(?) 설치 [1] file 2013.07.22 by CKEQ
궁금이@@? 인터넷 익스플로러 버젼에 따라 달라보이는 이유 [3] 2013.07.22 by :DunhillBoy