以下はxml
となっており、Perlに変換する必要があります。Soap :: Lite Perl基本クエリ
POST /carrierintegrationapi.asmx HTTP/1.1
Host: carrierintegrationapi.3tlogistics.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://carrierintegrationapi.3tlogistics.net/Login"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<CiSoapHeader xmlns="https://carrierintegrationapi.3tlogistics.net/">
<Username>cccict</Username>
<Password>xxxxxx</Password>
<AuthenticationToken>string</AuthenticationToken>
</CiSoapHeader>
</soap:Header>
<soap:Body>
<Login xmlns="https://carrierintegrationapi.3tlogistics.net/" />
</soap:Body>
</soap:Envelope>';
私たちの試み:
my $service = SOAP::Lite
-> service ('https://carrierintegrationapi.3tlogistics.net/carrierintegrationapi.asmx');
my $AuthHeader = SOAP::Header->new(
name =>'AuthenticationHeader',
attr => { xmlns => "https://carrierintegrationapi.3tlogistics.net/" },
value => {Username => 'cccict', Password => 'xxxxxx' },
);
my $result = $service->GetIt($AuthHeader);
我々はparser.pm
で不一致のタグを取得しますか?
@エーザン「お時間をいただきありがとうございます:D」を質問に追加しないでください。不要なノイズで、投稿には含まれません。また、 "xml"(これは "XML"でなければなりません)のような、コードではないものにはインラインコードの書式を使用しないでください。 – ThisSuitIsBlackNot