2013-01-11 6 views
1

Magento 1.7을 C# 응용 프로그램과 통합하려고합니다.Magento API는 wsdl.exe와 작동하지 않지만 SOAP UI로 작동합니다.

Visual Studio에서 "서비스 참조 추가"기능을 사용하려고하면 서비스 및 모든 작업이 발견되지만 확인을 클릭해도 아무 것도 생성되지 않습니다. 즉 Reference.cs 파일은 거의 비어 있습니다 (네임 스페이스가있는 한 줄만 있습니다).

나는 명령 프롬프트에서 프록시를 생성하기 위해 wsdl.exe를 사용하여 시도하고 나는 다음과 같은 오류 있어요 :

R2718: A wsdl:binding in a DESCRIPTION MUST have the same set of wsdl:operations as the wsdl:portType to which it refers. - Operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' has no matching binding.

For more details on the WS-I Basic Profile v1.1, see the specification at http://www.ws-i.org/Profiles/BasicProfile-1.1.html .

Error: Unable to import binding 'Mage_Api_Model_Server_Wsi_HandlerBinding' from namespace 'urn:Magento'. - The operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' had the following syntax error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section.

그때 같은 WSDL을로드 비누 UI를 사용하여 시도하고 그것을 잘 작동합니다. 프록시가 생성되어 아무런 문제없이 전화를 걸 수 있습니다.

원래 wsdl 파일의 내용은 다음과 같습니다. https://gist.github.com/4514723 예 : 6297 줄을 예제 URL로 바꿉니다.

그래서 비누 UI가 프록시를 생성하고 아무런 문제없이 전화를 걸 수 있었지만 Visual Studio는 할 수 없었습니다. 어떻게 해결할 수 있습니까?

enter image description here

+0

이것은 "herp/derp"입니다. .NET 및 WS- * 스타일 비누 서비스는 잘 이해하지 못하지만 Magento를 WS-I 준수 모드로 설정해 보았습니까? –

+0

@ AlanStorm 예, 원래 질문에서이 점을 언급해야합니다. WS-I 준수 모드가 꺼져 있었고 Soap UI에서는 작동하지 않습니다. 내가 가진 오류 메시지는''anyType @ urn : Magento '형식을 찾을 수 없습니다. anyType @ http : //schemas.xmlsoap.org/soap/encoding/ (soapEncoding.xsd에서)라는 요소를 참조한다는 것을 의미합니까?)? ""그렇다면 SOAP-UI 준수 모드가 적어도 SOAP UI는 작동하지만 .NET은 여전히 ​​작동하지 않습니다. – StarCub

답변

2

Generate a Web Service Client in WS-I compliance mode를 참조하십시오.

app\code\core\Mage\Catalog\etc\wsi.xml에서 WS-I 호환 WSDL 정의를 수정하려면 Magento 코드를 수정해야합니다.

SOAP UI는 다른 .NET/Java 툴링에 비해 WSDL의 실수에 더 관대합니다.

+0

감사하지만 magento 측에 액세스 할 수 없으면 어떻게 될까요? 내 편에서 할 수있는 일이 있습니까? – StarCub

+0

툴체인에 따라 애플리케이션과 함께 WSDL의 로컬 복사본을 다운로드하여 저장할 수 있습니다. 그런 다음 적절하게 수정하십시오 (링크 된 질문에 언급 된 XML을 삽입하거나 제거하십시오). –