WSDL Snippet:
<?xml version="1.0" encoding="utf-8"?> <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns: +soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="h ttp://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.the-client.info/ +Service" xmlns:soapenc="http://schemas.xmlsoap.org/soap /encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xm +lns:mime="http://schemas.xmlsoap.org/wsdl/mime/" target Namespace="http://www.theClient.info/Service" xmlns="http://schemas.xm +lsoap.org/wsdl/"> <types> <s:schema elementFormDefault="qualified" targetNamespace="http://w +ww.theClient.info/Service"> <s:import namespace="http://www.w3.org/2001/XMLSchema" /> <s:element name="companyData"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="eventCode" ty +pe="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="userName" typ +e="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" typ +e="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="companyDataResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="companyDataRe +sult"> <s:complexType> <s:sequence> <s:element ref="s:schema" /> <s:any /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:schema> </types> <message name="companyDataSoapIn"> <part name="parameters" element="s0:companyData" /> </message> <message name="companyDataSoapOut"> <part name="parameters" element="s0:companyDataResponse" /> </message> <portType name="clientServiceSoap"> <operation name="companyData"> <input message="s0:companyDataSoapIn" /> <output message="s0:companyDataSoapOut" /> </operation> </portType> <binding name="clientServiceSoap" type="s0:clientServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" sty +le="document" /> <operation name="companyData"> <soap:operation soapAction="http://www.the-client.info/Service/c +ompanyData" style="document" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> </operation> </binding> <service name="clientService"> <port name="clientServiceSoap" binding="s0:clientServiceSoap"> <soap:address location="http://www.theclient.com/clientService.a +smx" /> </port> </service> </definitions>
Every request should be sent an eventCode, userName and password which is then used to authenticate with (this is not web server or cookie auth, just in their code).
I'm stuck on the syntax.
#!perl use SOAP::Lite;# +trace; use Data::Dumper; use strict; my @foo = ('Event01', 'USER', 'pass'); my $soap= SOAP::Lite -> service('http://www.theClient.com/service.asmx?WSDL') -> companyData( \@foo ); # print $soap->response; print Dumper($soap);
UPDATE: I have found some information on the wsdl from the Microsoft Support site. Maybe I need to rewrite the wsdl and use it locally?
POST /service.asmx HTTP/1.1 Host: www.theClient.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.theClient.info/Service/companyData" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x +mlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schema +s.xmlsoap.org/soap/envelope/"> <soap:Body> <companyData xmlns="http://www.theClient.info/Service"> <eventCode>string</eventCode> <userName>string</userName> <password>string</password> </companyData> </soap:Body> </soap:Envelope>
It should be a simple problem? It is just my unfamiliarity with SOAP that is causing me problems.
In reply to SOAP::Lite syntax by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |