TIBCO Software Inc. 2009 Confidential Author: Carlo Milono

Total Page:16

File Type:pdf, Size:1020Kb

TIBCO Software Inc. 2009 Confidential Author: Carlo Milono

TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Simulating WS-Addressing Structures for BusinessWorks 5.7.X

Axis2 Echo Example

Introduction TIBCO ActiveMatrix BusinessWorks does not natively support WS-Addressing as of version 5.7.x. The underlying XML engines are flexible, however, and you can create WS-Addressing compatible WSDLs and map in-to and out-of the WS-Addressing elements and attributes. Creating a new listener will not be automatic and any of the underlying functions will have to be architected into a solution. This document only covers the WS-Addressing schema structure within BusinessWorks. This document covers the specific case of testing BusinessWorks against the Axis2 (v1.4.1) WsaMappingTest, which is basically an ‘echo’ model. This approach can be used to build out other Web Services functions as well, such as SAML or Web Services Security. One issue is that you cannot easily manipulate the attributes of the , but this is not a concern of WS-Addressing, but rather is relevant to WSSE.

Axis2 1.4 Client Request (via SoapUI) POST /axis2/services/WsaMappingTest.WsaMappingTestHttpSoap11Endpoint/ HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: "urn:echo" User-Agent: Jakarta Commons-HttpClient/3.1 Host: 127.0.0.1:9091 Content-Length: 748

urn:echo http://www.w3.org/2005/08/addressing/anonymous fc41df58-b1dc-49cf-ba81- 4b3b644b8224

http://10.105.150.234:9091/axis2/services/WsaMappingTest.WsaMappingTestHt tpSoap11Endpoint/ SOAP 1.1 this time TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Axis2 1.4 Service Response

HTTP/1.1 200 OK Date: Thu, 19 Nov 2009 22:35:13 GMT Server: Simple-Server/1.1 Transfer-Encoding: chunked Content-Type: text/xml; charset=UTF-8 1b0 urn:echoResponse fc41df58-b1dc-49cf-ba81-4b3b644b8224 SOAP 1.1 this time 0

BW 5.7.2 Client Request (just copy the WSDL exposed by Svc)

NOTE: no in the WSDL POST /axis2/services/WsaMappingTest.WsaMappingTestHttpSoap11Endpoint/ HTTP/1.1 Connection: close SoapAction: "urn:echo" content-type: text/xml; charset="utf-8" User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: 127.0.0.1:9091 Content-Length: 264

This is a message TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Axis2 Service Response No headers in, so no headers out

HTTP/1.1 200 OK Date: Thu, 19 Nov 2009 22:37:48 GMT Server: Simple-Server/1.1 Transfer-Encoding: chunked Content-Type: text/xml; charset=utf-8 Connection: close 103 This is a message 0 TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Coersion in BW – adding Headers Import ws-addr-wsdl.xsd and/or ws-addr.xsd, along with the right SOAP schema (v1.1 shown )depending on your needs.

Create Messages for the WSDL to include:

 wsa:MessageID

 wsa:To

 wSA:ReplyTo

 wsa:Action

 wsa:From

 wsa:RelatesTo TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Add the namespaces and :

Add entries to and : TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Populate the elements and attributes as needed:

Note: special reserved URI anonymous means that ReplyTo is effectively ignored.

http://www.w3.org/2005/08/addressing/anonymous

Here is the Output from a successful test: TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Modified BW Client SOAP Message after coercion POST /axis2/services/WsaMappingTest.WsaMappingTestHttpSoap11Endpoint/ HTTP/1.1 Connection: close SoapAction: "urn:echo" content-type: text/xml; charset="utf-8" User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: 127.0.0.1:9091 Content-Length: 1766

fc41df58- b1dc-49cf-ba81-4b3b644b8224 http://10.105.150.234:9091/axis2/services/WsaMappingTest.WsaMap pingTestHttpSoap11Endpoint/ http://www.youbetcha.com/anonymous http://www.w3.org/2005/08/addressing/anonymous urn:echo This is a message TIBCO Software Inc. – © 2009 Confidential Author: Carlo Milono

Response from Axis2 HTTP/1.1 200 OK Date: Fri, 20 Nov 2009 00:58:47 GMT Server: Simple-Server/1.1 Transfer-Encoding: chunked Content-Type: text/xml; charset=utf-8 Connection: close

1c1 urn:echoResponse fc41df58-b1dc-49cf-ba81-4b3b644b8224 This is a message 0

Recommended publications