Mashup .2 calling services from WSAS 2.0 Works but not WSAS 2.1

sveesible1's picture

We have successfully deployed the mashup server v.2 and created mashups that point to services deployed on the same server running WSAS 2.0.

This configuration works fine and we are able to pull back results to our mashup TRY IT and mashup screens. However, we upgraded our WSAS to 2.1 and now we only get (null) response when using TRY IT and our screens go through the OnError response method.  Our URL endpoints are identical, but a Trace on the WSAS 2.1 shows no access attempts, so it seems that the mashup service is not even reaching the endpoint on the wsas 2.1 side.

The only difference that we can see between the 2.0 and the 2.1 release is in the WSDL files, where 2.1 seems to no longer include an addressing namespace value in the input element within the operation element

2.0 wsdl
<wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="ns0:getTicketsRequest" wsaw:Action="urn:getTickets"/>

 


2.1 wsdl same line
 <wsdl:input message="ns0:getOracleHDTicketsRequest" wsaw:Action="urn:getOracleHDTickets"/>

 

Thanks

keith's picture

HI, Its nice o hear that you

HI, Its nice o hear that you are using the mashup Server. The Mashup Server is build on top of WSAS and the 0.2 version uses WSAS 2.1-RC6 internally (The delta betwwen 2.1 RC6 and 2.1 release was very small). You can access the WSAS admin console from within the mashup server itself at https://localhost:7443/wsasadmin. Can you try deploying your services on the mashup server itself (Just drop your services into the services directory). Just check whether the wsaw namespace prefix is declared at the top of the WSDL itself, if it is then these lines are equivelent. As users of the Mashup Server we will like to know your experiance in using it, is there anything that you will like us to tune. Thanks, Keith.    
keith's picture

You can use TCP Monitor to capture the request/response

Can you also try the service using the http endpoint and get your request to go through tcp monitor so that you can see the actual request and response. You can do this by, 1. Open up tcp monitor and set the target port to 7662 and the listen port to 7663   2. Go to the tryit page of your service 3. Click on Try an alternate http endpoint. (Whcih is in the choose endpoint section) 4. Change the port your request goes to (Assuming that you havent changed the original port of 7662), for example 7663 5. Now try the service 6. Check the request and response on TCP monitor   This should show you whether the request was sent by the mashup server and help you diagnose the problem. Thanks, Keith.    
sveesible1's picture

TCP Mon goes blank

Here is our configuration:  Mashup .2  running independantly pointing at 4 custom data services deployed on WSAS 2.0 Which works as expected: Now we stop WSAS2.0 and copy our data services to a deployment of WSAS 2.1 on the exact same ports and server Mashup server will no longer communicate or send data to the WSAS2.1. TCP Mon looks like it's getting a request but it's hanging and no data is getting processed.
jonathan.wso2.com's picture

Hmmm

What resources might the Mashup Server be accessing on the WSAS installation?  WSDL? stubs?  Or are you just using WSRequest to access the data services?
sveesible1's picture

Here's our mashup code

We are just pointing the WSRequest at the same endpoint(highlighted). Both WSAS instances return the same results using their built in try-it.  GetCustomerInvoices.documentation = ""; GetCustomerInvoices.inputTypes = {"customer_number" : "number"}; GetCustomerInvoices.outputType = "xs:anyType"; function GetCustomerInvoices(customer_number) { var customerReq = new WSRequest(); var options = new Array(); options["useSOAP"] = "1.2"; options["useWSA"] = "1.0"; options["action"] = "http://171.17.10.62:9762/services/Oracle_prod_11i"; var request = <GetCustomerInvoices> <customer_number>{customer_number}</customer_number> </GetCustomerInvoices>; var result; try { customerReq.open(options,"http://171.17.10.62:9762/services/Oracle_prod_11i", false); customerReq.send(request); result = customerReq.responseText; print ("result: \n" + result); return result; } catch (e){ print(e); return e; } } toString.documentation = "TODO: Add operation level documentation here" ; toString.inputTypes = { /* TODO: Add input types of this operation */ }; toString.outputType = "String"; /* TODO: Add output type here */ function toString() { //TODO: Add function code here return "Hi, my name is oracleCustomerInvoice"; }
jonathan.wso2.com's picture

Can I see the WSDLs?

Two things look strange to me, but neither fatally so.  One is the action format I'm used to seeing from data services (mine run within the Mashup Server, but it's WSAS 2.1 underneath).  I'm used to seeing something like "urn:GetCustomerInvoices" (though I did file a bug a while back to use actions more like the ones you specify.  The other is that the <GetCustomerInvoices> element isn't namespaced, which differs from the data services I've seen, which usually put elements in the namespace  http://ws.wso2.org/dataservice. As a result I suspect that some of the metadata for the service may have changed between versions (subtle WSDL changes) and while each try-it works because they are using internally consistent metadata, the implied metadata in your mashup might be out of sync.  There appear to be some issues in generating the WSDL for the data service too - I found some inconsistencies between the description and the runtime behavior earlier today. However, I'm not a data services expert, and trying to reproduce your issue with these two things in mind didn't work.  My test service worked regardless of whether I inserted the namespace or not, and without the action in the urn form, I got a meaningful exception in the log.  In neither case did the response disappear.  Inserting tcpmon in between the mashup and dataservice produced meaningful logs. Perhaps there's something else subtle in the WSDL though.  Could I see the WSDL 2.0 documents that are exposed by WSAS 2.0 and WSAS 2.1 for the service?  
sveesible1's picture

Tuning

Keith, We have been working with .2 release and appreciate all of the work you and the team have done to make this very interesting and useful toolkit.  We did have a few questions about functionality.  1. We were having difficulty with the xml parsing API as far as browser compatibility and speed. We have written an external servlet that combines several mashup views into one view, and we then have to use the xml parsing api to handle the messages from each. It would be really useful and time saving if the process that returns the xml, would pre-parse it into json objects of some sort. We could bypass a lot of error handling and problems with embedding the xml parsing api. 2. I spoke with Jonathan in Las Vegas a few months back about the possibilty of a generic portlet implementation that would allow us to create mashups and expose them through a Liferay portlet, where we can leverage the built in access control mechanisms that the portal automatically provides. We have a lot of interesting data we would like to expose and mashup, however a good chunk of that information needs secure access controls. Thanks, -Brad
sveesible1's picture

WSDL2

