Web Services adapter Make SOAP request using message mode, and response
In the Message mode, you can provide either the entire SOAP envelope or the SOAP body payload, as required by the web service.
This method supports signing SOAP messages according to the Web Services Security (WSS) specification to assure the integrity of the SOAP message and allows the use of the X.509 security token format. Signed messages also provide nonrepudiation.
This method also supports UsernameToken Profile authentication that defines how a web service consumer can supply a UsernameToken to identify the requestor using a user name and a password to authenticate that identity to the web service producer.
This method supports uploading attachments to the outgoing SOAP request and downloading attachments that are embedded in the SOAP response received from the web server.
The following table describes the elements for the Web Services adapter request for Make SOAP in the Message mode.
The following figure shows an XML sample of the Web Services adapter request with the synchronous Message mode and using username-token authentication with a Base64-encoded password and X.509 digital signature authentication. 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 adapter request for Make SOAP Request in Message mode and using username-token and X.509 digital signature authentication
<soap-rpc-request>
<wsdl-location>http://vm-w23-rds19:9090/atriumversions_porttype?wsdl
</wsdl-location>
<username-token>true</username-token>
<username>Demo</username>
<password encryption-type="Base64">
IA==
</password>
<password-type>plain-text</password-type>
<character-set>UTF-8</character-set>
<nonce-validation>true</nonce-validation>
<created-validation>true</created-validation>
<sign-request>true</sign-request>
<signature-properties mode="keystore">
<sign-username-token>true</sign-username-token>
<sign-timestamp />
<keystore-file>C:\Security\bmcatriumwsclient_7.5.00.001.jks</keystore-file>
<keystore-password>atrium</keystore-password>
<alias>bmcatriumwsclient</alias>
</signature-properties>
<invocation-mode>synchronous</invocation-mode>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<typ:GetVersions> xmlns:typ="http://atrium.bmc.com/2009/01/versions/types">
<appIdList>
<list>OB00C04FA081BABZlxQAmyflAg1wEA</list>
</appIdList>
</typ:GetVersions>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the Web Services adapter request for Make SOAP Request with the synchronous Message mode and using a timestamp and X.509 digital signature authentication. 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 adapter request for Make SOAP Request in Message mode and using timestamp and X.509 digital signature authentication
<soap-rpc-request>
<wsdl-location>http://s3.amazonaws.com/ec2-downloads/2009-10-31.ec2.wsdl
</wsdl-location>
<timestamp>true</timestamp>
<time-to-live>30</time-to-live>
<sign-request>true</sign-request>
<signature-properties mode="key-files">
<sign-username-token />
<sign-timestamp>true</sign-timestamp>
<private-key-file>C:\Security\private-key.der</private-key-file>
<certificate-file>C:\Security\certificate.der</certificate-file>
</signature-properties>
<invocation-mode>synchronous</invocation-mode>
<soap-message>
<web:DescribeSecurityGroups xmlns:web="http://ec2.amazonaws.com/doc/2009-10-31/">
<web:securityGroupSet />
</web:DescribeSecurityGroups>
</soap-message>
</soap-rpc-request>
The following figure shows the Web Services adapter request for Make SOAP Request with HTTPS Client Authentication. 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 adapter request for Make SOAP Request in Message mode with HTTPS Client Authentication
<soap-rpc-request>
<wsdl-location>https://vm-w23-rds87:8181/CentralDataService/CentralData?wsdl
</wsdl-location>
<invocation-mode>synchronous</invocation-mode>
<use-ssl-certificate>true</use-ssl-certificate>
<install-certificate>true</install-certificate>
<allow-unsigned-certificate>false</allow-unsigned-certificate>
<truststore-file>C:\Rohit\cacerts.jks</truststore-file>
<passphrase>changeit</passphrase>
<keystore-file>C:\keystore.jks</keystore-file>
<keystore-passphrase>changeit</keystore-passphrase>
<client-alias>s1as</client-alias>
<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>Doe</lastName>
</ser:findReservations>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports uploading an attachment with the outgoing SOAP request.
XML sample of the Web Services actor adapter request that supports uploading attachments
<soap-rpc-request>
<wsdl-location>
http://vm-w23-rds87:8080/SwaTestService/jaxws/SwaTest?WSDL
</wsdl-location>
<soap-version>1.1</soap-version>
<use-ssl-certificate>false</use-ssl-certificate>
<install-certificate>false</install-certificate>
<allow-unsigned-certificate>false</allow-unsigned-certificate>
<passphrase>changeit</passphrase>
<download-attachments>true</download-attachments>
<invocation-mode>synchronous</invocation-mode>
<character-set />
<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.html</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 downloading an attachment.
XML sample of the Web Services adapter request using Make SOAP Request in Message Mode that supports downloading attachments
<soap-rpc-request>
<wsdl-location>http://vm-w23-rds87:8080/SwaTestService/jaxws/SwaTest?WSDL</wsdl-location>
<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>application/vnd.openxmlformats-officedocument.wordprocessingml.document</xsd:mimeType2>
<xsd:url1>attach.txt</xsd:url1>
<xsd:url2>attach.html</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 custom HTTP headers.
XML sample of the Web Services adapter request that supports custom HTTP headers
<soap-rpc-request>
<wsdl-location>http://www.webservicex.com/country.asmx?wsdl</wsdl-location>
<soap-version>1.1</soap-version>
<use-ssl-certificate>false</use-ssl-certificate>
<install-certificate>false</install-certificate>
<allow-unsigned-certificate>false</allow-unsigned-certificate>
<passphrase>changeit</passphrase>
<download-attachments>false</download-attachments>
<invocation-mode>synchronous</invocation-mode>
<character-set />
<http-request-headers>
<http-request-header>
<name>Content-Type</name>
<value>text/xml;charset=UTF-8</value>
</http-request-header>
<http-request-header>
<name>X-Client-Version</name>
<value>1.0-RC</value>
</http-request-header>
<http-request-header>
<name>Cache-Control</name>
<value>no-cache</value>
</http-request-header>
<http-request-header>
<name>Content-Language</name>
<value>en-US</value>
</http-request-header>
</http-request-headers>
<soap-message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header />
<soapenv:Body>
<web:GetCurrencyByCountry>
<web:CountryName>India</web:CountryName>
</web:GetCurrencyByCountry>
</soapenv:Body>
</soapenv:Envelope>
</soap-message>
</soap-rpc-request>
The following figure shows an XML sample of the Web Services adapter request when connection pooling is enabled to connect to the remote host.
XML sample of the Web Services adapter request when connection pooling is enabled to connect to the remote host
<soap-rpc-request>
<timestamp>true</timestamp>
<time-to-live>120</time-to-live>
<sign-request>true</sign-request>
<use-connection-pooling>true</use-connection-pooling>
<max-connections>10</max-connections>
<connection-ttl>60</connection-ttl>
</soap-rpc-request>
The Web Services adapter returns a SOAP response. The following figure illustrates the Web Services adapter response to a request for Make SOAP Request with synchronous Message mode and using username token and X.509 digital signature authentication.
XML sample of the Web Services adapter response to a request for Make SOAP Request in Message mode and using username token and X.509 digital signature authentication
<soap-response>
<metadata>
<status>success</status>
</metadata>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<GetVersionsOutput xmlns="http://atrium.bmc.com/2009/01/versions/types">
<versionInfoList xmlns="">
<list>
<applicationId>OB00C04FA081BABZlxQAmyflAg1wEA</applicationId>
<applicationName>BMC Atrium CMDB</applicationName>
<maintenanceVer>0</maintenanceVer>
<majorVer>7</majorVer>
<minorVer>5</minorVer>
<patchNum>3</patchNum>
<isExist>true</isExist>
</list>
</versionInfoList>
<status xmlns="" />
<extensions xmlns="" xsi:nil="true" />
</GetVersionsOutput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</soap-response>
The following figure illustrates an XML sample of the adapter response for the Web Services adapter request for Make SOAP Request in Message mode and using timestamp and X.509 digital signature authentication.
XML sample of the Web Services adapter response to a request for Make SOAP Request in Message mode and using timestamp and X.509 digital signature authentication
<soap-response>
<metadata>
<status>success</status>
</metadata>
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/">
<requestId>29b3f7ee-93ab-43e9-a7d1-4894881f2ef3</requestId>
<securityGroupInfo>
<item>
<ownerId>622872856407</ownerId>
<groupName>usersec</groupName>
<groupDescription>first AMI</groupDescription>
<ipPermissions>
<item>
<ipProtocol>tcp</ipProtocol>
<fromPort>22</fromPort>
<toPort>22</toPort>
<groups />
<ipRanges>
<item>
<cidrIp>0.0.0.0/0</cidrIp>
</item>
</ipRanges>
</item>
<item>
<ipProtocol>tcp</ipProtocol>
<fromPort>80</fromPort>
<toPort>80</toPort>
<groups />
<ipRanges>
<item>
<cidrIp>0.0.0.0/0</cidrIp>
</item>
</ipRanges>
</item>
<item>
<ipProtocol>tcp</ipProtocol>
<fromPort>3389</fromPort>
<toPort>3389</toPort>
<groups />
<ipRanges>
<item>
<cidrIp>0.0.0.0/0</cidrIp>
</item>
</ipRanges>
</item>
</ipPermissions>
</item>
<item>
<ownerId>622872856407</ownerId>
<groupName>Test Security Group - 2</groupName>
<groupDescription>test</groupDescription>
<ipPermissions />
</item>
</securityGroupInfo>
</DescribeSecurityGroupsResponse>
</soap-response>
The following figure illustrates an XML sample of the Web Services adapter response to a request for the Make SOAP Request in Message mode with HTTPS Client Authentication.
XML sample of the Web Services adapter response to a request for Make SOAP Request in Message mode with HTTP Client Authentication
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header />
<S:Body>
<ns2:findReservationsResponse xmlns:ns2="http://service.centraldata.com/">
<return>
<confNumber>0001</confNumber>
<firstName>John</firstName>
<lastName>Doe</lastName>
</return>
<return>
<confNumber>0002</confNumber>
<firstName>Jane</firstName>
<lastName>Doe</lastName>
</return>
</ns2:findReservationsResponse>
</S:Body>
</S:Envelope>
</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
<soap-response>
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header />
<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\1307610983048_attach1
attach2 content type: text/html
attach2 copied to: C:\Rohit\Attachments\1307610983048_attach2</myString>
</OutputResponseString>
</S:Body>
</S:Envelope>
</soap-response>
The following table describes the elements of a Web Services adapter response for Make SOAP Request in Message Mode when the adapter request supports downloading attachments.
Elements of a Web Services adapter response for Make SOAP Request in Message Mode when the adapter request supports downloading attachments
Element |
Description |
---|---|
|
Contains the <attachment> elements |
|
Contains the |
|
Specifies the full path of the attachment that is downloaded |
|
Specifies the name of the attachment that is downloaded Note If an attachment name is included in the SOAP response, the attachment is saved with the same name. If no name is included, the attachment is downloaded with a unique format as follows: |
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
<soap-response>
<metadata>
<status>success</status>
</metadata>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header />
<S:Body>
<MTOMOutResponse xmlns="http://MTOMTestService.org/types">
<docUrl1>http://localhost:8080/MTOMTestService/text.xml</docUrl1>
<docUrl2>http://localhost:8080/MTOMTestService/application.xml</docUrl2>
<docUrl3>http://localhost:8080/MTOMTestService/attach.html</docUrl3>
<docUrl4>http://localhost:8080/MTOMTestService/attach.jpg</docUrl4>
<doc1>PD94bWwgdmVyc2lvbj0....JvdmlkZXJDb25maWc+</doc1>
<doc2>PD94bWwgdmVyc2lvbj0....FwcGxpY2F0aW9uPg==</doc2>
<doc3>PCFET0NUWVBFIEhUTUw....Ym9keT4KPC9odG1sPgo=</doc3>
<doc4>/9j/4AAQSkZJRgABAgA....JWBSAffBJ5/HiutxRRQwP/Z</doc4>
</MTOMOutResponse>
</S:Body>
</S:Envelope>
<attachments>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306763809281_1.xml</name>
</attachment>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306763809296_2.xml</name>
</attachment>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306763809296_3.html</name>
</attachment>
<attachment>
<download-directory>C:\Soap_Attachments\</download-directory>
<name>1306763809312_4.jpeg</name>
</attachment>
</attachments>
</soap-response>
The following figure shows an XML sample of an adapter response to a request that supports custom HTTP headers.
XML sample of the Web Services adapter response to a request that supports custom HTTP headers
<soap-response>
<metadata>
<status>success</status>
</metadata>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header />
<soap:Body>
<GetCurrencyByCountryResponse xmlns="http://www.webserviceX.NET">
<GetCurrencyByCountryResult><NewDataSet>
<Table>
<Name>India</Name>
<CountryCode>in</CountryCode>
<Currency>Rupee</Currency>
<CurrencyCode>INR</CurrencyCode>
</Table>
<Table>
<Name>India</Name>
<CountryCode>in</CountryCode>
<Currency>Rupee</Currency>
<CurrencyCode>INR</CurrencyCode>
</Table>
</NewDataSet></GetCurrencyByCountryResult>
</GetCurrencyByCountryResponse>
</soap:Body>
</soap:Envelope>
</soap-response>
Comments
Log in or register to comment.