in reply to Re: PERL web service for use with MOSS2007 BDC
in thread PERL web service for use with MOSS2007 BDC
POST /cgi-bin/tester.cgi HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client +Protocol 2.0.50727.1433) Content-Type: text/xml; charset=utf-8 SOAPAction: "" Host: services.camdev.cw.com Content-Length: 553 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns=" +http://services.camdev.cw.com/Services" xmlns:types="http://services. +camdev.cw.com/Services/encodedTypes" xmlns:xsi="http://www.w3.org/200 +1/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/enc +oding/"> <tns:testing> <tester xsi:type="xsd:string">foo</tester> </tns:testing> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Date: Mon, 30 Nov 2009 18:06:00 GMT Server: Apache/2.2.4 (Debian) DAV/2 SVN/1.4.4 PHP/5.2.3-1+b1 mod_ssl/2 +.2.4 OpenSSL/0.9.8e mod_perl/2.0.3 Perl/v5.8.8 SOAPServer: SOAP::Lite/Perl/0.60 Content-Length: 551 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/xml; charset=utf-8 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc +e" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:S +OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/ +/www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xm +lsoap.org/soap/encoding/"> <SOAP-ENV:Body> <namesp1:testingResponse xmlns:namesp1="http://services.camdev.cw. +com/Services"> <Returned xsi:type="xsd:string">Back at ya</Returned> </namesp1:testingResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8" ?> - <!-- WSDL for http://services.camdev.cw.com created by Pod::WSDL ve +rsion: 0.05 on Mon Nov 30 16:44:41 2009 --> - <wsdl:definitions targetNamespace="http://services.camdev.cw.com/Ser +vices" xmlns:impl="http://services.camdev.cw.com/Services" xmlns:wsdl +soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schem +as.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/ +encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="h +ttp://services.camdev.cw.com/Services"> - <wsdl:message name="testingRequest"> - <wsdl:part name="tester" type="xsd:string"> <wsdl:documentation>abc</wsdl:documentation> </wsdl:part> </wsdl:message> - <wsdl:message name="testingResponse"> - <wsdl:part name="testingReturn" type="xsd:string"> <wsdl:documentation>xyz</wsdl:documentation> </wsdl:part> </wsdl:message> - <wsdl:portType name="ServicesHandler"> - <wsdl:operation name="testing" parameterOrder="tester"> <wsdl:input message="impl:testingRequest" name="testingRequest" /> <wsdl:output message="impl:testingResponse" name="testingResponse" / +> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="ServicesSoapBinding" type="impl:ServicesHandler" +> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/ +soap/http" /> - <wsdl:operation name="testing"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="testingRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encodi +ng/" namespace="http://services.camdev.cw.com/Services" use="encoded" + /> </wsdl:input> - <wsdl:output name="testingResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encodi +ng/" namespace="http://services.camdev.cw.com/Services" use="encoded" + /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="ServicesHandlerService"> - <wsdl:port binding="impl:ServicesSoapBinding" name="Services"> <wsdlsoap:address location="http://services.camdev.cw.com" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
#!/usr/bin/perl use strict; use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Services') -> handle; package Services; use strict; use DBI; use utf8; use Data::Dumper; my $STATUS = "FAILED"; my $MESSAGE = "FAILED"; sub testing() { my ($class, $message) = @_; my $log_file = "/tmp/tester.log"; open (LOG, ">>$log_file") or die("Open failed for $log_file : $!") +; print LOG "testing() #01 message=$message\n"; close(LOG); return SOAP::Data->name("Returned" => "Back at ya"); }
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> - <LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi +:schemaLocation="http://schemas.microsoft.com/office/2006/03/Business +DataCatalog BDCMetadata.xsd" Type="WebService" Version="1.0.0.0" Name +="WebServiceLobSystem" xmlns="http://schemas.microsoft.com/office/200 +6/03/BusinessDataCatalog"> - <Properties> <Property Name="WsdlFetchUrl" Type="System.String">http://services.c +amdev.cw.com/cgi-bin/tester.wsdl</Property> <Property Name="WebServiceProxyNamespace" Type="System.String">BDC</ +Property> </Properties> - <LobSystemInstances> - <LobSystemInstance Name="WebServiceLobSystem_Instance"> - <Properties> <Property Name="LobSystemName" Type="System.String">WebServiceLobSys +tem</Property> <Property Name="WebServiceAuthenticationMode" Type="Microsoft.Office +.Server.ApplicationRegistry.SystemSpecific.WebService.HttpAuthenticat +ionMode">PassThrough</Property> </Properties> </LobSystemInstance> </LobSystemInstances> - <Entities> - <Entity EstimatedInstanceCount="10000" Name="Entity11"> - <Identifiers> <Identifier TypeName="System.String" Name="testerID" /> </Identifiers> - <Methods> - <Method Name="testing"> - <Parameters> - <Parameter Direction="In" Name="tester"> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, +Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="tes +terID" Name="tester" /> </Parameter> - <Parameter Direction="Return" Name="Return"> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, +Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Return" /> </Parameter> </Parameters> - <MethodInstances> <MethodInstance Type="SpecificFinder" ReturnParameterName="Return" R +eturnTypeDescriptorName="Return" ReturnTypeDescriptorLevel="0" Name=" +SpecificFinderTesterInstance" /> <MethodInstance Type="Finder" ReturnParameterName="Return" ReturnTyp +eDescriptorName="Return" ReturnTypeDescriptorLevel="0" Name="FinderTe +sterInstance" /> </MethodInstances> </Method> </Methods> </Entity> </Entities> </LobSystem>
|
|---|