ãsoap4rã§SOAPã¯ã©ã¤ã¢ã³ãï¼WSDLãã¡ã¤ã«ããã¼ã«ã«ã«é ç½®
RoRããSOAPã使ãã¨ãããã¨ã§soap4rãã試ãã
è¦å´ããã®ãWSDL(SOAP)ãã©ã¤ããçæããã¨ããã§ããµã³ãã«ãã¿ãã¨ãWSDLã®URLãæå®ããã¨ãªã£ã¦ããã
wsdl = 'http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.1/' raa = SOAP::WSDLDriverFactory.new(wsdl).createDriver
ã¨ããããä»å使ãWebAPIã§ã¯ãè¤æ°ç¨¼åãã¦ãããµã¼ãã«å¯¾ãã¦ï¼ã¤ã®WSDLã§å¯¾å¿ãããã
soap:address locationãå¤æ°åã«ãªã£ã¦ãã¦ããããæ¸ãæããå¿
è¦ãããã
ãâ
ãªã®ã§ãäºåã«WSDLããã¼ã«ã«ã«DLãã¦ãã¨ãã£ã¿ã§æ¸ãæããè¡ã£ããã®ã使ãããããæå®ããæ¹æ³ã«ã¦ããã£ããã
çµæçã«ã¯ããã¡ã¤ã«ã®ãã¹ãURLã®ä»£ããã«å¼æ°ã¨ãã¦æ¸¡ãã°OKã ã£ãã
wsdlpath = File.join(RubricksLib::COMPONENT_DIR,"my_component","ws_api.wsdl") soapdriver = SOAP::WSDLDriverFactory.new(wsdlpath).createDriver
èªåã®ã³ã³ãã¼ãã³ãç´ä¸ã«WSDLãã¡ã¤ã«ãé ç½®ãã¦ãããã§ãããã®ã³ã³ãã¼ãã³ãã®ãã¹ãRubricksLib::COMPONENT_DIRã¨ããã®ãæ´»ç¨ãã¦åå¾ãã¦ããã(æåã¯"./ws_api.wsdl"ã¨ãåè¦å «è¦ãRubricksæ§æ§)