@@ -18,11 +18,11 @@ Caching of WSDL and XSD files
18
18
------------------------------
19
19
When the client is initialised it will automaticaly retrieve the wsdl file
20
20
passed as argument. This wsdl file generally references various other wsdl and
21
- xsd files. By default Zeep doesn't cache these files but it is however
21
+ xsd files. By default Zeep doesn't cache these files but it is however
22
22
advised to enable this for performance reasons.
23
23
24
24
Please see :ref: `transport_caching ` how to enable this. To make it easy to
25
- use the ``zeep.CachingClient() `` automatically creates a Transport object
25
+ use the ``zeep.CachingClient() `` automatically creates a Transport object
26
26
with SqliteCache enabled.
27
27
28
28
@@ -49,7 +49,7 @@ For example to let zeep return the raw response directly instead of processing
49
49
it you can do the following:
50
50
51
51
.. code-block :: python
52
-
52
+
53
53
from zeep import Client
54
54
from zeep import xsd
55
55
@@ -69,7 +69,7 @@ The ServiceProxy object
69
69
The ServiceProxy object is a simple object which will check if an operation
70
70
exists for attribute or item requested. If the operation exists then it will
71
71
return an OperationProxy object (callable) which is responsible for calling the
72
- operation on the binding.
72
+ operation on the binding.
73
73
74
74
75
75
.. code-block :: python
@@ -82,12 +82,12 @@ operation on the binding.
82
82
# service is a ServiceProxy object. It will check if there
83
83
# is an operation with the name `X` defined in the binding
84
84
# and if that is the case it will return an OperationProxy
85
- client.service.X()
85
+ client.service.X()
86
86
87
- # The operation can also be called via an __getitem__ call.
88
- # This is usefull if the operation name is not a valid
87
+ # The operation can also be called via an __getitem__ call.
88
+ # This is usefull if the operation name is not a valid
89
89
# python attribute name.
90
- client.service[' X-Y' ]()
90
+ client.service[' X-Y' ]()
91
91
92
92
93
93
Using non-default bindings
@@ -112,7 +112,7 @@ Creating new ServiceProxy objects
112
112
---------------------------------
113
113
There are situations where you either need to change the SOAP address from the
114
114
one which is defined within the WSDL or the WSDL doesn't define any service
115
- elements. This can be done by creating a new ServiceProxy using the
115
+ elements. This can be done by creating a new ServiceProxy using the
116
116
``Client.create_service() `` method.
117
117
118
118
.. code-block :: python
@@ -125,4 +125,19 @@ elements. This can be done by creating a new ServiceProxy using the
125
125
' {http: //my-target-namespace-here} myBinding' ,
126
126
' http://my-endpoint.com/acceptance/' )
127
127
128
- service.submit(' something' )
128
+ service.submit(' something' )
129
+
130
+
131
+ Creating the raw XML documents
132
+ ------------------------------
133
+ When you want zeep to build and return the XML instead of sending it to the
134
+ server you can use the ``Client.create_message() `` call. It requires then
135
+ ServiceProxy as first argument and the operation name as second argument.
136
+
137
+
138
+ .. code-block :: python
139
+
140
+ from zeep import Client
141
+
142
+ client = Client(' http://my-endpoint.com/production.svc?wsdl' )
143
+ node = client.create_message(client.service, ' myOperation' , user = ' hi' )
0 commit comments