第一
问题: 无法通过导入现有SOAP WSDL
添加新的API代理错误: 获取WSDL错误:无法下载资源。 peer未经过身份验证
我的观点: 我怀疑是由WSDL结构包含从另一个链接派生的导入XSD引起的。
<xsd:import namespace="http://XXX/message" schemaLocation="https://XXX:123/xxxservices/XxxWebService?xsd=1"/>
尝试修改我的WSDL,而不是使用从外部URL导入,我将整个XSD结构复制到WSDL中。它有效!
问题: 验证过程背后的问题是什么? f.y.i.我还将证书导入了我的Java信任库(cacerts)
第二
问题: 成功导入WSDL后,很少有元素/参数填充
我的WSDL的部分:
<xs:complexContent>
<xs:extension base="ns:UserDetailsRequest">
<xs:sequence>
<xs:extension base="ns:UserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
我的观点:
我发现Apigee没有填充密码和userID的参数,我怀疑这个问题是由实现XML扩展基础组件引起的
问题:
如何解决缺失的参数问题?
谢谢!
我的整个WSDL如下:
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/message" schemaLocation="https://www.xxx.com:123/docxservices/XyzWebService?xsd=1" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/" schemaLocation="https://www.xxx.com:123/docxservices/XyzWebService?xsd=2" />
</xsd:schema>
</types>
<message name="docUpload">
<part name="parameters" element="tns:docUpload" />
</message>
<message name="docUploadResponse">
<part name="parameters" element="tns:docUploadResponse" />
</message>
<portType name="XyzWebServicePortType">
<operation name="docUpload">
<input message="tns:docUpload" />
<output message="tns:docUploadResponse" />
</operation>
</portType>
<binding name="XyzWebServicePortTypePortBinding" type="tns:XyzWebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="docUpload">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="XyzWebService">
<port name="XyzWebServicePortTypePort" binding="tns:XyzWebServicePortTypePortBinding">
<soap:address location="https://www.xxx.com:123/docxservices/XyzWebService" />
</port>
</service>
</definitions>
第一次XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/message" xmlns:xns="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentResponseStatus">
<xs:sequence>
<xs:element name="errorDetailsMap">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:string"/>
<xs:element name="value" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="success" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentUploadRequest">
<xs:complexContent>
<xs:extension base="xns:DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="folderName" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DocumentUploadResponse">
<xs:complexContent>
<xs:extension base="xns:DocumentResponseStatus">
<xs:sequence>
<xs:element name="docNumber" type="xs:string" minOccurs="0"/>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
第二届XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/" xmlns:xns="http://webservice.docx.abc.com/" xmlns:ns1="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService.xsd"/>
<xs:element name="docUpload" type="xns:docUpload"/>
<xs:element name="docUploadResponse" type="xns:docUploadResponse"/>
<xs:complexType name="docUpload">
<xs:sequence>
<xs:element name="arg0" type="ns1:DocumentUploadRequest" minOccurs="0"/>
<xs:element name="arg1" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="docUploadResponse">
<xs:sequence>
<xs:element name="return" type="ns1:DocumentUploadResponse" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
答案 0 :(得分:0)
这不是答案 - 我只是在这里发帖,所以你可以阅读它。
您的原始导入对我来说很好,应支持。
我拿了你的文件,并给了他们有效的导入引用(它们仍然是引用和外部服务器),当我尝试它时一切正常,所以我将需要你原来的托管WSDL,XSD来更好地诊断问题。这可能吗?
文件内容:
WSDL
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService1.xsd" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/" schemaLocation="XyzWebService2.xsd" />
</xsd:schema>
</types>
<message name="docUpload">
<part name="parameters" element="tns:docUpload" />
</message>
<message name="docUploadResponse">
<part name="parameters" element="tns:docUploadResponse" />
</message>
<portType name="XyzWebServicePortType">
<operation name="docUpload">
<input message="tns:docUpload" />
<output message="tns:docUploadResponse" />
</operation>
</portType>
<binding name="XyzWebServicePortTypePortBinding" type="tns:XyzWebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="docUpload">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="XyzWebService">
<port name="XyzWebServicePortTypePort" binding="tns:XyzWebServicePortTypePortBinding">
<soap:address location="https://www.xxx.com:123/docxservices/XyzWebService" />
</port>
</service>
</definitions>
XyzWebService1.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/message" xmlns:xns="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentResponseStatus">
<xs:sequence>
<xs:element name="errorDetailsMap">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:string"/>
<xs:element name="value" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="success" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentUploadRequest">
<xs:complexContent>
<xs:extension base="xns:DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="folderName" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DocumentUploadResponse">
<xs:complexContent>
<xs:extension base="xns:DocumentResponseStatus">
<xs:sequence>
<xs:element name="docNumber" type="xs:string" minOccurs="0"/>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
XyzWebService2.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/" xmlns:xns="http://webservice.docx.abc.com/" xmlns:ns1="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService.xsd"/>
<xs:element name="docUpload" type="xns:docUpload"/>
<xs:element name="docUploadResponse" type="xns:docUploadResponse"/>
<xs:complexType name="docUpload">
<xs:sequence>
<xs:element name="arg0" type="ns1:DocumentUploadRequest" minOccurs="0"/>
<xs:element name="arg1" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="docUploadResponse">
<xs:sequence>
<xs:element name="return" type="ns1:DocumentUploadResponse" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
答案 1 :(得分:0)
虽然您的域名已经过编辑,但我注意到您的资源上有一个端口号:123:
https://www.xxx.com:123/docxservices/XyzWebService?xsd=1
假设Amazon AWS服务器需要可以访问所有资源,并且可能会阻止奇数端口。因此,如果您的https资源不在443上,则Apigee系统连接到它可能会出现问题。