簡體   English   中英

如何將現有的SOAP請求發送到現有的WSDL

[英]How to send existing SOAP Request to Existing WSDL

我有一個問題,我有這樣的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:str="http://string.soap.webservices.invent.telkom.co.id"><soapenv:Header/>
<soapenv:Body>
    <str:PhyStatus soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <ip xsi:type="xsd:string">172.20.20.123</ip>
        <slot xsi:type="xsd:string">4</slot>
        <port xsi:type="xsd:string">33</port>
    </str:PhyStatus>
</soapenv:Body>
</soapenv:Envelope>

我有WSDL,其服務具有不同的參數,但與輸入的數字相同。 在Java中,如何將SOAP請求發送到此WSDL?

對於您的信息,這是我想要的輸出(SOAP響應):

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://string.soap.webservices.invent.telkom.co.id" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
    <ns1:PhyStatusResponse>
        <PhyStatusReturn xsi:type="SOAP-ENC:Struct">
            <AdminStatus xsi:type="xsd:string">Active</AdminStatus>
            <LinkStatus xsi:type="xsd:string">Activating</LinkStatus>
            <LineProfile xsi:type="xsd:string">ADSL LINE PROFILE 10</LineProfile>
        </PhyStatusReturn>
    </ns1:PhyStatusResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

您可以使用任何http客戶端將您的soap消息發布到該服務,該服務是url刪除“?wsdl”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM