wsdl 스키마 네임 스페이스 지옥이 있습니다.복잡한 유형의 축 WSDL이 유효성을 검사합니다.
저는 Axis 웹 서비스에서 온 WSDL을 가지고 있으며 테스트 목적으로 WCF를 사용하여 스텁 서비스를 생성하려고합니다.
문제는 SVCUTIL 도구가 코드를 잘 생성하지만 호스팅 할 때 메서드가 노출되지 않습니다.
WSDL을 검사했는데 유효성 검사에 실패한 행이 있습니다. 그것이 범인인지 확인하려고 노력하고 있지만 네임 스페이스가 너무 복잡해서 머리 나 꼬리를 만들 수 없습니다.
그래서 WSDL은 대략적입니다. WSDL 바인딩, 서비스 및 포트를 생략했습니다. 네임 스페이스 문제를 이해하는 데 집중하고 싶습니다.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://p1-services.customer.com/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://returnobject.foo.bar.com/xsd"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns1="http://ws.receiver.foo.bar.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://p1-services.customer.com/">
<wsdl:documentation>WSP1IA01Service</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax22="http://returnobject.foo.bar.com/xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://returnobject.foo.bar.com/xsd">
<xs:complexType name="ReturnEnvelope">
<xs:sequence>
<!-- Simplified -->
<xs:element minOccurs="0" name="errorCode" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ns="http://ws.receiver.foo.bar.com" attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://ws.receiver.foo.bar.com">
<xs:element name="setMessage">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="xmlMessage" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="setMessageResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ns0:ReturnEnvelope"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
</wsdl:definitions>
유효성 검사에 실패한 비트는 SetMessageResponse 요소의 ns0 : ReturnEnvelope에 대한 참조입니다. 그 타입을 찾을 수 없다고합니다.
NS0 접두사를 가리키는 targetNamespace로 형식을 선언 한 이유를 이해할 수 없습니다.
아이디어가 있으십니까? 이러한 형식 선언은 매우 복잡해야합니까? 이 구조의 목적은 무엇
Aditionally는 :
<xs:schema xmlns:ax22="http://returnobject.foo.bar.com/xsd"
난 그 자식 요소의 추가 사용에 대한 접두사 "ax22"를 선언 읽었습니다. 그러나 그것은 사용되고 있지 않으며 NS0 네임 스페이스와 충돌합니다. 어떤 도움