doupeng8419 2017-07-24 14:43
浏览 609

SOAP如何将xml转换为wsdl?

我得到了这个XML文件,而不是一个用于SOAP使用的xsdl文件。我是否可以将这个文件转换为xsdl,以便与PHP的SoapClient()一起使用?MasterData.xml:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp200409="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp200607="http://www.w3.org/2006/07/ws-policy" xmlns:ns0="http://www.post.ch/npp/trackandtracews/v02/masterdata/definitions" targetNamespace="http://www.post.ch/npp/trackandtracews/v02/masterdata/definitions">
<wsdl:types xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:schema>
<xsd:import schemaLocation="MasterData.ws.xsd1.xsd" namespace="http://www.post.ch/npp/masterdata/v02"/></xsd:schema></wsdl:types>
<wsdl:message name="DetailRequest">
<wsdl:part name="DetailRequest" element="xsns:DetailReq" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:message name="DetailResponse">
<wsdl:part name="DetailResponse" element="xsns:DetailRes" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:message name="EventsRequest">
<wsdl:part name="EventsRequest" element="xsns:EventsReq" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:message name="EventsResponse">
<wsdl:part name="EventsResponse" element="xsns:EventsRes" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:message name="StatusesRequest">
<wsdl:part name="StatusesRequest" element="xsns:StatusReq" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:message name="StatusesResponse">
<wsdl:part name="StatusesResponse" element="xsns:StatusRes" xmlns:xsns="http://www.post.ch/npp/masterdata/v02"/></wsdl:message>
<wsdl:portType name="MasterDataResource">
<wsdl:operation name="GetAllDetails">
<wsdl:input name="DetailRequest" message="ns0:DetailRequest"/>
<wsdl:output name="DetailResponse" message="ns0:DetailResponse"/></wsdl:operation>
<wsdl:operation name="GetAllEvents">
<wsdl:input name="EventsRequest" message="ns0:EventsRequest"/>
<wsdl:output name="EventsResponse" message="ns0:EventsResponse"/></wsdl:operation>
<wsdl:operation name="GetAllStatuses">
<wsdl:input name="StatusesRequest" message="ns0:StatusesRequest"/>
<wsdl:output name="StatusesResponse" message="ns0:StatusesResponse"/></wsdl:operation></wsdl:portType>
<wsdl:binding name="MasterDataBinding" type="ns0:MasterDataResource">
<soap11:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="GetAllDetails">
<soap11:operation soapAction="http://www.post.ch/npp/masterdataws/v02/GetAllDetails" style="document"/>
<wsdl:input name="DetailRequest">
<soap11:body use="literal"/></wsdl:input>
<wsdl:output name="DetailResponse">
<soap11:body use="literal"/></wsdl:output></wsdl:operation>
<wsdl:operation name="GetAllEvents">
<soap11:operation soapAction="http://www.post.ch/npp/masterdataws/v02/GetAllEvents" style="document"/>
<wsdl:input name="EventsRequest">
<soap11:body use="literal"/></wsdl:input>
<wsdl:output name="EventsResponse">
<soap11:body use="literal"/></wsdl:output></wsdl:operation>
<wsdl:operation name="GetAllStatuses">
<soap11:operation soapAction="http://www.post.ch/npp/masterdataws/v02/GetAllStatuses" style="document"/>
<wsdl:input name="StatusesRequest">
<soap11:body use="literal"/></wsdl:input>
<wsdl:output name="StatusesResponse">
<soap11:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding>
<wsdl:service name="MasterDataService">
<wsdl:port name="MasterDataPort" binding="ns0:MasterDataBinding">
<soap11:address location="https://webservices.post.ch:443/IN_MYPBxTT/services/MasterData.ws"/></wsdl:port>
<wsdl:port name="MasterDataPort.0" binding="ns0:MasterDataBinding">
<soap11:address location="https://webservices.post.ch:443/IN_MYPBxTT/services/MasterData.ws"/></wsdl:port></wsdl:service></wsdl:definitions>

任何帮助都将不胜感激,因为我已经死磕一上午了......

我想要得到这个文件:

$SOAP_Client = new SoapClient('MasterData.wsdl')
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?