diff --git a/web-service-consumer/1.8/modules/ROOT/pages/index.adoc b/web-service-consumer/1.8/modules/ROOT/pages/index.adoc index 42083b155c..b9f2d0e6b6 100644 --- a/web-service-consumer/1.8/modules/ROOT/pages/index.adoc +++ b/web-service-consumer/1.8/modules/ROOT/pages/index.adoc @@ -1,5 +1,5 @@ = Web Service Consumer Connector 1.8 - 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. diff --git a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-config-topics.adoc b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-config-topics.adoc index 884b77cee2..52ceeb31ed 100644 --- a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-config-topics.adoc +++ b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-config-topics.adoc @@ -1,5 +1,5 @@ = 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. diff --git a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-reference.adoc b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-reference.adoc index 032f5e4498..ff8e4b2191 100644 --- a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-reference.adoc +++ b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-reference.adoc @@ -1,9 +1,9 @@ = Web Service Consumer Connector Reference - Mule 4 -:page-aliases: connectors::web-service/web-service-consumer-reference.adoc -Web Service Consumer Connector Version 1.7 + +Web Service Consumer Connector Version 1.8 Anypoint Connector for Web Service Consumer (Web Service Consumer Connector) consumes a SOAP Web service to acquire data from an external source. diff --git a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-studio.adoc b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-studio.adoc index 883d4a887d..a81701f16d 100644 --- a/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-studio.adoc +++ b/web-service-consumer/1.8/modules/ROOT/pages/web-service-consumer-studio.adoc @@ -1,5 +1,5 @@ = Using Anypoint Studio to Configure Web Service Consumer 1.8 - Mule 4 -:page-aliases: connectors::web-service/web-service-consumer-consume.adoc + Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. diff --git a/web-service-consumer/1.9/antora.yml b/web-service-consumer/1.9/antora.yml new file mode 100644 index 0000000000..7fa8f15c45 --- /dev/null +++ b/web-service-consumer/1.9/antora.yml @@ -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 diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/data.plist new file mode 100644 index 0000000000..e8fdb1d3bc Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/image4.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/image4.png new file mode 100644 index 0000000000..cfa2096a25 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-consume.graffle/image4.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/data.plist new file mode 100644 index 0000000000..7d51212ed8 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/image5.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/image5.png new file mode 100644 index 0000000000..1f17b9ca70 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-transport.graffle/image5.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/data.plist new file mode 100644 index 0000000000..7d51212ed8 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/image5.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/image5.png new file mode 100644 index 0000000000..1f17b9ca70 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-configure-wsecurity.graffle/image5.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/data.plist new file mode 100644 index 0000000000..27269f2fc8 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/image1.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/image1.png new file mode 100644 index 0000000000..236deda99d Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-consume-operation.graffle/image1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-emptyresponse.graffle b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-emptyresponse.graffle new file mode 100644 index 0000000000..55bfecc6b1 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-emptyresponse.graffle differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/data.plist new file mode 100644 index 0000000000..876418a047 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/image4.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/image4.png new file mode 100644 index 0000000000..93787b7236 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example1.graffle/image4.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/data.plist new file mode 100644 index 0000000000..5cc33ae575 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/image8.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/image8.png new file mode 100644 index 0000000000..fae17e574a Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example2.graffle/image8.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/data.plist new file mode 100644 index 0000000000..d9beb7a027 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/image10.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/image10.png new file mode 100644 index 0000000000..ac97e67d7a Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example3.graffle/image10.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/data.plist new file mode 100644 index 0000000000..05cfa48693 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/image3.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/image3.png new file mode 100644 index 0000000000..8d0ca5af84 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example4.graffle/image3.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/data.plist new file mode 100644 index 0000000000..fcb5a028f6 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/image9.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/image9.png new file mode 100644 index 0000000000..206e84e06b Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example5.graffle/image9.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/data.plist new file mode 100644 index 0000000000..ea550c4b9c Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/image1.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/image1.png new file mode 100644 index 0000000000..e86527a51e Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-example6.graffle/image1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/data.plist new file mode 100644 index 0000000000..3c6632bf70 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/image2.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/image2.png new file mode 100644 index 0000000000..f39928809d Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-global-element.graffle/image2.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/data.plist new file mode 100644 index 0000000000..da4008a649 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/image2.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/image2.png new file mode 100644 index 0000000000..b80f9d499b Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/web-service-consumer-xmlprolog.graffle/image2.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-decompress.graffle b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-decompress.graffle new file mode 100644 index 0000000000..7a771f3670 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-decompress.graffle differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-example-2.graffle b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-example-2.graffle new file mode 100644 index 0000000000..a3ff48f498 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-example-2.graffle differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-must-understand.graffle b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-must-understand.graffle new file mode 100644 index 0000000000..5f4efa1de5 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-must-understand.graffle differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/data.plist new file mode 100644 index 0000000000..3190c0506f Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/image1.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/image1.png new file mode 100644 index 0000000000..1edc3dada2 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-1.graffle/image1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/data.plist new file mode 100644 index 0000000000..3e4c38e6c7 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/image1.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/image1.png new file mode 100644 index 0000000000..6b22589460 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-2.graffle/image1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/data.plist b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/data.plist new file mode 100644 index 0000000000..f6e92077a7 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/data.plist differ diff --git a/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/image1.png b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/image1.png new file mode 100644 index 0000000000..deecf4f1b2 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/image-source-files/wsc-troubleshoot-3.graffle/image1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-consume.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-consume.png new file mode 100644 index 0000000000..35ce4b00b4 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-consume.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-transport.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-transport.png new file mode 100644 index 0000000000..600ea6f202 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-transport.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-wsecurity.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-wsecurity.png new file mode 100644 index 0000000000..8071ca45bd Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-configure-wsecurity.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-consume-operation.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-consume-operation.png new file mode 100644 index 0000000000..6d8e74fa42 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-consume-operation.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-emptyresponse.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-emptyresponse.png new file mode 100644 index 0000000000..7864a32120 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-emptyresponse.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example1.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example1.png new file mode 100644 index 0000000000..ac5c2beb18 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example2.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example2.png new file mode 100644 index 0000000000..c680327ffe Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example2.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example3.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example3.png new file mode 100644 index 0000000000..1ed3ba5249 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example3.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example4.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example4.png new file mode 100644 index 0000000000..8f4125c02d Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example4.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example5.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example5.png new file mode 100644 index 0000000000..8e79904ed4 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example5.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example6.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example6.png new file mode 100644 index 0000000000..1f1428158d Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-example6.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-global-element.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-global-element.png new file mode 100644 index 0000000000..35847752be Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-global-element.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-operation.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-operation.png new file mode 100644 index 0000000000..56c0a0512c Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-operation.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-xmlprolog.png b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-xmlprolog.png new file mode 100644 index 0000000000..ea172b4edb Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/web-service-consumer-xmlprolog.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-decompress.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-decompress.png new file mode 100644 index 0000000000..4da0b2041d Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-decompress.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-example-2.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-example-2.png new file mode 100644 index 0000000000..3f809ea250 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-example-2.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-must-understand.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-must-understand.png new file mode 100644 index 0000000000..0e0f6617f2 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-must-understand.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-1.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-1.png new file mode 100644 index 0000000000..0d565a23ed Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-1.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-2.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-2.png new file mode 100644 index 0000000000..f81a6c3e09 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-2.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-3.png b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-3.png new file mode 100644 index 0000000000..81e1ce4820 Binary files /dev/null and b/web-service-consumer/1.9/modules/ROOT/images/wsc-troubleshoot-3.png differ diff --git a/web-service-consumer/1.9/modules/ROOT/nav.adoc b/web-service-consumer/1.9/modules/ROOT/nav.adoc new file mode 100644 index 0000000000..823bff8948 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/nav.adoc @@ -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] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/index.adoc b/web-service-consumer/1.9/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000000..6c0213db7f --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/index.adoc @@ -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] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-config-topics.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-config-topics.adoc new file mode 100644 index 0000000000..884b77cee2 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-config-topics.adoc @@ -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 `` is under the Web Service Consumer configuration ``: + +[source,xml,linenums] +---- + + + + + + + + + + + + + + + +---- + + + +== 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] +---- + + + + + + + +---- + +== 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] +---- + + + + + + + + + + + + + + + + + + + + + +---- + +== 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] +---- + + + + + + + + + + + + + + + + + + + + + + + + + + +---- + + +== See Also + +* https://help.mulesoft.com[MuleSoft Help Center] +* xref:web-service-consumer-reference.adoc[Web Service Consumer Connector Reference] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-examples.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-examples.adoc new file mode 100644 index 0000000000..4c416ae453 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-examples.adoc @@ -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] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-reference.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-reference.adoc new file mode 100644 index 0000000000..248d3f5cee --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-reference.adoc @@ -0,0 +1,406 @@ += Web Service Consumer Connector Reference - Mule 4 +:page-aliases: connectors::web-service/web-service-consumer-reference.adoc + + + +Web Service Consumer Connector Version 1.9 + +Anypoint Connector for Web Service Consumer (Web Service Consumer Connector) consumes a SOAP Web service +to acquire data from an external source. + +Release Notes: xref:release-notes::connector/connector-wsc.adoc[Web Service Consumer Release Notes] + +== Configurations + +[[config]] +=== Default Configuration + +Default configuration. + +==== Parameters +[%header%autowidth.spread] +|=== +| Name | Type | Description | Default Value | Required +|Name | String | The name for this configuration. Connectors reference the configuration with this name. | | *x* +| Connection a| <> + | The connection types to provide to this configuration. | | *x* +| Expiration Policy a| <> | Configures the minimum amount of time that a dynamic configuration instance can remain idle before it is eligible for expiration. Once a configuration instance is designated as expired, it is subsequently purged. | | +|=== + +==== Connection Types + +[[config_connection]] +===== Connection + +Connection provider that returns instances of WSC SOAP client. + +====== Parameters +[%header%autowidth.spread] +|=== +| Name | Type | Description | Default Value | Required +| Soap Version a| Enumeration, one of: + +* SOAP11 +* SOAP12 | The SOAP version of the WSDL. | SOAP11 | +| Mtom enabled a| Boolean | Determines whether or not to use the MTOM protocol to manage the attachments. | `false` | +| Encoding a| String | Default character encoding to use in all the messages. If not specified, the default charset in the mule configuration is used. | | +| Transport Configuration a| One of: + +* <> +* <> | The transport configuration used to dispatch the SOAP messages. | | +| WSDL Location a| String | The WSDL file URL (remote or local). | | *x* +| Service a| String | The service name. | | *x* +| Port a| String | The port name. | | *x* +| Address a| String | The address of the web service. This field is case-sensitive, use lowercase. | | +| Reconnection a| <> | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn't pass after exhausting the associated reconnection strategy. | | +| Sign Security Strategy a| <> | A sign WSS configuration. | | +| Verify Signature Security Strategy a| <> | A verify signature WSS configuration. | | +| Username Token Security Strategy a| <> | A username token security strategy WSS configuration. | | +| Outgoing Timestamp Security Strategy a| <> | A timestamp WSS configuration. | | +| Decrypt Security Strategy a| <> | A decrypt WSS configuration. | | +| Encrypt Security Strategy a| <> | An encrypt WSS configuration. | | +| Incoming Timestamp Security Strategy a| <> | A timestamp verification WSS configuration. | | +| Must Understand a| Boolean | Determines whether the *Must understand* attribute in the Web Service Security header is `true` or `false`. Defaults to `true`. | `true` | +| Actor a| String | A SOAP message may travel from a sender to a receiver by passing different endpoints along the message path. The SOAP actor attribute is used to address the Web Service Security header to a specific endpoint. This parameter's value must be a URI. | | +|=== + +==== Associated Operations + +<> + +== Operations + +[[consume]] +=== Consume + +`` + +Consumes an operation from a SOAP Web Service. + +==== Parameters +[%header%autowidth.spread] +|=== +| Name | Type | Description | Default Value | Required +| Configuration | String | The name of the configuration to use. | | *x* +| Operation a| String | The name of the Web service operation that aims to invoke. | | *x* +| Body a| Binary | The XML body to include in the SOAP message, with all the required parameters, or `null` if no parameters are required. | #[payload] | +| Headers a| Binary | The XML headers to include in the SOAP message. | | +| Attachments a| Object | The attachments to include in the SOAP request. | | +| Headers a| Object | A group of transport headers that are bounded with the transport request. | | +| Force XML Prolog into body a| Boolean | If true, appends the XML Prolog statement to the request's body. | false | +| Target Variable a| String | The name of a variable to store the operation's output. | | +| Target Value a| String | An expression to evaluate against the operation's output and store the expression outcome in the target variable. | #[payload] | +| Reconnection Strategy a| * <> +* <> | A retry strategy in case of connectivity errors. | | +|=== + +==== Output +[%autowidth.spread] +|=== +| Type | <> +| Attributes Type a| <> +|=== + +==== For Configurations + +<> + +==== Throws + +* WSC:SOAP_FAULT +* WSC:TIMEOUT +* WSC:BAD_RESPONSE +* WSC:BAD_REQUEST +* WSC:CONNECTIVITY +* WSC:CANNOT_DISPATCH +* WSC:RETRY_EXHAUSTED +* WSC:ENCODING +* WSC:INVALID_WSDL + +== Types + +[[Reconnection]] +=== Reconnection +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Fails Deployment a| Boolean | When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn't pass after exhausting the associated reconnection strategy. | | +| Reconnection Strategy a| * <> +* <> | The reconnection strategy to use. | | +|=== + +[[reconnect]] +=== Reconnect +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Frequency a| Number | How often (in milliseconds) to reconnect. | | +| Count a| Number | How many reconnection attempts to make. | | +| blocking |Boolean |If `false`, the reconnection strategy runs in a separate, non-blocking thread. |`true`| +|=== + +[[reconnect-forever]] +=== Reconnect Forever +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Frequency a| Number | How often (in milliseconds) to reconnect. | | +| blocking |Boolean |If `false`, the reconnection strategy runs in a separate, non-blocking thread. |`true` | +|=== + +[[WssSignSecurityStrategyAdapter]] +=== WSS Sign Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Key Store Configuration a| <> | The keystore to use when signing the message. | | x +| Sign Algorithm Configuration a| <> | The algorithms to use on the signing. | | +|=== + +[[wss-key-store-configuration]] +=== WSS Keystore Configuration +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Key Store Path a| String | | | x +| Alias a| String | | | x +| Password a| String | | | x +| Key Password a| String | | | +| Type a| String | | JKS | +|=== + +[[WssSignConfigurationAdapter]] +=== WSS Sign Configuration Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Signature Key Identifier a| Enumeration, one of: + +** ISSUER_SERIAL +** DIRECT_REFERENCE +** X509_KEY_IDENTIFIER +** THUMBPRINT +** SKI_KEY_IDENTIFIER +** KEY_VALUE | | ISSUER_SERIAL | +| Signature Algorithm a| Enumeration, one of: + +** RSAwithSHA256 +** ECDSAwithSHA256 +** DSAwithSHA1 +** RSAwithSHA1 +** RSAwithSHA224 +** RSAwithSHA384 +** RSAwithSHA512 +** ECDSAwithSHA1 +** ECDSAwithSHA224 +** ECDSAwithSHA384 +** ECDSAwithSHA512 +** DSAwithSHA256 | | | +| Signature Digest Algorithm a| Enumeration, one of: + +** SHA1 +** SHA256 +** SHA224 +** SHA384 +** SHA512 | | SHA1 | +| Signature C14n Algorithm a| Enumeration, one of: + +** CanonicalXML_1_0 +** CanonicalXML_1_1 +** ExclusiveXMLCanonicalization_1_0 | | ExclusiveXMLCanonicalization_1_0 | +| WSS Parts a| Array of <> | | | +|=== + +[[wss-part]] +=== WSS Part +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Encode a| Enumeration, one of: + +** ELEMENT +** CONTENT | | CONTENT | +| Namespace a| String | | | x +| Localname a| String | | | x +|=== + +[[WssVerifySignatureSecurityStrategyAdapter]] +=== WSS Verify Signature Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Trust Store Configuration a| <> | The truststore to use to verify the signature. | | +|=== + +[[wss-trust-store-configuration]] +=== WSS Trust Store Configuration +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Trust Store Path a| String | | | x +| Password a| String | | | x +| Type a| String | | jks | +|=== + +[[WssUsernameTokenSecurityStrategyAdapter]] +=== WSS Username Token Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Username a| String | The username required to authenticate with the service. | | x +| Password a| String | The password for the provided username required to authenticate with the service. | | x +| Password Type a| Enumeration, one of: + +** DIGEST +** TEXT | A #password parameter. | TEXT | +| Add Nonce a| Boolean | Specifies whether to add a cryptographically random nonce to the message. | false | +| Add Created a| Boolean | Specifies if a timestamp should be created to indicate the creation time of the message. | false | +|=== + +[[WssTimestampSecurityStrategyAdapter]] +=== WSS Timestamp Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Time To Live a| Number a| The time difference between creation and expiry time in the time unit specified in `timeToLiveUnit`. + After this time the message is invalid. This parameter's value must be greater than or equal to 1 second (or similar in in another unit). + Values set for less than 1 second are set to a 1 second timestamp. | 60 | +| Time To Live Unit a| Enumeration, one of: + +** NANOSECONDS +** MICROSECONDS +** MILLISECONDS +** SECONDS +** MINUTES +** HOURS +** DAYS a| A *Time to live* parameter. Defaults to `SECONDS`. | `SECONDS` | +|=== + +[[wss-decrypt-security-strategy]] +=== WSS Decrypt Security Strategy +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Key Store Configuration a| <> | The keystore to use when decrypting the message. | | x +|=== + +[[WssEncryptSecurityStrategyAdapter]] +=== WSS Encrypt Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Key Store Configuration a| <> | The keystore to use when encrypting the message. | | x +| Encryption Algorithms Configuration a| <> | | | +|=== + +[[wss-encryption-algorithms-configuration]] +=== WSS Encryption Algorithms Configuration +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Encryption Key Identifier a| Enumeration, one of: + +** ISSUER_SERIAL +** DIRECT_REFERENCE +** X509_KEY_IDENTIFIER +** THUMBPRINT +** SKI_KEY_IDENTIFIER +** ENCRYPTED_KEY_SHA1 +** EMBEDDED_KEY_NAME | | ISSUER_SERIAL | +| Encryption Sym Algorithm a| Enumeration, one of: + +** TRIPLE_DES +** AES_128 +** AES_256 +** AES_192 +** AES_128_GCM +** AES_192_GCM +** AES_256_GCM | | AES_128 | +| Encryption Key Transport Algorithm a| Enumeration, one of: + +** KEYTRANSPORT_RSA15 +** KEYTRANSPORT_RSAOAEP +** KEYTRANSPORT_RSAOAEP_XENC11 | | KEYTRANSPORT_RSAOAEP | +| Encryption Digest Algorithm a| Enumeration, one of: + +** SHA1 +** SHA256 +** SHA384 +** SHA512 | | SHA1 | +| Wss Part Adapters a| Array of <> | | | +|=== + +[[WssIncomingTimestampSecurityStrategyAdapter]] +=== WSS Incoming Timestamp Security Strategy Adapter +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Future Time To Live a| Number | Specifies the time in the future within which the Created time of an incoming timestamp is valid. The default + value is `60`, to avoid problems where clocks are slightly askew. To reject all future-created timestamps, set + this value to `0`. | `60` | +| Future Time To Live Unit a| Enumeration, one of: + +** NANOSECONDS +** MICROSECONDS +** MILLISECONDS +** SECONDS +** MINUTES +** HOURS +** DAYS | A *Future time to live unit* parameter. Defaults to `SECONDS`. | `SECONDS` | +|=== + +[[ExpirationPolicy]] +=== Expiration Policy +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Max Idle Time a| Number | A scalar time value for the maximum amount of time a dynamic configuration instance can be idle before it's considered eligible for expiration. | | +| Time Unit a| Enumeration, one of: + +** NANOSECONDS +** MICROSECONDS +** MILLISECONDS +** SECONDS +** MINUTES +** HOURS +** DAYS | A time unit that qualifies the *Max idle time* attribute. | | +|=== + +[[SoapOutputEnvelope]] +=== SOAP Output Envelope +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Attachments a| Object | | | +| Body a| Binary | | | +| Headers a| Object | | | +|=== + +[[SoapAttributes]] +=== SOAP Attributes +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Protocol Headers a| Object | The protocol headers bundled in the response. | | x +| Additional Transport Data a| Object | The additional transport data bundled in the response. | | x +|=== + +[[http-transport-configuration]] +=== HTTP Transport Configuration +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Requester Config a| String | | | x +|=== + +[[DefaultHttpTransportConfiguration]] +=== Default HTTP Transport Configuration +[%header%autowidth.spread] +|=== +| Field | Type | Description | Default Value | Required +| Response Timeout a| Number | The time (in milliseconds) to wait for a response. | 5000 | +|=== + +== See Also + +https://help.mulesoft.com[MuleSoft Help Center] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-studio.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-studio.adoc new file mode 100644 index 0000000000..80174d849e --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-studio.adoc @@ -0,0 +1,296 @@ += Using Anypoint Studio to Configure Web Service Consumer 1.9 - Mule 4 +:page-aliases: connectors::web-service/web-service-consumer-consume.adoc + +Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. + +To add and configure a connector in Studio: + +. <>. +. <>. +. <>. +. <>. +. <>. +. <>. + +When you run the connector, you can view the app log to check for problems, as described in <>. + + +If you are new to configuring connectors in Studio, see xref:connectors::introduction/intro-config-use-studio.adoc[Using Anypoint Studio to Configure a Connector]. If, after reading this topic, you need additional information about the connector fields, see the xref:web-service-consumer-reference.adoc[Web Service Consumer Connector Reference]. + +[[create-mule-project]] +== Create a Mule Project + +In Studio, create a new Mule project in which to add and configure the connector: + +. In Studio, select *File > New > Mule Project*. +. Enter a name for your Mule project and click *Finish*. + + +[[add-connector-to-project]] +== Add the Connector to Your Mule Project + +Add Web Service Consumer Connector to your Mule project to automatically populate the XML code with the connector's namespace and schema location and add the required dependencies to the project's `pom.xml` file: + +. In the *Mule Palette* view, click *(X) Search in Exchange*. +. In *Add Dependencies to Project*, type `web service consumer` in the search field. +. Click *Web Service Consumer* in *Available modules*. +. Click *Add*. +. Click *Finish*. + +Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. + + +[[configure-input-source]] +== Configure a Source + +An input source initiates a flow when a specified condition is met. + +For example, to configure HTTP *Listener*, follow these steps: + +. In the *Mule Palette* view, select *HTTP* > *Listener*. +. Drag *Listener* to the Studio canvas. +. On the *Listener* configuration screen, optionally change the value of the *Display Name* field. +. Specify a value for the *Path* field. +. Click the plus sign (*+*) next to the *Connector configuration* field to configure a global element that can be used by all instances of `HTTP Listener` in the app. +. On the *General* tab, specify connection information. +. On the *TLS* tab, optionally specify TLS information. +. On the *Advanced* tab, optionally specify reconnection information, including a reconnection strategy. +. Click *Test Connection* to confirm that Mule can connect with the specific server. +. Click *OK*. + +[[add-connector-operation]] +== Add a Connector Operation to the Flow + +When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. + +To add the Consume operation to Web Service Consumer Connector, follow these steps: + +. In the *Mule Palette* view, select *Web Service Consumer* and then select the *Consume* operation. +. Drag the operation onto the Studio canvas to the right of the input source. + +.Web Service Consumer Connector Operations +image::web-service-consumer-operation.png[Web Service Consumer Connector Operations] + +[[configure-global-element]] +== Configure a Global Element for the Connector + +When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. To consume a SOAP web service operation, you need to create a configuration that points to the service that you want to consume. + +To configure the global element for Web Service Consumer Connector, follow these steps: + +. Select the name of the connector in the Studio canvas. +. In the *Basic Settings* section of the *General* tab, click the plus sign (+) next to the *Connector configuration* field to access the global element configuration fields. +. In the *Connection* section of the *General* tab, configure the following parameters: +* *WSDL location* + +The remote or local WSDL file URL +* *Service* + +The service name +* *Port* + +The port name +* *Address* + +The address of the web server to dispatch requests if the *Service* and *Port* parameters did not automatically provide this value. + +Note that the *WSDL location*, *Service*, and *Port* parameters are mandatory for the configuration to be valid. + +The following example shows how to configure the global element to get a list of flights by airline: + +.Web Service Consumer Global Element +image::web-service-consumer-global-element.png[Web Service Consumer Global Element] + +In the *Configuration XML* tab, the XML looks like this: +[source,xml,linenums] +---- + + + +---- + + +[[configure-other-fields]] +== Configure Consume Operation + +After you configure a global element for Web Service Consumer Connector, configure the Consume operation parameters, such as *Operation*, *Message* (*Body, Headers, Attachments*) and so on. Additionally, learn about the output of the Consume operation and metadata attributes used to dispatch messages. + +=== Parameters + +The Consume operation has two main parameters: + +* *Operation* + +Defines which SOAP operation of the web service to invoke. During the design phase, the parameter defines the input and output types for the Consume operation. The types will change depending on which operation you choose. + +* *Message* + +A representation of `SOAP:ENVELOP` composed of three optional parameters: +** *Body* + +The XML body to include in the SOAP message, with all the required parameters, or `null` if no parameters are required +** *Headers* + +The XML headers to include in the SOAP message +** *Attachments* + +The attachments to include in the SOAP request + +To configure these parameters for the Consume operation, follow these steps: + + +. Select the name of the connector in the Studio canvas. +. In the *General* section of the Consume operation, define *Operation*, and in the *Message* section, define *Body*, *Headers*, and *Attachments* fields: + +.Configure Consume Operation +image::web-service-consumer-configure-consume.png[Configure Consume Operation] + +In the *Configuration XML* tab, a basic configuration for the Consume operation looks like this: +[source,xml,linenums] +---- + + + #[payload] + + +---- + +==== Body Parameter + +The `body` parameter is the main part of the SOAP message. It accepts embedded DataWeave script values so expects that you can construct the XML request without having a side effect on the message or having to use multiple components to create the request. Some characteristics of the parameter include: + + +* The default value is `#[payload]`, based on the assumption that the incoming payload is the XML entity ready to ship to the service. +* If the body is not valid XML, or if the request cannot be created for some reason, you get a `WSC:BAD_REQUEST` error. +* If you don't provide body content, the Web Service Consumer Connector attempts to generate one, and this works only for cases where no XML entity is expected in the body. +* Some web services require to append the XML prolog tag into the envelope's body XML content, which contains the version and encoding information that identifies the document as being XML. + +The following example shows a DataWeave expression inside the `body` parameter, and how to force the Web Service Consumer Connector to dispatch any payload by enabling the XML prolog option: + +. Select the name of the connector in the Studio canvas. +. In the *Body* parameter field of the *General* tab, add the DataWeave expression. +. In the *Message Customization* section of the *Advanced* tab, enable the option *Force XML Prolog into body* like this: + +.Configure XML Prolog into Body +image::web-service-consumer-xmlprolog.png[Configure XML Prolog into Body] + +In the *Configuration XML* tab, the XML looks like this: +[source,xml,linenums] +---- + + + + #[ + %dw 2.0 + output application/xml + ns con http://service.soap.clients.namespace/ + --- + con#clients: { + client: { + name: "admin1", + lastname: "textpassword1" + }, + client: { + name: "admin2", + lastname: "textpassword2" + } + }] + + + + +---- + + +==== Headers Parameter + +The `headers` parameter contains application-specific information about the SOAP message, such as authentication, payment, and so on. The parameter is an XML entity, that accepts an embedded DataWeave script as its value. + +The following XML example shows a DataWeave expression inside the `headers` parameter: +[source,xml,linenums] +---- + + + #[payload] + + #[ + %dw 2.0 + output application/xml + ns con http://service.soap.clients.namespace/ + --- + "headers": { + con#user: "admin", + con#pass: "textpassword" + }] + + + +---- + +Note that inside the DW script, the root must be `"headers"`, otherwise, the following error returns while running the application: +`Invalid input headers XML: It must be an xml with the root tag named \'headers\'`. + +==== Attachments Parameter + +The `attachments` parameter enables you to bind attachments to the SOAP message. To create attachments for transport over SOAP, declare a DataWeave script in which each entry represents an attachment and the entry value provides the content of the attachment. + +The following XML example shows a DataWeave expression inside the `attachments` parameter that declares a new attachment called `clientsJson`. The attachment value content is stored in the `jsonFile` variable. This variable can be set from a `file:read` operation: + +[source,xml,linenums] +---- + + + #[payload] + + #[{ clientsJson: vars.jsonFile } ] + + + +---- + +=== Output + +The output of the Consume operation represents an incoming SOAP message that contains the same elements that the `Message` parameter has, and you can access each part of it. + +The following XML example stores: + +* The content of the body in a `soap.body` variable +* The content of the header called `auth` in a `soap.header.auth` variable +* The content of an attachment called `json` in a `soap.attachment.json` variable + +[source,xml,linenums] +---- + + + + #[payload] + + + + + + +---- + +=== Attributes + +When your app consumes a web service operation, you might be interested not only in the response content but also in the metadata of the underlying transport used to dispatch the messages. For example, when you use +HTTP, attributes carry HTTP headers bound to the HTTP request (`content-length`, `status`, and so on). + +The Web Service Consumer Connector uses Mule message attributes to access this information. + +[[view-app-log]] + +== View the App Log + +To check for problems, you can view the app log as follows: + +* If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio console window. +* If you’re running the app using Mule from the command line, the app log is visible in your OS console. + +Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. + + +== Next Step + +After you configure a global element and connection information, configure the other fields for the connector. See xref:web-service-consumer-config-topics.adoc[Additional Configuration Information] for more configuration steps. + +== See Also + +* https://help.mulesoft.com/s/article/How-to-set-SOAP-header-for-Mule-4-Web-Service-Consumer[How to set SOAP headers in Web Service Consumer in Mule 4] +* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[Introduction to Anypoint Connectors] +* xref:connectors::introduction/intro-config-use-studio.adoc[Using Anypoint Studio to Configure a Connector] +* xref:web-service-consumer-reference.adoc[Web Service Consumer Reference] +* https://help.mulesoft.com[MuleSoft Help Center] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-troubleshooting.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-troubleshooting.adoc new file mode 100644 index 0000000000..7c97e7674e --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-troubleshooting.adoc @@ -0,0 +1,231 @@ += Troubleshooting Web Service Consumer Connector - Mule 4 + +To troubleshoot Anypoint Connector for Web Service Consumer (Web Service Consumer Connector), become familiar with the information about enabling wire logging, troubleshooting access attachments, troubleshooting design-time WSDL issues, and interpreting commonly thrown messages. + +== Enable Wire Logging + +To begin troubleshooting Web Service Consumer Connector, look at the transport request and response on the Web Service Consumer. +If you are using the underlying HTTP transport, you can enable wire logging to see the exact HTTP message, the transmission headers, and the response status. + +To enable wire logging: + +. Access Anypoint Studio and navigate to the *Package Explorer* view. +. Open your application's project name. +. Open the `src/main/resources` path folder. +. Open the `log4j2.xml` file inside the folder. +. If the following line is already in the `log4j2.xml` file, uncomment it to enable it; otherwise, add it: ++ +[source,xml,linenums] +---- + +---- ++ +. Save your changes. +. Click the project name in *Package Explorer* and then click *Run* > *Run As* > *Mule Application*. +. Navigate to the *Console* view to read the HTTP messages in the logger: ++ + +[source,plain-text] +---- +POST /essentials/delta HTTP/1.1 +soapaction: +Host: ilt.mulesoft-training.com +User-Agent: AHC/1.0 +Connection: keep-alive +Accept: */* +Content-Type: text/xml; charset=UTF-8 +Transfer-Encoding: chunked + +b1 + + +DEBUG 2021-04-06 15:04:23,058 [[wsc-base].wsc-dispatcher.11 SelectorRunner] [processor: ; event: ] org.mule.service.http.impl.service.HttpMessageLogger.wsc-dispatcher: REQUESTER +0 + + +DEBUG 2021-04-06 15:04:23,319 [[wsc-base].wsc-dispatcher.11 SelectorRunner] [processor: ; event: ] org.mule.service.http.impl.service.HttpMessageLogger.wsc-dispatcher: REQUESTER +HTTP/1.1 200 +Date: Tue, 06 Apr 2021 18:04:23 GMT +Content-Type: text/xml; charset=UTF-8 +Transfer-Encoding: chunked +Connection: keep-alive +MULE_ENCODING: UTF-8 +Strict-Transport-Security: max-age=31536000; includeSubdomains; +X-Content-Type-Options: 1 +X-Frame-Options: SAMEORIGIN +X-XSS-Protection: 1; mode=block + +bfe +... +---- + +== Troubleshoot Access Attachments + +Some servers respond to requests by sending MTOM (Message Transmission Optimization Mechanism) messages. These messages separate their data into parts, which enables different types of content data to coexist in the same HTTP message. + +MTOM is in charge of sending binary data in a separate part and referencing that part from the corresponding field within the SOAP envelope. +Web Service Consumer users interact with these messages (multipart) only with the MTOM configuration. + +Refer to the following documentation for further information about MTOM: + +* https://www.ietf.org/rfc/rfc2387.txt[RFC2387 - The MIME Multipart/Related Content-type] +* https://www.w3.org/TR/2005/REC-xop10-20050125/[XML-binary Optimized Packaging (XOP) W3C Recommendation] +* https://www.w3.org/TR/soap12-mtom/[SOAP Message Transmission Optimization Mechanism (MTOM) W3C Recommendation] + + +Beginning with version 1.6.4, Web Service Consumer Connector enables you to configure MTOM for request messages that also automatically manage MTOM responses, regardless of the MTOM setting in the Web Service Consumer global configuration. Incoming messages with MTOM are treated as MTOM-enabled, regardless of whether MTOM is configured in the Web Service Consumer global configuration. + +The following example shows the Web Service Consumer Connector global configuration with MTOM enabled: + +.Web Service Consumer Connector Global Element +image::wsc-troubleshoot-3.png[Web Service Consumer global element configuration with MTOM field set to TRUE] + +In the XML editor, the `` and `mtomEnabled` configurations look like this: + +[source,xml,linenums] +---- + + + + + +---- + +Depending on the server side multipart setting, the server might send some binary data as a Base64-encoded text field or as a referenced binary part in the MIME message. + +To troubleshoot how to access the binary data: + +* If the server sends the binary data as Base64-encoded text field, you must access this field as part of the message. + +Base64 decoding is automatically performed by Web Service Consumer. +* If the server sends the binary data as a referenced binary part, you must access this field as an attachment. ++ +The following example shows an image sent as an attachment with MTOM by a web service server. You use DataWeave to access and transform the image into JSON. In this case, Base64 encoding is required: ++ +[source,DataWeave,linenums] +---- +import * from dw::core::Strings +import dw::core::Binaries +output application/json +ns nam http://mynamespace.com +--- +{ +... +"image": Binaries::toBase64(payload.attachments[0]), +... +} +---- + +== Troubleshoot Design Time WSDL Issues + +Errors related to incorrect WSDL recognition, acquisition, or parsing sometimes lead to the following issues: + +* DataSense does not correctly expose the message metadata defined in the WSDL. +* In the Web Service Consumer Connector configuration screen, the *Operations* field does not show any web service operation names for the connector to invoke: ++ +.Web Service Consumer Connector Operations field +image::wsc-troubleshoot-1.png[Web Service Consumer Connector Operations field shows empty] + +* In the Web Service Consumer Connector global element configuration, the *Port* and *Address* fields are not automatically filled when a WSDL location is provided. ++ +.Web Service Consumer Connector Global Element +image::wsc-troubleshoot-2.png[In the Web Service Consumer Connector global element window, the port and address fields are not filled when a WSDL location is selected] + +To resolve these issues: + +* Check the integrity of your WSDL by using your preferred online or desktop viewer applications. + +Because every parsing error during the configuration is not shown during design-time, implementing an external application helps detect them. + +* If you do not add the WSDL as a resource in the application's *src/main/resources* folder in Studio, check for a correct connection to the server hosting the WSDL. + +Sometimes you need to add custom HTTP settings, such as OAuth settings or user/password settings, to access an HTTP server in an HTTP security layer. See xref:web-service-consumer-config-topics.adoc[Setting a Custom HTTP Transport Configuration.] + +== Troubleshooting Must Understand Error + +If your Mule Web Service Consumer app throws the error `WSC:CANNOT_DISPATCH`, and the third-party server returns in the HTTP response the `soap:MustUnderstand` as the exception for the connector caused error, this indicates that the Web Service Consumer connector configuration has the Security setting *Must Understand* field set to the default value of `true`. + +To avoid this issue, set the *Must understand* field to `false`. The default value of this attribute to `true` is on the connector side, but on the SOAP protocol side the implicit value for the *Must Understand* attribute is `false` when is not present. +If you do not explicitly need to use the *Must Understand* attribute for SOAP request, set the value to `false`. + +image::wsc-must-understand.png[Web Service Consumer configuration setting Must Understand value to false] + +The returned HTTP response might come with a compressed or uncompressed payload body for you to check the `soap:MustUnderstand` exception. +If the HTTP response header `Content-Encoding` is `gzip`, it indicates that the payload body is compressed, for example, review the following HTTP response where you can see compressed characters such as �RMo�0 �W���: + +[source,XML,linenums] +---- +HTTP/1.1 500 Internal Server Error +X-OPNET-Transaction-Trace: a2_ba571488-537c-4839-94a9-48f3f08fadf3 +Content-Encoding: gzip +Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:83b066a2-fb96-4abf-a687-dd178a5b3e29"; start=""; start-info="text/xml" +Content-Length: 363 +X-Cnection: close +Date: Wed, 23 Nov 2022 13:41:25 GMT +Connection: close +Set-Cookie: dc=dcs; Path=/; Version=1; Secure; Httponly; Max-Age=900 +Strict-Transport-Security: max-age=31536000 + +�???????�RMo�0 �W���N!�c-�M�:i��֞� 1�&(h�_h���v���l?[�iJ��4X,`��t��sHs�pɥ�,C�Og8]�GOZYT��#u]��R+����=Vk�`�f�{��Y��x[+�]�0�(G÷*ӲT�����]$������?"�!ksj� +��9$��x��:ڪ/�t��5Q���+��#!�ɏ@��z��} pH^r��e7�/�T6���r�09�o +ٽ�hȂ����g%Y�&Ine�@��}� �����@%q�_�,}�i�E0g���`֘�v�n�|�~K��}�?dJ[֜;k-���`+ף������^�����Y9E?? +---- + +To decompress the payload body of the response, your Mule app must catch the thrown error using an *Error Handler* component, and then use the Compression Module *Decompress* operation to decompress the response. + +In Studio, navigate to the *Decompress* operation configuration screen, and set the *Compressed* field to the following expression to read compressed payload and catch the exception: `error.exception.errorMessage.typedAttributes.value.headers.` + +image::wsc-decompress.png[Compressed field set with expression value] + +Subsequently, you can use a *Logger* component in your Mule app to log the entire payload body with the exception, for example, the following logs show the decompressed payload SOAP body with `soap:MustUnderstand`: + +[source,XML,linenums] +---- +INFO 2022-11-23 14:57:05,247 [[MuleRuntime].uber.05: [ri-uhip-integration-esb-1095brequesttransmitterservice2_11-02-20221].BulkRequestTransmitter:\soapkit-config.BLOCKING @3f46eb07] [processor: BulkRequestTransmitter:\soapkit-config/processors/4/errorHandler/0/processors/2; event: 58ed0ad0-6b57-11ed-b9ce-147ddaa4cf6c] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: --uuid:223e386d-3093-4df4-b5f9-9cb3b9a493a2 +Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" +Content-Transfer-Encoding: binary +Content-ID: + +soap:MustUnderstandMustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood. +--uuid:223e386d-3093-4df4-b5f9-9cb3b9a493a2-- +---- + +== Troubleshooting Systems Properties + +* `mule.soap.maxAttributeSize` (default value = 524288) + +The XML parser library has a value limit for the `mule.soap.maxAttributeSize` system property that specifies maximum allowed length of attribute values, in characters. The limit protects against possible Denial-of-Service (DoS) attacks, wherein XML-based web services may be attacked by specifically crafted documents that could cause processing problems by excessive memory or computing power usage. + +The default value is 524288 characters and it is a reasonable default value for normal usage. You can change it to a higher value if input documents can legitimately exceed the default limit, or to a lower value if specific attacks are observed or the system has a lower resource allocation. + +One signal to change the value limit is when the exception `javax.xml.stream.XMLStreamException: Maximum attribute size limit (524288) exceeded` occurs when processing legitimate documents. + +To change this value, you have to set the `mule.soap.maxAttributeSize` system property with the accurate number according to your needs. Refer to the Knowledge article https://help.mulesoft.com/s/article/How-can-I-set-Mule-and-Java-system-properties-at-startup[How can I set Mule and Java system properties at startup?]). The maximum value allowed is 2147483647 (https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#MAX_VALUE[Integer.MAX_VALUE] in Java). If you set 0 or if you don't set the property, the connector takes the default value. + + +[[common-throws]] +== Understand Common Throws + +Here is a list of common throw messages and how to interpret them. + +* WSC:SOAP_FAULT + + Error matching the SOAP response with the format provided by the WSDL. + + Every CXF SOAP fault error is wrapped in a `WSC:SOAP_FAULT`. + +* WSC:BAD_REQUST + + The Web Service Consumer Connector operation does not exist in the WSDL. + + The request body is not a valid XML. + +* WSC:INVALID_WSDL + + The WSDL is poorly formatted. + +* WSC:EMPTY_RESPONSE + + Occurs when mandatory fields are missing from the response (Illegal Empty Response). + + +== See Also +* https://help.mulesoft.com[MuleSoft Help Center] +* xref:web-service-consumer-reference.adoc[Web Service Consumer Connector Reference] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-xml-maven.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-xml-maven.adoc new file mode 100644 index 0000000000..eb5487b070 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-consumer-xml-maven.adoc @@ -0,0 +1,74 @@ += Web Service Consumer XML and Maven Support - Mule 4 + +Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. + +If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. + +When you install the connector in Studio, Studio automatically populates the XML code with the connector's namespace and schema location. It also adds a dependency to the `pom.xml` file. + +== Add a Namespace for the Connector + +Paste the following code inside the `` tag of the header of your configuration XML: + +[source,xml,linenums] +---- +http://www.mulesoft.org/schema/mule/wsc +http://www.mulesoft.org/schema/mule/wsc/current/mule-wsc.xsd +---- + +This example shows how the namespace statements are placed in the `` XML block: + +[source,xml,linenums] +---- + +---- + + +== Add a POM File Dependency + +The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: + +[source,xml,linenums] +---- + + org.mule.connectors + mule-wsc-connector + x.x.x + mule-plugin + +---- + +Replace `x.x.x` with the version that corresponds to the connector you are using. + +To obtain the most up-to-date `pom.xml` file information: + +. Go to https://www.mulesoft.com/exchange/[Anypoint Exchange]. +. In Exchange, click *Login* and supply your Anypoint Platform username and password. +. In Exchange, search for `Web Service Consumer`. +. Select the connector. +. Click *Dependency Snippets* near the upper right of the screen. + +== Next Step + +After completing your namespace and `pom.xml` file, you can try the xref:web-service-consumer-examples.adoc[Examples]. + +== See Also + +* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[Introduction to Anypoint Connectors] +* https://help.mulesoft.com[MuleSoft Help Center] diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-1.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-1.adoc new file mode 100644 index 0000000000..a2ba89a917 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-1.adoc @@ -0,0 +1,132 @@ += Web Service Consumer - Example 1 + +The following example shows how to transform a variable value into XML and pass that value to Anypoint Connector for Web Service Consumer (Web Service Consumer Connector), which subsequently consumes a web service: + +image::web-service-consumer-example1.png[Web Service Consumer Example Flow in Studio Canvas] + +== Create the Mule App in Anypoint Studio +To create the flow in Anypoint Studio: + +. In the *Mule Palette* view, select *Core* > *Scheduler*. +. Drag the *Scheduler* component to the Studio canvas. + +The *Scheduler* component initiates a flow when a time-based condition is met. +. Set the *Display Name* field to `Scheduler`. +. Set *Scheduling Strategy* to `Fixed Frequency`, *Frequency* to `1000`, *Start delay* to `0` and *Time unit* to `MILLISECONDS (Default)`. + +In Studio, the *Scheduler* configuration looks like this: + +.Scheduler Configuration +image::web-service-consumer-example2.png[Scheduler Configuration] + +[start=5] +. Drag a *Set Variable* component onto the canvas, to the right of the *Scheduler* component. + +The *Set Variable* component creates the variable to be transformed into XML later in the flow. +. Set the *Display Name* field to `Set Variable`. +. Set *Name* to `variableSample` and *Value* to `test`. + +In Studio, the *Set Variable* configuration looks like this: + +.Set Variable Configuration +image::web-service-consumer-example3.png[Set Variable Configuration] + +[start=8] +. Drag a *Transform Message* component onto the canvas, to the right of the *Set Variable* component. + +The *Transform Message* component transforms the variable value into XML. +. In the *Output* field of the *Transform Message* component configuration, set a DataWeave expression that: +* Transforms the variable value output to `application/xml`. +* Defines the name of the web service operation that the Web Service Consumer Connector aims to invoke by `attachOperation`. + +.DataWeave Expression +[source,xml,linenums] +---- +%dw 2.0 +output application/xml +ns con http://service.soap.service.mule.org/ +--- +con#attachOperation: { + text: vars.variableSample +} +---- + +In Studio, the *Transform Message* configuration looks like this: + +.Transform Message Configuration +image::web-service-consumer-example4.png[Transform Message Configuration] + +[start=10] +. Drag the *Consume* operation onto the canvas, to the right of the *Transform Message* component. + +. Set the *Display Name* field to `Consume`. +. Set *Operation* to `attachOperation` and the *Body* message to `payload`. +. In the *Message Customization* section of the *Advanced* tab, enable the option *Force XML Prolog into body* to append the XML prolog to the content of the envelope's body XML. + +In Studio, the *Consume* operation configuration looks like this: + +.Consume Operation Configuration +image::web-service-consumer-example5.png[Consume Operation Configuration] + +In Studio, the *XML Prolog* configuration looks like this: + +.Configure XML Prolog into Body +image::web-service-consumer-xmlprolog.png[Configure XML Prolog into Body] + +[start=14] +. On the *General* tab, click the plus sign (+) next to the *Connector configuration* field to access the *Global Element Properties* configuration. +. On the *Connection* section of the *General* tab, configure the following parameters: +* *WSDL location* + +The remote or local WSDL file URL +* *Service* + +The service name +* *Port* + +The port name +* *Address* + +The address of the web server to dispatch requests but if the *Service* and *Port* parameters don't auto-populate the web server address, you must manually provide the correct *Address*. +. Click *OK*. + +In Studio, the *Global Element Properties* configuration looks like this: + +.Web Service Consumer Configuration +image::web-service-consumer-example6.png[Web Service Consumer Configuration] + +[start=17] +. Save your changes in Studio. +. Deploy the application. + +== XML for Consuming a Web Service +Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: + +[source,xml,linenums] +---- + + + + + + + + + + + + + + + + + + + + + + + +---- \ No newline at end of file diff --git a/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-2.adoc b/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-2.adoc new file mode 100644 index 0000000000..61abd764b3 --- /dev/null +++ b/web-service-consumer/1.9/modules/ROOT/pages/web-service-example-2.adoc @@ -0,0 +1,125 @@ += Web Service Consumer - Example 2 + +The following example lists an inventory of t-shirts and Web Service Consumer Connector returns if there is an error such as `BAD_RESPONSE` or `EMPTY_RESPONSE`. + +image::wsc-example-2.png[Web Service Consumer Example flow in Studio canvas] + +== XML for Consuming a Web Service +Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: + +[source,xml,linenums] +---- + + + + + + + + + + + + + + + + + + + + + #[payload] + #[attributes.protocolHeaders default {}] + + + #[payload] + #[attributes.protocolHeaders default {}] + + + + #[payload] + #[ + %dw 2.0 + output application/java + --- + { + headers: attributes.headers, + method: attributes.method, + queryString: attributes.queryString + }] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +----