wsdl 相关问题

Web服务描述语言(WSDL)是一种基于XML的人类和机器可读语言,用于描述Web服务。它描述了可用的Web服务方法,消息请求和响应结构,可能的故障以及通信和安全要求。此标记不引用任何名为“wsdl”的工具,例如Microsoft的WSDL.EXE。

java.lang.ClassNotFoundException:com.sun.org.apache.xml.internal.resolver.CatalogManager Java 11

我有一个 JavaFX 应用程序,正在从 Java 8 迁移到 Java 11。 这是一个艰难的过渡,但除了 Web 服务之外,大多数应用程序都在运行。它不断给我以下内容

回答 6 投票 0

迁移到 jaxb3/java21 后,获取元素“jxb:bindings”的前缀“jxb”未绑定异常

将服务迁移到 java21 和 jaxb3.0 时,从 wsdl 生成 xjb 文件的类会给出 'org.xml.sax.SAXParseException; XXX 元素“jxb:bindi...”的前缀“jxb”

回答 1 投票 0

如何使用 (WSSE) WS-security 制作 WSDL 文件

我需要让 SoapUI 从 WSDL 文件生成以下(预期)xml 请求(注意 wsu + wsse 标识符 + PasswordText) 我需要让 SoapUI 从 WSDL 文件生成以下(预期)xml 请求(注意 wsu + wsse 标识符 + PasswordText) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ftf="http://mycompany.com"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>?</wsse:Username> <wsse:Password Type="?">mypassword</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ftf:DsOfferedRateDeleteReq> <!--Optional:--> <ftf:OfferedRateID>?</ftf:OfferedRateID> </ftf:DsOfferedRateDeleteReq> </soapenv:Body> </soapenv:Envelope> 目前我只能这么做: (see my answer below, because stackoverflow didn't let me post so much code...) 您对如何完成 wsdl 以便形成预期的响应有什么想法吗? 当前 wsdl <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sup="http://mycompany.com" xmlns:req="http://mycompany.com/type/request"> <soapenv:Header> <sup:Security> <UsernameToken> <Username>?</Username> <Password>?</Password> </UsernameToken> </sup:Security> </soapenv:Header> <soapenv:Body> <req:DsOfferedRateDeleteReq> <!--Optional:--> <req:OfferedRateID>?</req:OfferedRateID> </req:DsOfferedRateDeleteReq> </soapenv:Body> </soapenv:Envelope> 我当前的wsdl <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsse="http://support.mycompany.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://support.mycompany.com" xmlns:ftf="http://service.mycompany.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:request="http://support.mycompany.com/type/request" xmlns:response="http://support.mycompany.com/type/response" targetNamespace="http://support.mycompany.com" name="FTFWS"> <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" soapenv:mustUnderstand="1" targetNamespace="http://support.mycompany.com"> <xsd:complexType name="SecurityHeader"> <xsd:sequence> <xsd:element name="UsernameToken"> <xsd:complexType> <xsd:sequence> <xsd:element name="Username" type="xsd:string"/> <xsd:element name="Password" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="Security" type="wsse:SecurityHeader"/> </xsd:schema> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://support.mycompany.com" targetNamespace="http://support.mycompany.com" elementFormDefault="qualified"> <complexType name="ContextData"> <sequence> <element type="xsd:string" name="fromSystem" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="toSystem" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="sessionId" minOccurs="0" maxOccurs="1" /> <element type="xsd:long" name="processId" minOccurs="0" maxOccurs="1" /> <element type="xsd:language" name="locale" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:ContextData" name="ContextData" /> <complexType name="OperationFault"> <sequence> <element type="xsd:string" name="faultCode" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="faultMessage" minOccurs="1" maxOccurs="1" /> </sequence> </complexType> <element type="tns:OperationFault" name="OperationFault" /> <complexType name="DSCALLFAULT"> <sequence> <element type="xsd:int" name="faultcode" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="faultmessage" minOccurs="1" maxOccurs="1" /> </sequence> </complexType> <element type="tns:DSCALLFAULT" name="DSCALLFAULT" /> <complexType name="DSCALLRESPONSE"> <sequence> <element type="xsd:string" name="commandresult" minOccurs="1" maxOccurs="1" /> </sequence> </complexType> <element type="tns:DSCALLRESPONSE" name="DSCALLRESPONSE" /> <complexType name="DSCALL"> <sequence> <element type="xsd:string" name="commandtext" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="commanddata" minOccurs="1" maxOccurs="1" /> <element type="tns:ContextData" name="contextdata" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:DSCALL" name="DSCALL" /> <complexType name="DSCALLASYNC"> <sequence> <element type="xsd:string" name="commandtext" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="commanddata" minOccurs="1" maxOccurs="1" /> <element type="tns:ContextData" name="contextdata" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:DSCALLASYNC" name="DSCALLASYNC" /> <complexType name="Admmoduleinfo"> <sequence> <element type="tns:ContextData" name="ContextData" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:Admmoduleinfo" name="Admmoduleinfo" /> <complexType name="AdmmoduleinfoRes"> <sequence> <element type="xsd:string" name="PACKAGESYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="PACKAGENAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="PACKAGEVERSION" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="EXTINTEGRATION" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="PACKAGESTATUS" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="PACKAGEMONITOR" minOccurs="1" maxOccurs="1" /> <element type="tns:Right" name="PACKAGERIGHTS" minOccurs="1" maxOccurs="unbounded" /> <element type="tns:Group" name="PACKAGEGROUPS" minOccurs="1" maxOccurs="unbounded" /> <element type="tns:Role" name="PACKAGEROLES" minOccurs="1" maxOccurs="unbounded" /> <element type="tns:PackageDescription" name="PACKAGEDESCRIPTION" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:AdmmoduleinfoRes" name="AdmmoduleinfoRes" /> <complexType name="RoleRightFilter"> <sequence> <element type="xsd:string" name="SYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OPERATION" minOccurs="1" maxOccurs="1" /> <element type="xsd:anyType" name="VALUES" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:RoleRightFilter" name="RoleRightFilter" /> <complexType name="RoleRight"> <sequence> <element type="xsd:string" name="RIGHTSYSNAME" minOccurs="1" maxOccurs="1" /> <element type="tns:RoleRightFilter" name="FILTERS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:RoleRight" name="RoleRight" /> <complexType name="Role"> <sequence> <element type="xsd:string" name="ROLESYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="ROLENAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="DESCRIPTION" minOccurs="0" maxOccurs="1" /> <element type="tns:RoleRight" name="RIGHTS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:Role" name="Role" /> <complexType name="RightFilter"> <sequence> <element type="xsd:string" name="SYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OPERATION" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="DATASOURCEURL" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:RightFilter" name="RightFilter" /> <complexType name="Right"> <sequence> <element type="xsd:string" name="RIGHTSYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="RIGHTNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="RIGHTPARENT" minOccurs="0" maxOccurs="1" /> <element type="tns:RightFilter" name="FILTERS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:Right" name="Right" /> <complexType name="GroupRightFilter"> <sequence> <element type="xsd:string" name="SYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OPERATION" minOccurs="0" maxOccurs="1" /> <element type="xsd:anyType" name="VALUES" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:GroupRightFilter" name="GroupRightFilter" /> <complexType name="GroupRight"> <sequence> <element type="xsd:string" name="RIGHTSYSNAME" minOccurs="1" maxOccurs="1" /> <element type="tns:GroupRightFilter" name="FILTERS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:GroupRight" name="GroupRight" /> <complexType name="Group"> <sequence> <element type="xsd:string" name="GROUPNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="DESCRIPTION" minOccurs="1" maxOccurs="1" /> <element type="tns:Group" name="GROUPS" minOccurs="0" maxOccurs="unbounded" /> <element type="tns:Right" name="RIGHTS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:Group" name="Group" /> <complexType name="Service"> <sequence> <element type="xsd:string" name="SVCALIAS" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="SVCDESC" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:Service" name="Service" /> <complexType name="Module"> <sequence> <element type="xsd:string" name="MODULENAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="MODULEDESC" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:Module" name="Module" /> <complexType name="ServiceMethod"> <sequence> <element type="xsd:string" name="METHODNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="METHODDESC" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="FINDER" minOccurs="0" maxOccurs="1" /> <element type="tns:Parameter" name="METHODPARAMSIN" minOccurs="0" maxOccurs="unbounded" /> <element type="tns:Parameter" name="METHODPARAMSOUT" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:ServiceMethod" name="ServiceMethod" /> <complexType name="Parameter"> <sequence> <element type="xsd:string" name="ATTRNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="ATTRDESC" minOccurs="0" maxOccurs="1" /> <element type="tns:Parameter" name="ATTRCHILD" minOccurs="0" maxOccurs="unbounded" /> <element type="xsd:string" name="ATTRTYPE" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="REQUIRED" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:Parameter" name="Parameter" /> <complexType name="ObjOperation"> <sequence> <element type="xsd:string" name="OPERNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OPERDESC" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="OPERSMETHOD" minOccurs="1" maxOccurs="1" /> </sequence> </complexType> <element type="tns:ObjOperation" name="ObjOperation" /> <complexType name="BObject"> <sequence> <element type="xsd:string" name="OBJSYSNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OBJNAME" minOccurs="1" maxOccurs="1" /> <element type="xsd:string" name="OBJNAMELAT" minOccurs="0" maxOccurs="1" /> <element type="xsd:string" name="OBJDESC" minOccurs="0" maxOccurs="1" /> <element type="xsd:boolean" name="SUPPORTSCLS" minOccurs="0" maxOccurs="1" /> <element type="xsd:boolean" name="SUPPORTSVER" minOccurs="0" maxOccurs="1" /> <element type="xsd:boolean" name="SUPPORTSSTM" minOccurs="0" maxOccurs="1" /> <element type="xsd:boolean" name="SUPPORTSADAT" minOccurs="0" maxOccurs="1" /> <element type="tns:ObjOperation" name="OBJOPERATIONS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:BObject" name="BObject" /> <complexType name="PackageDescription"> <sequence> <element type="tns:Module" name="BMODULE" minOccurs="0" maxOccurs="unbounded" /> <element type="tns:Service" name="SERVICE" minOccurs="0" maxOccurs="unbounded" /> <element type="tns:ServiceMethod" name="SERVICEMETHODS" minOccurs="0" maxOccurs="unbounded" /> <element type="tns:BObject" name="BOBJECTS" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:PackageDescription" name="PackageDescription" /> <complexType name="GetVersion"> <sequence> <element type="tns:ContextData" name="ContextData" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:GetVersion" name="GetVersion" /> <complexType name="GetVersionRes"> <sequence> <element type="xsd:string" name="Project-Version" minOccurs="1" maxOccurs="1" /> </sequence> </complexType> <element type="tns:GetVersionRes" name="GetVersionRes" /> <complexType name="GetHealthInfo"> <sequence> <element type="tns:ContextData" name="ContextData" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:GetHealthInfo" name="GetHealthInfo" /> <complexType name="GetHealthInfoRes"> <sequence> <element type="tns:HealthInfoElement" name="Result" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <element type="tns:GetHealthInfoRes" name="GetHealthInfoRes" /> <complexType name="HealthInfoElement"> <sequence> <element type="xsd:string" name="key" minOccurs="0" maxOccurs="1" /> <element type="xsd:int" name="value" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <element type="tns:HealthInfoElement" name="HealthInfoElement" /> </xsd:schema> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:type="http://support.mycompany.com/type" targetNamespace="http://support.mycompany.com/type" elementFormDefault="qualified"> </xsd:schema> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:request="http://support.mycompany.com/type/request" xmlns:type="http://support.mycompany.com/type" targetNamespace="http://support.mycompany.com/type/request" elementFormDefault="qualified"> <complexType name="DsOfferedRateDeleteReq"> <sequence> <element type="xsd:long" name="OfferedRateID" minOccurs="0" maxOccurs="1"/> </sequence> </complexType> <element type="request:DsOfferedRateDeleteReq" name="DsOfferedRateDeleteReq"/> </xsd:schema> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:response="http://support.mycompany.com/type/response" xmlns:type="http://support.mycompany.com/type" targetNamespace="http://support.mycompany.com/type/response" elementFormDefault="qualified"> <complexType name="DsOfferedRateDeleteRes"> <sequence> <element type="xsd:string" name="Status" minOccurs="0" maxOccurs="1"/> <element type="xsd:string" name="ReturnMsg" minOccurs="0" maxOccurs="1"/> <element type="xsd:long" name="ReturnCode" minOccurs="0" maxOccurs="1"/> </sequence> </complexType> <element type="response:DsOfferedRateDeleteRes" name="DsOfferedRateDeleteRes"/> </xsd:schema> </types> <message name="SecurityHeader"> <part name="Security" element="wsse:Security"/> </message> <message name="fault"> <part name="fault" element="tns:OperationFault"/> </message> <message name="DSCALLFAULT"> <part name="DSCALLFAULT" element="tns:DSCALLFAULT"/> </message> <message name="DSCALL"> <part name="request" element="tns:DSCALL"/> </message> <message name="DSCALLRESPONSE"> <part name="commandresult" element="tns:DSCALLRESPONSE"/> </message> <message name="DSCALLASYNC"> <part name="request" element="tns:DSCALLASYNC"/> </message> <message name="Admmoduleinfo"> <part name="request" element="tns:Admmoduleinfo"/> </message> <message name="AdmmoduleinfoRes"> <part name="response" element="tns:AdmmoduleinfoRes"/> </message> <message name="GetVersion"> <part name="request" element="tns:GetVersion"/> </message> <message name="GetVersionRes"> <part name="response" element="tns:GetVersionRes"/> </message> <message name="GetHealthInfo"> <part name="request" element="tns:GetHealthInfo"/> </message> <message name="GetHealthInfoRes"> <part name="response" element="tns:GetHealthInfoRes"/> </message> <message name="DsOfferedRateDeleteReq"> <part name="request" element="request:DsOfferedRateDeleteReq"/> </message> <message name="DsOfferedRateDeleteRes"> <part name="response" element="response:DsOfferedRateDeleteRes"/> </message> <portType name="FTFWSPORTTYPE"> <operation name="DSCALL"> <input message="tns:DSCALL" /> <output message="tns:DSCALLRESPONSE" /> <fault name="DSCALLFAULT" message="tns:DSCALLFAULT" /> </operation> <operation name="DSCALLASYNC"> <input message="tns:DSCALLASYNC" /> </operation> <operation name="admModuleInfo"> <input message="tns:Admmoduleinfo" /> <output message="tns:AdmmoduleinfoRes" /> <fault name="fault" message="tns:fault" /> </operation> <operation name="getversion"> <input message="tns:GetVersion" /> <output message="tns:GetVersionRes" /> <fault name="fault" message="tns:fault" /> </operation> <operation name="getHealthInfo"> <input message="tns:GetHealthInfo" /> <output message="tns:GetHealthInfoRes" /> <fault name="fault" message="tns:fault" /> </operation> <operation name="dsOfferedRateDelete"> <input message="tns:DsOfferedRateDeleteReq"/> <output message="tns:DsOfferedRateDeleteRes"/> <fault name="fault" message="tns:fault"/> </operation> </portType> <binding type="tns:FTFWSPORTTYPE" name="FTFWSBINDING"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="DSCALL"> <soap:operation soapAction="http://support.mycompany.com/DSCALL" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="DSCALLFAULT"> <soap:fault use="literal" name="DSCALLFAULT" /> </fault> </operation> <operation name="DSCALLASYNC"> <soap:operation soapAction="http://support.mycompany.com/DSCALLASYNC" /> <input> <soap:body use="literal" /> </input> </operation> <operation name="admModuleInfo"> <soap:operation soapAction="http://support.mycompany.com/admModuleInfo" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="fault"> <soap:fault use="literal" name="fault" /> </fault> </operation> <operation name="getversion"> <soap:operation soapAction="http://support.mycompany.com/getversion" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="fault"> <soap:fault use="literal" name="fault" /> </fault> </operation> <operation name="getHealthInfo"> <soap:operation soapAction="http://support.mycompany.com/getHealthInfo" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="fault"> <soap:fault use="literal" name="fault" /> </fault> </operation> <operation name="dsOfferedRateDelete"> <soap:operation soapAction="http://support.mycompany.com/dsOfferedRateDelete" /> <input> <soap:header message="wsse:SecurityHeader" part="Security" use="literal"/> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="fault"> <soap:fault use="literal" name="fault" /> </fault> </operation> </binding> <service name="FTFWSSERVICE"> <port binding="tns:FTFWSBINDING" name="FTFWSPORT"> <soap:address location="FTFWS" /> </port> </service> </definitions>

回答 1 投票 0

将 Swagger 转换为 WSDL

目标是创建一个可靠的流程或工具,可以将定义 REST API 的 Swagger 文件转换为适合 SOAP 服务的 WSDL 文件。此转换对于确保

回答 1 投票 0

apache cxf-codegen-plugin wsdl2java 相对 wsdlLocation

当我指定每个文件时,我可以使用带有相对 wsdlLocation 的生成类,例如 ${basedir}/src/main/resources/sample....

回答 2 投票 0

SoapClient 到 nusoap,服务器无法识别 HTTP 标头 SOAPAction 的值

我们正在运行 PHP 5.3.18,由于一些奇怪的原因我无法安装 php-soap,因此我无法使用 SoapClient 类... 我现在使用的是最后一个 nusoap (应该与 php 5.3.18 兼容)和

回答 2 投票 0

尝试从 WSDL 文件生成时出现 Maven 问题

我尝试从 wsdl 文件生成源代码,但我在 pom.xml 上不断遇到错误,我认为这可能是我的问题?以下是我从 pom 和 pom 文件中得到的错误。我也...

回答 9 投票 0

npm soap(https://www.npmjs.com/package/soap) 包 - 尝试访问本地 wsdl 文件

我正在尝试使用此节点soap库来使用本地wsdl文件创建soap客户端。我尝试了很多方法,但仍然无法创建 SOAP 客户端并进行 SOAP API 调用。 有人可以吗...

回答 1 投票 0

soap xml 响应 xsi:类型值已更改

我们的tomcat webservice响应是soap xml格式。 xsi:type 从 xsi:type="ax235:SearchOutput"> 更改为 xsi:type="ax239:SearchOutput"> 有一天突然。 ns 返回...

回答 1 投票 0

使用 maven 从 wsdl 文件生成 Kotlin 类

我想从给定的 wsdl 文件生成 Kotlin 类。如何使用 jaxb2-maven-plugin 或 cxf-codegen-plugin 等 Maven 插件来执行此操作? 预先感谢!

回答 1 投票 0

如何为 .Net 中的 SOAP/WebService 类生成 HTML 文档?

当您在 VisualStudio(VS) 中启动 WebService 项目时,您实际上会看到一些 HTML 文档,但 C# 注释帮助不会将其传递到 HTML。您可以获得描述来...

回答 3 投票 0

如何使桌面项目自动生成的 WSDL 类似于 Web 服务生成的另一个 WSDL?

这是我在这里潜伏多年以来第一次作为海报。我还将借此机会感谢所有社区多年来一直以来的帮助。谢谢你! 这也是我的...

回答 1 投票 0

如何使用 Guidewire Studio 并利用本地 WSDL 文件在 Guidewire ClaimCenter 中引用 Web 服务?

我希望使用 Guidewire Studio 将 Web 服务集成到我的 ClaimCenter 项目中。我已将 WSDL 文件保存在本地。我可以直接从 WSDL 文件添加对此 Web 服务的引用吗...

回答 1 投票 0

SOAP 的 PHP 数组/对象结构 (WSDL/wsse)

我必须了解如何使用 PHP 生成此示例 WSDL 的结构。 (SoapClient、SoapHeaders) 假设实际输出应该如下所示: 我必须了解如何使用 PHP 生成此示例 WSDL 的结构。 (SoapClient、SoapHeaders) 假设实际输出应该如下所示: <soapenv:Envelope xmlns="http://schemas.xmlsoap.org/1"> <soapenv:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/3"> <wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/4"> <wsse:Username>name</wsse:Username> <wsse:Password Type="wsse:PasswordText">good_password</wsse:Password> <wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <asi:ProcessMsg> <req:Payload> <req:Request> <req:Sub>DATA_1</req:Sub> <req:EID>DATA_2</req:EID> <req:IID>DATA_3</req:IID> <req:Customer FirstName="xxx" LastName="xxx"></req:Customer> <req:Lead LeadMaster="xxx" IntendedRepPer="xxx"></req:Lead> </req:Request> </req:Payload> </asi:ProcessMsg> </soapenv:Body> </soapenv:Envelope> 我尝试了三种不同的结构,但都不起作用 new \stdClass(); new \ArrayObject(); 数组() “new SoapHeader();”的结构 $Security = new \ArrayObject(); $Security['UsernameToken'] = new \ArrayObject(); $Security['UsernameToken']['Username'] = "name"; $Security['UsernameToken']['Password'] = "good_password"; // OR $Security = new \stdClass(); $Security->UsernameToken = new \stdClass(); $Security->UsernameToken->Username = "name"; $Security->UsernameToken->Password = "good_password"; $header = new SoapHeader('http://schemas.xmlsoap.org/ws/2002/07/secext','Security',$Security,false); $soapClient->__setSoapHeaders($header); “$soap_client->ServerMethod("Payload", $soap_request);”的结构: $soap_request = new \ArrayObject(); $soap_request['Payload'] = new \ArrayObject(); $soap_request['Payload']['Request'] = new \ArrayObject(); $soap_request['Payload']['Request']['Sub'] = "xxx"; $soap_request['Payload']['Request']['EID'] = "xxx"; $soap_request['Payload']['Request']['IID'] = "xxx"; $soap_request['Payload']['Request']['Customer'] = new \ArrayObject(); $soap_request['Payload']['Request']['Customer']['_'] = ''; $soap_request['Payload']['Request']['Lead'] = new \ArrayObject(); $soap_request['Payload']['Request']['Lead']['_'] = ''; foreach ($data['x'] as $key => $value) { $soap_request['Payload']['Request']['Customer'][$key] = $value; } foreach ($data['xx'] as $key => $value) { $soap_request['Payload']['Request']['Lead'][$key] = $value; } // OR $soap_request = new \stdClass(); $soap_request->Request = new \stdClass(); $soap_request->Request->Sub = "xxx"; $soap_request->Request->EID = "xxx"; $soap_request->Request->IID = "xxx"; $soap_request->Request->Customer = new \ArrayObject(); $soap_request->Request->Customer['_'] = ''; $soap_request->Request->Lead = new \ArrayObject(); $soap_request->Request->Lead['_'] = ''; foreach ($data['customer'] as $key => $value) { $soap_request->Request->Customer[$key] = $value; } foreach ($data['lead'] as $key => $value) { $soap_request->Request->Lead[$key] = $value; } 我尝试调试结构的事情: echo "FNs:\n" . $soapClient->__getFunctions() . "\n"; echo "REQUEST:\n" . $soapClient->__getLastRequest() . "\n"; echo "REQUEST (htmlent):\n" . htmlentities($soapClient->__getLastRequest()) . "\n"; 我遇到的错误消息: 输入格式不正确或不包含预期数据 调用 PropertySet.GetChild() 失败。 (该属性集没有任何子级。(SBL-EXL-00144)) 实际发送执行: $soap_response = $soapClient->ServerMethod($soap_request); 嗯,我现在真的陷入困境,不知道是否要搜索错误/错误,因为我没有任何“好的”详细错误需要调试。 这是我第一次必须使用 SOAP(将数据发送到服务),也许我完全错了?非常感谢您的帮助。 核心问题: php 内部的结构与所有命名空间是什么样子的, 属性,嵌套元素? 问题在于内置 PHP 函数 SoapHeader 需要提供广泛兼容的 SoapHeader。您可以通过扩展 PHP SoapHeader 类来查看实现。 我使用了 stdClass 对象作为有效负载。并通过将所有属性传递到最深的对象层来获取实际的数据字段。我希望通过我的问题的答案为某人节省一些研究。 安全肥皂头: namespace AppName\TheBundle\Services; use SoapHeader; use SoapVar; class AuthSoapHeaderHelper extends SoapHeader { private $wss_ns = 'http://schemas.xmlsoap.org/.../secext'; private $username = "username"; private $password = "good_password"; function __construct() { $auth = new \stdClass(); $auth->Username = new SoapVar($this->username, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $auth->Password = new SoapVar($this->password, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $username_token = new \stdClass(); $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns); $security_sv = new SoapVar( new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns), SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns); parent::__construct($this->wss_ns, 'Security', $security_sv, true); } } SOAP 有效负载: $soap_request = new \stdClass(); $soap_request->Payload = new \stdClass(); $soap_request->Payload->Request = new \stdClass(); $soap_request->Payload->Request->Sub = "DATA_1"; $soap_request->Payload->Request->EID = "DATA_2"; $soap_request->Payload->Request->IID = "DATA_3"; $soap_request->Payload->Request->Customer = new \stdClass(); $soap_request->Payload->Request->Lead = new \stdClass(); foreach ($data['x'] as $key => $value) { $soap_request->Payload->Request->Customer->{$key} = $value; } foreach ($data['xx'] as $key => $value) { $soap_request->Payload->Request->Lead->{$key} = $value; } 这导致了以下 wsdl/xml 结构: <soapenv:Envelope xmlns="http://schemas.xmlsoap.org/1"> <soapenv:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/3"> <wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/4"> <wsse:Username>username</wsse:Username> <wsse:Password Type="wsse:PasswordText">good_password</wsse:Password> <wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <asi:ProcessMsg> <req:Payload> <req:Request> <req:Sub>DATA_1</req:Sub> <req:EID>DATA_2</req:EID> <req:IID>DATA_3</req:IID> <req:Customer FirstName="xxx" LastName="xxx"></req:Customer> <req:Lead LeadMaster="xxx" IntendedRepPer="xxx"></req:Lead> </req:Request> </req:Payload> </asi:ProcessMsg> </soapenv:Body> </soapenv:Envelope>

回答 1 投票 0

我能够使用soap UI和post man将请求发送到spring boot肥皂端点,但是在尝试从SAP获取错误500时

我能够使用soap UI和post man将请求发送到spring boot肥皂端点,但是在从SAP尝试时,我收到500错误并在java代码中收到以下错误 SAAJ0511:无法

回答 1 投票 0

使用 cxf-codegen-plugin 的 Soap 标头

我正在使用 cxf-codegen-plugin 在 Java 中生成 WSDL 类,我想将 Soap 标头添加到请求中,但它们没有在插件中生成。我如何添加它们? 这是我定义的插件...

回答 1 投票 0

WSDL 定义了对象数组,但必须分配 GUID 数组失败。运行时和语法都失败

我正在尝试将 WSDL 用于我无法控制/修改的服务。使用 VS2022,我通过“添加连接服务”将连接服务添加到 WSDL。 我希望有人可以审查这个并提供...

回答 1 投票 0

SOAP-错误:解析 WSDL:无法从 'xxx/?wsdl' 加载:标签 html 第 1 行中的数据过早结束

几天来,我遇到了一个错误,但无法找到解决方案来解决此问题。 WSDL...

回答 1 投票 0

Python - 带标头和时间戳的 Zeep SOAP 请求

我正在尝试使用 Zeep 从 wsdl url 获取响应 需要用户名、密码、随机数 (PasswordDigest)、时间戳和标头。 这一切在 SoapUI 中工作正常,但我无法让它在 Z 中工作......

回答 1 投票 0

如何从 WSDL 文件中提取soap:address?

我可以检查一下,如何使用Java从https://www.dataaccess.com/webservicesserver/NumberConversion.wso?WSDL检索soap:address元素? 我可以检查一下,如何使用Java从https://www.dataaccess.com/webservicesserver/NumberConversion.wso?WSDL?检索soap:address元素 <port name="NumberConversionSoap" binding="tns:NumberConversionSoapBinding"> **<soap:address location="https://www.dataaccess.com/webservicesserver/NumberConversion.wso"/>** </port> 我尝试使用javax.wsdl.Definition检查变量以查看soap:address的存储位置,但找不到它。 有人可以建议吗? 我目前正在使用 java 将 SOAP WS 转换为 REST OpenAPI 格式,使用 https://github.com/wso2/soap-to-rest 我设法在此网页中找到答案:https://vvratha.blogspot.com/2013/11/get-wsdl-service-address-with-wsdl4j.html 希望对其他人有用。

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.