Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xs:element name="CheckDomain">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="domain" type="domainRef"/>
- <xs:element name="suggestions" type="xs:boolean" default="false" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <CheckDomain xmlns="...">
- <domainRef>...</domainRef>
- <suggestions>true</suggestions> <!-- or it could be "false" -->
- </CheckDomain>
- use strict;
- use LWP::UserAgent;
- use HTTP::Request;
- my $message = "<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ecn="http://www.alcatel.com/ecn_csa/EcnServices.wsdl">
- <soapenv:Body>
- <ecn:GetBusinessAccount>
- <accountNumber>$number</accountNumber>
- </ecn:GetBusinessAccount>
- </soapenv:Body>
- </soapenv:Envelope>";
- my $userAgent = LWP::UserAgent->new();
- my $request = HTTP::Request->new(POST => 'http://server:port/endpoint');
- # $request->header(SOAPAction => '""'); #use it if required
- $request->content($message);
- $request->content_type("text/xml; charset=utf-8");
- my $response = $userAgent->request($request);
- # $response->code == 200
- print $response->as_string;
Add Comment
Please, Sign In to add comment