coldfusion使用SOAP发布Web服务
我正在尝试创建一个可以使用SOAP的web服务。我使用的是返回任何值的普通Web服务,但我知道我想检查SOAP:BODY中的哪些元素是必需的,并用响应返回它们。我找到了方法 GetSoapRequest() 及 AddSoapResponse() 在adobe的livedoc中,但不知道如何使用它们。 我在网上看到了一个请求和响应的解释 我试图解决标记“cfsavecontent”的问题coldfusion使用SOAP发布Web服务,soap,coldfusion,request,response,publishing,Soap,Coldfusion,Request,Response,Publishing,我正在尝试创建一个可以使用SOAP的web服务。我使用的是返回任何值的普通Web服务,但我知道我想检查SOAP:BODY中的哪些元素是必需的,并用响应返回它们。我找到了方法 GetSoapRequest() 及 AddSoapResponse() 在adobe的livedoc中,但不知道如何使用它们。 我在网上看到了一个请求和响应的解释 我试图解决标记“cfsavecontent”的问题 1.90 但它只有在cffunction具有returntype=“any”时才起作用。类型“xml”出
1.90
但它只有在cffunction具有returntype=“any”时才起作用。类型“xml”出现错误
thx for helf在CF中创建web服务的最简单方法,请参阅 为web服务创建组件 发布web服务
在CF中创建web服务的最简单方法,请参阅 为web服务创建组件 发布web服务
我刚刚安装了
soapUI
eclipse
插件
,并调用了包含complexe类型参数的WSDL
。在用插件测试了我的web服务的方法之后,我得到了我一直在搜索的SOAP消息。也许它会帮助任何人,我只是在寻找这个解决方案很长时间
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://components.conner.somebody">
<soapenv:Header/>
<soapenv:Body>
<com:echoAddress soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<input xsi:type="com:Address">
<City xsi:type="xsd:string">?</City>
<Country xsi:type="xsd:string">?</Country>
<State xsi:type="xsd:string">?</State>
<Street xsi:type="xsd:string">?</Street>
</input>
</com:echoAddress>
</soapenv:Body>
</soapenv:Envelope>
?
?
?
?
下面是将调用的coldfusion组件的方法
<cffunction
name="echoAddress"
returnType="address"
output="false"
access="remote">
<cfargument
name="input"
type="address">
<cfreturn #arguments.input#>
</cffunction>
我刚刚安装了soapUI
eclipse
插件
,并调用了包含complexe类型参数的WSDL
。在用插件测试了我的web服务的方法之后,我得到了我一直在搜索的SOAP消息。也许它会帮助任何人,我只是在寻找这个解决方案很长时间
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://components.conner.somebody">
<soapenv:Header/>
<soapenv:Body>
<com:echoAddress soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<input xsi:type="com:Address">
<City xsi:type="xsd:string">?</City>
<Country xsi:type="xsd:string">?</Country>
<State xsi:type="xsd:string">?</State>
<Street xsi:type="xsd:string">?</Street>
</input>
</com:echoAddress>
</soapenv:Body>
</soapenv:Envelope>
?
?
?
?
下面是将调用的coldfusion组件的方法
<cffunction
name="echoAddress"
returnType="address"
output="false"
access="remote">
<cfargument
name="input"
type="address">
<cfreturn #arguments.input#>
</cffunction>
如果您将参数access添加到remote,我刚刚认识到这是一个web服务,因为我在添加“?wsdl”后得到了描述,但没有考虑。但是我如何设置将通过soap调用的参数。如何在soap主体中设置参数,以便正确接收coldfusion web服务。。。。web服务是否以正确的格式自动返回,或者我必须设置什么返回类型……请仔细阅读,并遵循指南。答案就在这里。我刚刚认识到,如果您将参数access添加到remote,这是一个web服务,因为我在添加“?wsdl”后得到了描述,但没有考虑。但是我如何设置将通过soap调用的参数。如何在soap主体中设置参数,以便正确接收coldfusion web服务。。。。web服务是否以正确的格式自动返回,或者我必须设置什么返回类型……请仔细阅读,并遵循指南。答案都在那里。