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

ruoso at dev.catalyst.perl.org ruoso at dev.catalyst.perl.org
Fri Jun 5 20:47:30 GMT 2009


Author: ruoso
Date: 2009-06-05 20:47:30 +0000 (Fri, 05 Jun 2009)
New Revision: 10438

Added:
   Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL5.pm
   Catalyst-Controller-SOAP/1.0/trunk/t/hello5.wsdl
Modified:
   Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t
   Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl
Log:
[C-C-SOAP] test for one way document literal

Added: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL5.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL5.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/WithWSDL5.pm	2009-06-05 20:47:30 UTC (rev 10438)
@@ -0,0 +1,16 @@
+package PostApp::Controller::WithWSDL5;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller::SOAP';
+
+__PACKAGE__->config->{wsdl} = 't/hello5.wsdl';
+
+sub Greet : WSDLPort('GreetPort') {
+    my ( $self, $c, $args ) = @_;
+    my $who = $args->{parameters}{who};
+    my $grt = $args->{parameters}{greeting};
+    $c->response->body($grt);
+}
+
+1;

Modified: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t	2009-06-05 20:39:59 UTC (rev 10437)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t	2009-06-05 20:47:30 UTC (rev 10438)
@@ -1,4 +1,4 @@
-use Test::More tests => 15;
+use Test::More tests => 16;
 use File::Spec::Functions;
 use HTTP::Response;
 use IPC::Open3;
@@ -142,6 +142,12 @@
   ');
 is($response->content, 'ok 15');
 
+$response = soap_xml_post
+  ('/hello5','
+    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><GreetingSpecifier xmlns="http://example.com/hello"><who>World</who><greeting>ok 16</greeting></GreetingSpecifier></Body></Envelope>
+  ');
+is($response->content, 'ok 16');
+
 sub soap_xml_post {
     my $path = shift;
     my $content = shift;

Modified: Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl	2009-06-05 20:39:59 UTC (rev 10437)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/hello.wsdl	2009-06-05 20:47:30 UTC (rev 10438)
@@ -15,7 +15,7 @@
           <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:element minOccurs="0" maxOccurs="1" name="count" type="s:integer"/>
+            <s:element minOccurs="0" maxOccurs="1" name="count" type="s:integer"/>
           </s:sequence>
         </s:complexType>
       </s:element>
@@ -57,4 +57,4 @@
       <soap:address location="http://localhost:3000/hello"/>
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
+</wsdl:definitions>

Copied: Catalyst-Controller-SOAP/1.0/trunk/t/hello5.wsdl (from rev 10437, Catalyst-Model-SOAP/1.0/trunk/t/hello5.wsdl)
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/hello5.wsdl	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/hello5.wsdl	2009-06-05 20:47:30 UTC (rev 10438)
@@ -0,0 +1,46 @@
+<?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:element minOccurs="0" maxOccurs="1" name="count" type="s:integer"/>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="AskGreeting">
+    <wsdl:part name="parameters" element="hello:GreetingSpecifier"/>
+  </wsdl:message>
+  <wsdl:portType name="GreetingPort">
+    <wsdl:operation name="Greet">
+      <wsdl:input message="hello:AskGreeting"/>
+    </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:operation>
+  </wsdl:binding>
+  <wsdl:service name="GreetService">
+    <wsdl:port name="GreetPort" binding="hello:GreetingBind">
+      <soap:address location="http://localhost:3000/hello5"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>


Property changes on: Catalyst-Controller-SOAP/1.0/trunk/t/hello5.wsdl
___________________________________________________________________
Name: svn:mergeinfo
   + 




More information about the Catalyst-commits mailing list