WSDL for WSAS 2.0 <wsdl2:description targetNamespace="http://ws.wso2.org/dataservice"> <wsdl2:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://ws.wso2.org/dataservice"> <xs:element name="GetCustomerInvoices"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="customer_number" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="invoices"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="invoice" nillable="true" type="ns:invoice"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="invoice"> <xs:sequence> <xs:element minOccurs="0" name="customerNumber" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="invoiceNumber" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceMonth" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceDay" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceYear" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="ReceiptAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="AmountAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="AmountDueRemaining" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="BillingModel" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="SalesRegion" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceDate" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl2:types> <wsdl2:interface name="ServiceInterface"> <wsdl2:operation name="GetCustomerInvoices" pattern="http://www.w3.org/ns/wsdl/in-out"> <wsdl2:input element="ns0:GetCustomerInvoices" wsaw:Action="urn:GetCustomerInvoices"/> <wsdl2:output element="ns0:invoices" wsaw:Action="urn:GetCustomerInvoicesResponse"/> </wsdl2:operation> </wsdl2:interface> <wsdl2:binding name="Oracle_prod_11iSOAP11Binding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.1"> <wsdl2:operation ref="tns:GetCustomerInvoices" wsoap:action="urn:GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:binding name="Oracle_prod_11iSOAP12Binding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.2"> <wsdl2:operation ref="tns:GetCustomerInvoices" wsoap:action="urn:GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:binding name="Oracle_prod_11iHttpBinding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/http"> <wsdl2:operation ref="tns:GetCustomerInvoices" whttp:location="Oracle_prod_11i/GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:service name="Oracle_prod_11i" interface="tns:ServiceInterface"> <wsdl2:endpoint name="SecureSOAP11Endpoint" binding="tns:Oracle_prod_11iSOAP11Binding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 11 binding over a HTTPS </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SecureSOAP12Endpoint" binding="tns:Oracle_prod_11iSOAP12Binding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 12 binding over a HTTPS </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SecureHTTPEndpoint" binding="tns:Oracle_prod_11iHttpBinding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation>This endpoint exposes a HTTP binding over a HTTPS</wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SOAP11Endpoint" binding="tns:Oracle_prod_11iSOAP11Binding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 11 binding over a HTTP </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SOAP12Endpoint" binding="tns:Oracle_prod_11iSOAP12Binding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 12 binding over a HTTP </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="HTTPEndpoint" binding="tns:Oracle_prod_11iHttpBinding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation>This endpoint exposes a HTTP binding over a HTTP</wsdl2:documentation> </wsdl2:endpoint> </wsdl2:service> </wsdl2:description>     WSDL for WSAS 2.1 <wsdl2:description targetNamespace="http://ws.wso2.org/dataservice"> <wsdl2:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://ws.wso2.org/dataservice"> <xs:element name="GetCustomerInvoices"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="customer_number" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="invoices"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="invoice" nillable="true" type="ns:invoice"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="invoice"> <xs:sequence> <xs:element minOccurs="0" name="customerNumber" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="invoiceNumber" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceMonth" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceDay" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceYear" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="ReceiptAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="AmountAmount" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="AmountDueRemaining" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="Currency" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="BillingModel" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="SalesRegion" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="InvoiceDate" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl2:types> <wsdl2:interface name="ServiceInterface"> <wsdl2:operation name="GetCustomerInvoices" pattern="http://www.w3.org/ns/wsdl/in-out"> <wsdl2:input element="ns0:GetCustomerInvoices" wsaw:Action="urn:GetCustomerInvoices"/> <wsdl2:output element="ns0:invoices" wsaw:Action="urn:GetCustomerInvoicesResponse"/> </wsdl2:operation> </wsdl2:interface> <wsdl2:binding name="Oracle_prod_11iSOAP11Binding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.1"> <wsdl2:operation ref="tns:GetCustomerInvoices" wsoap:action="urn:GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:binding name="Oracle_prod_11iSOAP12Binding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.2"> <wsdl2:operation ref="tns:GetCustomerInvoices" wsoap:action="urn:GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:binding name="Oracle_prod_11iHttpBinding" interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/http"> <wsdl2:operation ref="tns:GetCustomerInvoices" whttp:location="Oracle_prod_11i/GetCustomerInvoices"/> </wsdl2:binding> <wsdl2:service name="Oracle_prod_11i" interface="tns:ServiceInterface"> <wsdl2:endpoint name="SecureSOAP11Endpoint" binding="tns:Oracle_prod_11iSOAP11Binding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 11 binding over a HTTPS </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SecureSOAP12Endpoint" binding="tns:Oracle_prod_11iSOAP12Binding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 12 binding over a HTTPS </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SecureHTTPEndpoint" binding="tns:Oracle_prod_11iHttpBinding" address="https://171.17.10.62:9444/services/Oracle_prod_11i"> <wsdl2:documentation>This endpoint exposes a HTTP binding over a HTTPS</wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SOAP11Endpoint" binding="tns:Oracle_prod_11iSOAP11Binding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 11 binding over a HTTP </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="SOAP12Endpoint" binding="tns:Oracle_prod_11iSOAP12Binding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation> This endpoint exposes a SOAP 12 binding over a HTTP </wsdl2:documentation> </wsdl2:endpoint> <wsdl2:endpoint name="HTTPEndpoint" binding="tns:Oracle_prod_11iHttpBinding" address="http://171.17.10.62:9762/services/Oracle_prod_11i"> <wsdl2:documentation>This endpoint exposes a HTTP binding over a HTTP</wsdl2:documentation> </wsdl2:endpoint> </wsdl2:service> </wsdl2:description>
sveesible1's picture

they are identical btw

wsdl files are identical it appears, for both wsdl2 and wsdl1.  I have moved the mashup to another server and am going to attempt the tcpmon again.
keith's picture

Hi Brad,   Nice to hear

Hi Brad,   Nice to hear that you are making good use of the tollkit we expose. Thank you for the valuable feedback. If you want json responses with the 0.2 release you can follow the instrustions given in the following post. http://wso2.org/forum/thread/2883#comment-4662. This module was added post 0.2 and will be available by default in the next release of the mashup server. Also we are doing a complete restructure of the UI and these developements are happing in the trunk currently. These changes will go in the our next release.   Thanks, Keith.  
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)