-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2566 from mulesoft/W-15639219-wsc-1.9-kt
W-15639219-wsc-1.9-kt
- Loading branch information
Showing
69 changed files
with
1,555 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...service-consumer/1.8/modules/ROOT/pages/web-service-consumer-config-topics.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-reference.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-studio.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: web-service-consumer-connector | ||
version: '1.9' | ||
display_version: 1.9 (Mule 4) | ||
title: Web Service Consumer Connector | ||
nav: | ||
- modules/ROOT/nav.adoc | ||
asciidoc: | ||
attributes: | ||
page-component-desc: Consumes a SOAP Web service to acquire data from an external source. | ||
page-connector-type: Connector | ||
page-connector-level: Select | ||
page-exchange-group-id: org.mule.connectors | ||
page-exchange-asset-id: mule-wsc-connector | ||
page-runtime-version: 4.1.1 | ||
page-release-notes-page: release-notes::connector/connector-wsc.adoc |
Binary file added
BIN
+6.08 KB
...modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+319 KB
...OT/image-source-files/web-service-consumer-configure-consume.graffle/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...dules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+215 KB
.../image-source-files/web-service-consumer-configure-transport.graffle/image5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...dules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+215 KB
.../image-source-files/web-service-consumer-configure-wsecurity.graffle/image5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.13 KB
...modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+263 KB
...OT/image-source-files/web-service-consumer-consume-operation.graffle/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+346 KB
...e-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-emptyresponse.graffle
Binary file not shown.
Binary file added
BIN
+5.99 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+60.6 KB
...odules/ROOT/image-source-files/web-service-consumer-example1.graffle/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.11 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+119 KB
...odules/ROOT/image-source-files/web-service-consumer-example2.graffle/image8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.09 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+86.2 KB
...dules/ROOT/image-source-files/web-service-consumer-example3.graffle/image10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.01 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+166 KB
...odules/ROOT/image-source-files/web-service-consumer-example4.graffle/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.09 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+151 KB
...odules/ROOT/image-source-files/web-service-consumer-example5.graffle/image9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...umer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+281 KB
...odules/ROOT/image-source-files/web-service-consumer-example6.graffle/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
....9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+217 KB
.../ROOT/image-source-files/web-service-consumer-global-element.graffle/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6 KB
...mer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+111 KB
...dules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+676 KB
web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-decompress.graffle
Binary file not shown.
Binary file added
BIN
+923 KB
web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-example-2.graffle
Binary file not shown.
Binary file added
BIN
+676 KB
web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-must-understand.graffle
Binary file not shown.
Binary file added
BIN
+5.99 KB
...ervice-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+201 KB
...sumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.49 KB
...ervice-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+499 KB
...sumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.99 KB
...ervice-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/data.plist
Binary file not shown.
Binary file added
BIN
+527 KB
...sumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+207 KB
...ice-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-consume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+187 KB
...e-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-transport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+283 KB
...e-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-wsecurity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+227 KB
...ice-consumer/1.9/modules/ROOT/images/web-service-consumer-consume-operation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+248 KB
...service-consumer/1.9/modules/ROOT/images/web-service-consumer-emptyresponse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64.6 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84.5 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+169 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+145 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+265 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example6.png
Oops, something went wrong.
Binary file added
BIN
+227 KB
...ervice-consumer/1.9/modules/ROOT/images/web-service-consumer-global-element.png
Oops, something went wrong.
Binary file added
BIN
+53.5 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-operation.png
Oops, something went wrong.
Binary file added
BIN
+114 KB
web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-xmlprolog.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.xref:index.adoc[Web Service Consumer Connector] | ||
* xref:index.adoc[Web Service Consumer Connector Overview] | ||
* xref:web-service-consumer-reference.adoc[Web Service Consumer Connector Reference] | ||
* xref:web-service-consumer-studio.adoc[Web Service Consumer Connector Studio Configuration] | ||
* xref:web-service-consumer-config-topics.adoc[Web Service Consumer Connector Additional Configuration Information] | ||
* xref:web-service-consumer-examples.adoc[Web Service Consumer Connector Examples] | ||
* xref:web-service-consumer-examples.adoc[Web Service Consumer Connector Examples] | ||
** xref:web-service-example-1.adoc[Web Service Consumer Connector Example 1] | ||
** xref:web-service-example-2.adoc[Web Service Consumer Connector Example 2] | ||
* xref:web-service-consumer-troubleshooting.adoc[Troubleshooting Web Service Consumer Connector] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
= Web Service Consumer Connector 1.9 - Mule 4 | ||
:page-aliases: connectors::web-service/web-service-consumer.adoc | ||
|
||
Anypoint Connector for Web Service Consumer (Web Service Consumer Connector) consumes a SOAP web service from a Mule app to acquire data from an external source. In many cases, you can use Anypoint Connector for Workday (Workday Connector) or Anypoint Connector for ServiceNow (ServiceNow Connector) to connect to a service provider, however, when no connector is available for a specific web service, the easiest way to consume the service is to use the Web Service Consumer Connector. | ||
|
||
The main features of the connector include: | ||
|
||
* Ability to consume DOC literal web services | ||
* Use of SOAP multipart messages | ||
* Use of SOAP headers | ||
* Support for a DataSense for SOAP headers, SOAP body, and attachments | ||
* Use of embedded DataWeave transformations inside the operation | ||
* Support for a unified experience for SOAP with attachments and MTOM handling | ||
* Custom HTTP configuration as a transport | ||
* Support for Web Service Security (WS Security) | ||
[NOTE] | ||
Web Service Consumer Connector doesn't support RPC WSDLs (Remote procedure call Web Service Descripting Language). | ||
|
||
|
||
== Before You Begin | ||
|
||
To use this connector, you must be familiar with: | ||
|
||
* SOAP and WSDLs | ||
* Anypoint Connectors | ||
* Mule runtime engine (Mule) | ||
* Elements in a Mule flow | ||
* Global elements | ||
* DataWeave | ||
* Creating a Mule app using Anypoint Studio | ||
|
||
Before creating an app, you must have access to Anypoint Studio. | ||
|
||
|
||
== Next Step | ||
|
||
After you complete the prerequisites, you are ready to create an app and configure the connector using xref:web-service-consumer-studio.adoc[Anypoint Studio]. | ||
|
||
== See Also | ||
|
||
* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[Introduction to Anypoint Connectors] | ||
* xref:connectors::introduction/intro-use-exchange.adoc[Use Exchange to Discover Connectors, Templates, and Examples] | ||
* https://anypoint.mulesoft.com/exchange/org.mule.connectors/mule-wsc-connector/[Web Service Consumer in Exchange] | ||
* https://help.mulesoft.com[MuleSoft Help Center] |
203 changes: 203 additions & 0 deletions
203
...service-consumer/1.9/modules/ROOT/pages/web-service-consumer-config-topics.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
= Web Service Consumer Additional Configuration Information - Mule 4 | ||
:page-aliases: connectors::web-service/web-service-consumer-configure.adoc | ||
|
||
Set additional configuration for Anypoint Connector for Web Service Consumer (Web Service Consumer Connector), such as custom HTTP Transport and Web Service Security both in Anypoint Studio and in the XML editor. | ||
|
||
== Configure Custom HTTP Transport | ||
|
||
By default, the connector uses a simple unprotected HTTP configuration to dispatch all outgoing SOAP messages. For cases where a more advanced HTTP configuration is required, you can parameterize the Web Service Consumer Connector with an HTTP Connector configuration to dispatch the messages. | ||
|
||
The following example illustrates how you might declare and reference an HTTP Requester configuration with HTTP Basic authentication in the *Transport Configuration* parameter of the Web Service Consumer Connector configuration to ensure that the connector dispatches each request: | ||
|
||
. In Studio, open the *Global Element Properties* window of the Web Service Consumer Connector. | ||
. On the *Transport* tab, for *Transport Configuration*, select `HTTP Transport Configuration`. + | ||
The *Requester Config* field automatically populates `HTTP_Request_configuration` only if you previously created the HTTP Request configuration. | ||
. Click *OK* | ||
|
||
In Studio, configuring custom HTTP transport looks like this: | ||
|
||
image::web-service-consumer-configure-transport.png[Configure Custom HTTP Transport] | ||
|
||
In the *Configuration XML* tab, the reference of the HTTP Requester configuration `<http:request-config name="HTTP_Request_configuration">` is under the Web Service Consumer configuration `<wsc:custom-transport-configuration>`: | ||
|
||
[source,xml,linenums] | ||
---- | ||
<http:request-config name="HTTP_Request_configuration"> | ||
<http:request-connection host="www.exampleplace.com" port="8182" protocol="HTTP"> | ||
<http:authentication> | ||
<http:basic-authentication username="admin" password="textpassword"/> | ||
</http:authentication> | ||
</http:request-connection> | ||
</http:request-config> | ||
<wsc:config name="with-custom-transport"> | ||
<wsc:connection wsdlLocation="http://www.host.com?WSDL" service="Service" port="Port"> | ||
<wsc:custom-transport-configuration> | ||
<wsc:http-transport-configuration requesterConfig="basic-auth"/> | ||
</wsc:custom-transport-configuration> | ||
</wsc:connection> | ||
</wsc:config> | ||
---- | ||
|
||
|
||
|
||
== Configure Web Service Security | ||
|
||
The WS-Security protocol enables you to use various security token formats to enforce message integrity and confidentiality. This protocol uses XML Signature and XML Encryption to provide end-to-end security. | ||
|
||
WS-Security describes how to: | ||
|
||
* Sign SOAP messages to ensure integrity and provide nonrepudiation | ||
* Encrypt SOAP messages to ensure confidentiality | ||
* Attach security tokens to ascertain the sender's identity | ||
|
||
Web Service Consumer Connector supports the following mechanisms: | ||
|
||
* Timestamp | ||
* Signature or signature verification | ||
* Username | ||
* Encryption or decryption | ||
|
||
The following example illustrates how you might configure a username token security strategy as web service security for the connector: | ||
|
||
. In Studio, open the *Global Element Properties* window of the Web Service Consumer Connector. | ||
. On the *Security* tab, for *Username token security strategy*, select `Edit inline`. | ||
. Complete the *Username*, and *Password* fields, and set *Add nonce* and *Add created* fields to `true`. | ||
. Click *OK*. | ||
|
||
In Studio, configuring web service security looks like this: | ||
|
||
image::web-service-consumer-configure-wsecurity.png[Configure Web Service Security] | ||
|
||
In the *Configuration XML* tab, configuring Web Service Security looks like this: | ||
|
||
[source,xml,linenums] | ||
---- | ||
<wsc:config name="with-custom-transport"> | ||
<wsc:connection wsdlLocation="http://www.host.com?WSDL" service="Service" port="Port"> | ||
<wsc:web-service-security> | ||
<wsc:username-token-security-strategy username="admin" password="textPassword" addCreated="true" addNonce="true"/> | ||
</wsc:web-service-security> | ||
</wsc:connection> | ||
</wsc:config> | ||
---- | ||
|
||
== Configure WSC:EMPTY_RESPONSE Error | ||
|
||
When mandatory fields are missing from the response (Illegal Empty Response), you can configure the *Error Handler* component to throw the `WSC:EMPTY_RESPONSE` error for the Web Service Consumer Connector. | ||
|
||
. In Studio, select the *On Error Continue* component of the Error handling section. | ||
. Set *Type* to *WSC:EMPTY_RESPONSE*. | ||
|
||
image::web-service-consumer-emptyresponse.png[WSC:EMPTY_RESPONSE selected for Type field] | ||
|
||
In the *Configuration XML* tab, the configuration looks like this: | ||
[source,xml,linenums] | ||
---- | ||
<flow name="WSC-Example"> | ||
<scheduler> | ||
<scheduling-strategy > | ||
<fixed-frequency /> | ||
</scheduling-strategy> | ||
</scheduler> | ||
<set-variable value="test" variableName="variableSample"/> | ||
<ee:transform> | ||
<ee:message > | ||
<ee:set-payload ><![CDATA[ %dw 2.0 | ||
output application/xml | ||
ns con http://service.soap.service.mule.org/ | ||
--- | ||
con#attachOperation: { | ||
text: vars.variableSample | ||
}]]></ee:set-payload> | ||
</ee:message> | ||
</ee:transform> | ||
<wsc:consume config-ref="Web_Service_Consumer_Config" operation="attachOperation"> | ||
<wsc:message-customizations forceXMLProlog="true"/> | ||
</wsc:consume> | ||
<error-handler > | ||
<on-error-continue enableNotifications="true" logException="true" type="WSC:EMPTY_RESPONSE"> | ||
<logger level="INFO" message="The response was empty." /> | ||
</on-error-continue> | ||
</error-handler> | ||
</flow> | ||
---- | ||
|
||
== Read Attributes in a Failure Scenario | ||
|
||
The following example shows how to configure the Web Service Consumer Connector to read SOAP attributes or additional transport data attributes in a failure scenario. | ||
|
||
. In Studio, drag a *Scheduler* source to your flow. | ||
. Drag a *Set variable* component alongside the *Scheduler* source. | ||
. Set *Name* to `variableSample` and *Value* to `test`. | ||
. Drag a *Transform Message* component alongside the *Set Variable* component. | ||
. In the Datasense output view, add the following DataWeave expression: | ||
|
||
[source,dataweave,linenums] | ||
---- | ||
%dw 2.0 | ||
output application/xml | ||
ns con http://service.soap.service.mule.org/ | ||
--- | ||
con#attachOperation: { | ||
text: vars.variableSample | ||
} | ||
---- | ||
|
||
[start=6] | ||
. Drag the Web Service Consumer Connector *Consume* operation alongside the *Transform Message* component. | ||
. Set a *Connector configuration* for the connector. | ||
. Set *Operation* to `attachOperation`. | ||
. Drag an *On Error Continue* component to the Error handling section of your flow. | ||
. Set *Type* to `WSC:BAD_RESPONSE`. | ||
. Drag a *Logger* component into the *On Error Continue* component. | ||
. Set *Message* to the expression `#[error.additionalData.statusCode]` to read SOAP attributes or additional transport data. | ||
|
||
In the *Configuration XML* tab, the configuration looks like this: | ||
[source,xml,linenums] | ||
---- | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" | ||
xmlns:wsc="http://www.mulesoft.org/schema/mule/wsc" xmlns:compression="http://www.mulesoft.org/schema/mule/compression" | ||
xmlns="http://www.mulesoft.org/schema/mule/core" | ||
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" | ||
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | ||
http://www.mulesoft.org/schema/mule/compression http://www.mulesoft.org/schema/mule/compression/current/mule-compression.xsd | ||
http://www.mulesoft.org/schema/mule/wsc http://www.mulesoft.org/schema/mule/wsc/current/mule-wsc.xsd"> | ||
<flow name="WSC-Example"> | ||
<scheduler> | ||
<scheduling-strategy > | ||
<fixed-frequency /> | ||
</scheduling-strategy> | ||
</scheduler> | ||
<set-variable value="test" variableName="variableSample"/> | ||
<ee:transform> | ||
<ee:message > | ||
<ee:set-payload ><![CDATA[ %dw 2.0 | ||
output application/xml | ||
ns con http://service.soap.service.mule.org/ | ||
--- | ||
con#attachOperation: { | ||
text: vars.variableSample | ||
}]]></ee:set-payload> | ||
</ee:message> | ||
</ee:transform> | ||
<wsc:consume config-ref="Web_Service_Consumer_Config" operation="attachOperation"> | ||
<wsc:message-customizations forceXMLProlog="true"/> | ||
</wsc:consume> | ||
<error-handler > | ||
<on-error-continue enableNotifications="true" logException="true" type="WSC:BAD_RESPONSE"> | ||
<logger level="INFO" message="#[error.additionalData.statusCode]" /> | ||
</on-error-continue> | ||
</error-handler> | ||
</flow> | ||
</flow> | ||
</mule> | ||
---- | ||
|
||
|
||
== See Also | ||
|
||
* https://help.mulesoft.com[MuleSoft Help Center] | ||
* xref:web-service-consumer-reference.adoc[Web Service Consumer Connector Reference] |
13 changes: 13 additions & 0 deletions
13
web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-examples.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
= Web Service Consumer Connector Examples - Mule 4 | ||
|
||
The following examples illustrate how to configure Anypoint Connector for Web Service Consumer (Web Service Consumer) Connector operations both in Anypoint Studio and the XML editor. | ||
|
||
* xref:web-service-example-1.adoc[Web Service Consumer Connector Example 1] | ||
This example transforms a variable value into XML and pass that value to the Web Service Consumer Connector, which subsequently consumes a web service. | ||
* xref:web-service-example-2.adoc[Web Service Consumer Connector Example 2] | ||
This example list an inventory of t-shirts and the Web Service Consumer Connector returns if there is an error such as `BAD_RESPONSE` or `EMPTY_RESPONSE`. | ||
== See Also | ||
* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[Introduction to Anypoint Connectors] | ||
* https://help.mulesoft.com[MuleSoft Help Center] |
Oops, something went wrong.