[Catalyst-commits] r7544 - in Catalyst-Controller-SOAP/1.0/trunk/t: . PostApp/lib/PostApp/Controller

ruoso at dev.catalyst.perl.org ruoso at dev.catalyst.perl.org
Tue Apr 1 18:20:50 BST 2008


Author: ruoso
Date: 2008-04-01 18:20:50 +0100 (Tue, 01 Apr 2008)
New Revision: 7544

Added:
   Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL.pm
   Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl
Log:
[C-C-S] Missing test files

Added: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL.pm	2008-04-01 17:20:50 UTC (rev 7544)
@@ -0,0 +1,16 @@
+package PostApp::Controller::WithWSDL;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller::SOAP';
+
+__PACKAGE__->config->{wsdl} = 't/hello.wsdl';
+
+sub Greet : Local SOAP('DocumentLiteral') {
+    my ( $self, $c, $args ) = @_;
+    my $who = $args->{parameters}{who};
+    my $grt = $args->{parameters}{greeting};
+    $c->stash->{soap}->compile_return({ details => { greeting => $grt.' '.$who.'!' }});
+}
+
+1;

Added: Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl	2008-04-01 17:20:50 UTC (rev 7544)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:s="http://www.w3.org/2001/XMLSchema"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:hello="http://example.com/hello"
+    xmlns="http://example.com/hello"
+    targetNamespace="http://example.com/hello">
+
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" targetNamespace="http://example.com/hello">
+      <s:element name="GreetingSpecifier">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="who" type="s:string"/>
+            <s:element minOccurs="0" maxOccurs="1" name="greeting" type="s:string"/>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="GreetingResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="greeting" type="s:string"/>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="AskGreeting">
+    <wsdl:part name="parameters" element="hello:GreetingSpecifier"/>
+  </wsdl:message>
+  <wsdl:message name="GiveGreeting">
+    <wsdl:part name="details" element="hello:GreetingResponse"/>
+  </wsdl:message>
+  <wsdl:portType name="GreetingPort">
+    <wsdl:operation name="Greet">
+      <wsdl:input message="hello:AskGreeting"/>
+      <wsdl:output message="hello:GiveGreeting"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="GreetingBind" type="hello:GreetingPort">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <wsdl:operation name="Greet">
+      <soap:operation soapAction="http://example.com/" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="GreetService">
+    <wsdl:port name="GreetPort" binding="hello:GreetingBind">
+      <soap:address location="http://localhost:3000/hello"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file




More information about the Catalyst-commits mailing list