Web Services adapter request and response using method one
Method one supports uploading attachments to the outgoing SOAP request and downloading attachments that are embedded in the SOAP response received from the web server.
New in 21.3 The Web Service adapter response uses the <header-lines> tag to include the HTTP header returned by the target webservice.
The following table describes the elements of a Web Services adapter request for method one.
Elements of a Web Services adapter request for method one
The following figure shows an XML sample of the adapter request for the Web Services adapter using method one. Use the adapter request XML when you create a custom process by using the Call Adapter activity in TrueSight Orchestration Development Studio.
XML sample of the Web Services actor adapter request using method one
<use-ssl-certificate>true</use-ssl-certificate>
<install-certificate>true</install-certificate>
<allow-unsigned-certificate>true</allow-unsigned-certificate>
<passphrase>changeit</passphrase>
<character-set>UTF-8</character-set>
<http-connection-properties>
<SoapAction>POST</SoapAction>
</http-connection-properties>
<transport>https-rpc</transport>
<soap-url>https://test-machine:8080/sdk/vim </soap-url>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim2">
<soapenv:Header />
<soapenv:Body>
<urn:RetrieveServiceContent>
<urn:_this type="ServiceInstance">ServiceInstance</urn:_this>
</urn:RetrieveServiceContent>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request with HTTPS Client Authentication for the Web Services adapter using method one.
XML sample of the Web Services actor adapter request with HTTPS Client Authentication and method one
<use-ssl-certificate>true</use-ssl-certificate>
<install-certificate>true</install-certificate>
<allow-unsigned-certificate>false</allow-unsigned-certificate>
<truststore-file>C:\cacerts</truststore-file>
<passphrase>changeit</passphrase>
<keystore-file>C:\keystore.jks</keystore-file>
<keystore-passphrase>changeit</keystore-passphrase>
<client-alias>s1as</client-alias>
<http-connection-properties>
<SoapAction>POST</SoapAction>
</http-connection-properties>
<transport>https-rpc</transport>
<soap-url>https://vm-w23-rds87:8181/CentralDataService/CentralData</soap-url>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.centraldata.com/">
<soapenv:Header />
<soapenv:Body>
<ser:findReservations>
<lastName>vorburger</lastName>
</ser:findReservations>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request with NTLM authentication and HTTP support.
XML sample of the Web Services actor adapter request that specifies the SOAP action and HTTP support
<transport>http-rpc</transport>
<soap-url>http://10.254.1.76:34663/_vti_bin/UserGroup.asmx</soap-url>
<username>BMCDEV1\Administrator</username>
<password>root@1233</password>
<http-connection-properties>
<Content-Type>text/xml</Content-Type>
<soapAction>http://schemas.microsoft.com/sharepoint/soap/directory
/GetAllUserCollectionFromWeb</soapAction>
</http-connection-properties>
<soap-message>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAllUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/" />
</soap:Body>
</soap:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request with NTLM Authentication and HTTP support.
XML sample of the Web Services actor adapter request with NTLM Authentication and HTTP support
<transport>http-rpc</transport>
<soap-url>http://10.254.1.76:34663/_vti_bin/UserGroup.asmx</soap-url>
<username>BMCDEV1\Administrator</username>
<password>root@1233</password>
<ntlm-authentication>true</ntlm-authentication>
<http-connection-properties>
<Content-Type>text/xml</Content-Type>
</http-connection-properties>
<soap-message>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
</GetFolder>
</soap:Body>
</soap:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports uploading a MIME attachment with the outgoing SOAP request.
XML sample of the Web Services actor adapter request that supports uploading MIME attachments
<use-ssl-certificate>false</use-ssl-certificate>
<install-certificate>false</install-certificate>
<allow-unsigned-certificate>false</allow-unsigned-certificate>
<passphrase>changeit</passphrase>
<http-connection-properties>
<SoapAction>POST</SoapAction>
<Content-Type>text/xml</Content-Type>
</http-connection-properties>
<transport>http-rpc</transport>
<soap-url>http://vm-w23-rds87:8080/SwaTestService/jaxws/SwaTest</soap-url>
<character-set />
<download-attachments>false</download-attachments>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://SwaTestService.org/xsd">
<soapenv:Header />
<soapenv:Body>
<xsd:InputRequestPut>
<xsd:mimeType1>text/plain</xsd:mimeType1>
<xsd:mimeType2>text/html</xsd:mimeType2>
<xsd:header>test</xsd:header>
</xsd:InputRequestPut>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
<attachments>
<attachment>
<file>C:\Add Attachments\attach.txt</file>
<content-id>attach1=1@localhost</content-id>
</attachment>
<attachment>
<file>C:\Add Attachments\attach.xml</file>
<content-id>attach2=2@localhost</content-id>
</attachment>
</attachments>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports uploading MTOM attachments.
XML sample of the Web Services actor adapter request that supports uploading MTOM attachments
<transport>http-rpc</transport>
<soap-url>http://137.72.242.14:8080/axis2/services/MTOMSample?wsdl</soap-url>
<http-connection-properties>
<Content-Type>text/xml</Content-Type>
<soapAction>attachment</soapAction>
</http-connection-properties>
<character-set />
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mtom="http://ws.apache.org/axis2/mtomsample/" xmlns:xm="http://www.w3.org/2005/05/xmlmime">
<soapenv:Header/>
<soapenv:Body>
<mtom:AttachmentRequest>
<mtom:fileName>sample_WSDL.xml</mtom:fileName>
<mtom:binaryData xm:contentType="application/?" content-id="1"></mtom:binaryData>
</mtom:AttachmentRequest>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
<attachments transmission-mode="mtom">
<attachment>
<content-id>1</content-id>
<file>C:\soapattachments\sample_WSDL.xml</file>
</attachment>
</attachments>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports uploading base64Binary attachments.
XML sample of the Web Services actor adapter request that supports uploading base64Binary attachments
<transport>https-rpc</transport>
<soap-url>https://clm-xxx-yyyyyy:3443/arsys/services/ARService?server=clm-pun-server.abc.com&webService=TMS_TaskInterface</soap-url>
<http-connection-properties>
<SoapAction>POST</SoapAction>
</http-connection-properties>
<character-set />
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TMS_TaskInterface" xmlns:tem="http://tempuri.org">
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName>remuser</urn:userName>
<urn:password>rempswd</urn:password>
</urn:AuthenticationInfo>
</soapenv:Header>
<soapenv:Body>
<urn:UpdateTaskOnly>
<tem:TaskUpdate>
<tem:TaskID>TAS000000000109</tem:TaskID>
<tem:TaskSummary>This is Sample request to test base64Binary transmission mode<tem:TaskSummary>
<tem:TaskNotes>Hurray</tem:TaskNotes>
<tem:Attachment1Name>XML_Training.pptx</tem:Attachment1Name>
<tem:Attachment1Data content-id="101" />
</tem:TaskUpdate>
</urn:UpdateTaskOnly>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
<attachments transmission-mode="base64Binary">
<attachment>
<content-id>101</content-id>
<file>C:\temp\XML_Training.pptx</file>
</attachment>
</attachments>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports downloading an attachment.
XML sample of the Web Services actor adapter request that supports downloading attachments
<transport>http-rpc</transport>
<soap-url>http://vm-w23-rds87:8080/SwaTestService/jaxws/SwaTest</soap-url>
<http-connection-properties>
<Content-Type>text/xml</Content-Type>
<soapAction>POST</soapAction>
</http-connection-properties>
<character-set />
<download-attachments>true</download-attachments>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://SwaTestService.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:InputRequestGet>
<xsd:mimeType1>text/plain</xsd:mimeType1>
<xsd:mimeType2>image/jpeg</xsd:mimeType2>
<xsd:url1>attach.txt</xsd:url1>
<xsd:url2>attach.jpeg</xsd:url2>
</xsd:InputRequestGet>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports Internet Protocol version 6 (IPv6).
XML sample of the Web Services actor adapter request that supports IPv6
<transport>http-rpc</transport>
<soap-url>http://\[fe80::5097:4c5e:2289:76dd%4\]:8080/axis/StockQuoteService.jws?wsdl</soap-url>
<http-connection-properties>
<Content-Type>text/xml</Content-Type>
<soapAction>http://\[fe80::5097:4c5e:2289:76dd$4\]:8080/axis/getQuote</soapAction>
</http-connection-properties>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:def="http://DefaultNamespace">
<soapenv:Header />
<soapenv:Body>
<def:getQuote soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<symbol xmlns:xs="http://www.w3.org/2000/XMLSchema-instance" xsi:type="xsd:string" xs:type="type:string">XXX</symbol>
</def:getQuote>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The Web Services actor adapter returns an adapter response that contains the full SOAP response to the adapter request. This response can be complex; you must have working knowledge of SOAP to use the response successfully. The following figure illustrates the adapter response to the Web Services adapter request with method one.
XML sample of the Web Services adapter response to a request with method one
<metadata>
<status>success</status>
</metadata>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RetrieveServiceContentResponse xmlns="urn:vim2">
<returnval>
<rootFolder type="Folder">group-d1</rootFolder>
<propertyCollector type="PropertyCollector">propertyCollector
</propertyCollector>
<about>
<name>VMware VirtualCenter</name>
<fullName>VMware VirtualCenter 2.0.2 build-50618</fullName>
<vendor>VMware, Inc.</vendor>
<version>2.0.2</version>
<build>50618</build>
<localeVersion>INTL</localeVersion>
<localeBuild>000</localeBuild>
<osType>win32-x86</osType>
<productLineId>vpx</productLineId>
<apiType>VirtualCenter</apiType>
<apiVersion>2.0.0</apiVersion>
</about>
<setting type="OptionManager">VpxSettings</setting>
<userDirectory type="UserDirectory">UserDirectory</userDirectory>
<sessionManager type="SessionManager">SessionManager</sessionManager>
<authorizationManager type="AuthorizationManager">AuthorizationManager
</authorizationManager>
<perfManager type="PerformanceManager">PerfMgr</perfManager>
<scheduledTaskManager type="ScheduledTaskManager">ScheduledTaskManager
</scheduledTaskManager>
<alarmManager type="AlarmManager">AlarmManager</alarmManager>
<eventManager type="EventManager">EventManager</eventManager>
<taskManager type="TaskManager">TaskManager</taskManager>
<customizationSpecManager type="CustomizationSpecManager">
CustomizationSpecManager
</customizationSpecManager>
<customFieldsManager type="CustomFieldsManager">CustomFieldsManager
</customFieldsManager>
<diagnosticManager type="DiagnosticManager">DiagMgr</diagnosticManager>
<licenseManager type="LicenseManager">LicenseManager</licenseManager>
<customFieldsManager type="CustomFieldsManager">CustomFieldsManager
</customFieldsManager>
<diagnosticManager type="DiagnosticManager">DiagMgr</diagnosticManager>
<licenseManager type="LicenseManager">LicenseManager</licenseManager>
<searchIndex type="SearchIndex">SearchIndex</searchIndex>
</returnval>
</RetrieveServiceContentResponse>
</soapenv:Body>
</soapenv:Envelope>
</soap-response>
The following figure illustrates the adapter response to the Web Services adapter request using HTTPS Client Authentication and method one.
XML sample of the Web Services adapter response to a request using HTTPS Client Authentication and method one
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:findReservationsResponse xmlns:ns2="http://service.centraldata.com/">
<return>
<confNumber>0004</confNumber>
<firstName>Mike</firstName>
<lastName>Vorburger</lastName>
</return>
</ns2:findReservationsResponse>
</S:Body>
</S:Envelope>
</soap-response>
The following figure illustrates the adapter response to the Web Services adapter request using NTLM authentication and HTTP support.
XML sample of the Web Services adapter response using NTLM authentication and HTTP support
<data>
<soap-response>
<soap:Envelope>
<soap:Body>
<GetAllUserCollectionFromWebResponse>
<GetAllUserCollectionFromWebResult>
<GetAllUserCollectionFromWeb>
<Users>
<User ID="8786" Sid="S-1-5-21-935981524-3360503449-101602611-
109847" Name="Weissban, Anat"
LoginName="ADPROD\aweissba" Email="" Notes=""
IsSiteAdmin="False"
IsDomainGroup="False" />
<User ID="3815" Sid="S-1-5-21-935981524-3360503449-101602611-
42852" Name="Weiss, Christian"
LoginName="ADPROD\cweiss" Email="Christian_Weiss@abc.com"
Notes="" IsSiteAdmin="False"
IsDomainGroup="False" />
</Users>
</GetAllUserCollectionFromWeb>
</GetAllUserCollectionFromWebResult>
</GetAllUserCollectionFromWebResponse>
</soap:Body>
</soap:Envelope>
</soap-response>
</data>
</adapter-response>
The following figure illustrates the adapter response to the Web Services adapter request using NTLM authentication and HTTPS support.
XML sample of the Web Services adapter response to a request using NTLM authentication and HTTPS support
<metadata>
<status>success</status>
</metadata>
<soap11:Body>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">
ErrorSchemaValidation</e:ResponseCode>.*
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">
The element 'GetFolder' in namespace
'http://schemas.microsoft.com/exchange/services/2006/messages' has incomplete content.
List of possible elements expected: 'FolderShape' in namespace
'http://schemas.microsoft.com/exchange/services/2006/messages'.</e:Message>
<e:Line xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">1</e:Line>.
<e:Position
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">353</e:Position>
</detail>
</soap11:Body>
</soap-response>
The following figure shows an XML sample of an adapter response to a request that supports uploading attachments.
XML sample of the Web Services adapter response to a request that supports uploading attachments
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<OutputResponseString xmlns="http://SwaTestService.org/xsd" xmlns:ns2="http://SwaTestService.org/wsdl">
<myString>Expected behaviour
attach1 content type: text/plain
attach1 copied to: C:\Rohit\Attachments\1307609742986_attach1
attach2 content type: application/xml
attach2 copied to: C:\Rohit\Attachments\1307609742986_attach2</myString>
</OutputResponseString>
</S:Body>
</S:Envelope>
</soap-response>
The following figure shows an XML sample of an adapter response to a request that supports uploading MTOM attachments.
XML sample of the Web Services adapter response to a request that supports uploading MTOM attachments
<metadata>
<status>success</status>
</metadata>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:AttachmentResponse xmlns:ns2="http://ws.apache.org/axis2/mtomsample/">
File saved succesfully.
</ns2:AttachmentResponse>
</soapenv:Body>
</soapenv:Envelope>
</soap-response>
The following table describes the elements of a Web Services adapter response for method one when the adapter request supports downloading attachments.
Elements of a Web Services adapter response for method one when the adapter request supports downloading attachments
Element | Description |
---|---|
attachments | Contains the <attachment> elements |
attachment | Contains the <download-directory> and <name> elements for each attachment that is downloaded |
download-directory | Specifies the path of the directory where the attachment is downloaded |
name | Specifies the name of the attachment that is downloaded |
The following figure shows an XML sample of an adapter response to a request that supports downloading an attachment.
XML sample of the Web Services adapter response to a request that supports downloading attachments
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<OutputResponse xmlns="http://SwaTestService.org/xsd" xmlns:ns2="http://SwaTestService.org/wsdl">
<mimeType1>text/plain</mimeType1>
<mimeType2>image/jpeg</mimeType2>
<result>ok</result>
<reason>ok</reason>
</OutputResponse>
</S:Body>
</S:Envelope>
<attachments>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306762697546_1.txt</name>
</attachment>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306762697546_2.jpeg</name>
</attachment>
</attachments>
</soap-response>
The following figure shows an XML sample of the adapter response that supports IPv6.
XML sample of the Web Services actor adapter response that supports IPv6
<metadata>
<status>success</status>
</metadata>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getQuoteResponse xmlns:ns1="http://DefaultNamespace"soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<getQuoteReturn xsi:type="xsd:float">66.25</getQuoteReturn>
</ns1:getQuoteResponse>
</soapenv:Body>
</soapenv:Envelope>
</soap-response>
XML sample of the Web Services actor adapter response that includes the HTTP header in response
<metadata>
<status>success</status>
</metadata>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<m:CountryCurrencyResponse xmlns:m="http://www.oorsprong.org/websamples.countryinfo">
<m:CountryCurrencyResult>
<m:sISOCode>INR</m:sISOCode>
<m:sName>Rupees</m:sName>
</m:CountryCurrencyResult>
</m:CountryCurrencyResponse>
</soap:Body>
</soap:Envelope>
<header-lines>
<Cache-Control>private, max-age=0</Cache-Control>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Server>Microsoft-IIS/8.5</Server>
<Web-Service>DataFlex 19.1</Web-Service>
<Date>Mon, 07 Jun 2021 13:07:03 GMT</Date>
<Content-Length>424</Content-Length>
</header-lines>
</soap-response>