Showing posts with label OSB. Show all posts
Showing posts with label OSB. Show all posts

Monday, 13 January 2014

SOAP UI ERROR : Test Webservice (Basic Authentication Enabled ) Fix- Use Authenticate Preemptively

ISSUE:

Unable to invoke a service with basic authentication using SOAP UI [version 4.5.1 smart bear]., In spite of passing the Authentication Details













SOAP UI LogError log
INFO:SERVHOST:PORT requires authentication with the realm 'weblogic'

ERROR:Exception in request: org.apache.http.client.ClientProtocolException

ERROR:An error occured [org.apache.http.client.ClientProtocolException], see error log for details

INFO:Error getting response for [publishCaseSOAP.publishCaseOutboundtoEAI:Request 1]; org.apache.http.client.ClientProtocolException
ERROR:org.apache.http.client.ClientProtocolException

org.apache.http.client.ClientProtocolException

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)

at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:236)

at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:345)

at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:241)


Fix:

File > preference >HTTP Settings

Tick the check box - Authenticate Preemptively

This would ensure that the it adds the authentication information to the outgoing request.



Save the changes and re-tests the application.

Ø Success- SOAP UI Log

Scheduling garbage collection every 60 seconds

Tue Jan 07 12:26:37 IST 2014:INFO:Got response for [publishCaseSOAP.publishCaseOutboundtoEAI:Request 1] in 527ms (596 bytes)



RIJOY

Monday, 2 December 2013

OSB Transformation with XSLT

Problem Statement::

· I would like to extend my current BPEL based SFDC integration flow to cater request from a newer Source application running on SAP – via OSB.

[ SAP(OSB)<====>(BPEL)<====>SFDC(salesforce) ]

· This raises a requirement of Mapping OSB incoming Message to BPEL Structre – where I would like to use familiar XSLT Transformation within OSB Flow

ProxyService - We have a Proxy Service built for SAP Application to consume and send the outbound request to middleware. – this is built out of a concrete WSDL structure

BusinessService - We have Connected this proxy to a Business Service build out a BPEL WSDL- obtained from a pre-deployed BPEL Composite application that in turn communicates with (SFDC-salesforce)



Solution:

We need to develop our XSLT file using Jdeveloper .and for this we create a dummy BPEL process say Project 1.

Download the required WSDL artifacts for transformation

· Download the OSB Proxy WSDL,this is invoked by SAP Source application, keep this handy -

http://host-name:port/myosb/SAP_SFDC_PPLPublish/ProxyService/SAPPPLPublish_PS?wsdl

· BPEL composite end point for SFDC comonent -

http://host-name:port/mysoa-infra/services/CRMASYNC/SFDCPPL_EventManager/sfdcppl_eventmanager_client_ep?WSDL



 

Connect this Dummy BPEL Service to actula intended target – which is nothing but our orginal BPEL Target Application for Salesforce



 

DO a simple XSL transform between the SAPPPLPublish_PS OSB ProxyService structure to actual target SFDCPPL_EventManager Structure. – call this as Transformation_1.xsl



 

Create a pipeline pair ,between your SAPPPLPublish_PS and Routenode SFDCPPL_EventManager.



 

Add stage1 to request pipeline pair node1.



Edit the Stage one with following Assignments

· 1st Assign the incoming content received by proxyService to inputVar – thus inputVar contains the exact payload with out <soap-env/> wrapper

-



-



· Use 2nd Assign and select XSLT Resource ,Browse and Select the XSLT Transformation_1.xsl file generated usin JdeveloperEditor,

- Use the $inputVar as the variable representing Input Document to the XSLT Transformation.

- Assign the result of this XSLT transformation to variable outputVar

· 3rd Replace everythingin body to routenode with the result of above transformation stored in outputVar

- Choose node content



Save the changes and , Activate the changes in change center.

Testing from Proxy Service and Verifying the Trace.:










Incoming Payload to OSB Proxy ServiceOutgoing Transformed Message through routnode to BPEL Service

 

Thursday, 28 November 2013

Test REST API (Http GET/POST ) - using Chrome and Mozilla Firefox Add-on Tools

The typical HTTP call with GET/POST method can be tested using Free browser based extension tools like POSTER 3.1.0 ,SOA CLIENT 2.0,HTTP Resource Test etc.

POSTER – this tool lets you make HTTP GET and POST calls on REST enabled services.

  • Open Mozilla Browser > Tools  > Add-Ons  > Extensions Search for POSTER  > Click Install.

  • You Might need to restart the browser.




  • Thereafter, to use the Installed tool ; go to Tools > Poster


Now testing a publically available sample HTTP POST Service.

Let me take a service,from https://developers.google.com/accounts/docs/AuthForInstalledApps



Here we have a basic Login API exposed by GOOGLE ,that takes in accountType and Email and Password in Request Body

            accountType=HOSTED_OR_GOOGLE&Email=YOUR_GMAIL_ID@gmail.com&Passwd=YOUR_PASSWORD

  • Click !! POST Button


Response:

A success response contains the authorization token, labeled "Auth", in the body of the response. Your application must reference this token in each request to the Google service for this user. Additional cookies, labeled "SID" and "LSID”.

Friday, 22 November 2013

OSB File Adapter

Problem Statement:

I would like to poll the files in C:poller directory successfully using OSB Proxy Service using a File poller.

Pre-requisites

We start this with creating the Poller Directory under our C: drive of windows file system as My OSB insallation is done for Windows machine.











Windows folder StructureTesting the Folder URI using Browser
 

Solution:

1. Login to OSB Console: http://localhost:7001/sbconsole

2. Follow the below step to create the File Poller OSB Project from Console called “FilePoller”



3. Create a Sub folder Called ProxyService

4. Name the Proxy Service under the Subfolder ProxyService as TestFileAdp_PS

5. Follow the configuration screen shots to complete the polling configuration.



-



-



-



-



I would want to archive the successfully polled files inside the Archive directory in my Filesystems .

I also set the frequency of polling as 6 seconds.



6. Click Next

7. Click Next

8. Save

9. Activate the Configuration going back to Change Center.

Testing

- Test by placing the file with desired extention as we have specified *.* as File Mask during configuration.

- The result should resemble the below behavior.

Wednesday, 13 November 2013

OSB Console page is not loading

On single node environment in case of issues where osb console page fails to load properly, Please carry out following Steps to understand the actual cause.

Ø

Ø Logon to Weblogic console > Deployments



Please use the following tabs after selecting a particular component

· Monitoring Tab – individually monitor the OSB deployments component

· Target Tab – correctly target to Admin server if required.

· Control Tab – Individually bounce the component.

Monday, 28 October 2013

For-each XSLT in Xquery FOR Expression | OSB FLWOR | For Iterator in Xquery Expression

Performing for-each Mapping in OSB using XQuery Expression.



Individually I am able to receive the values from source(L.H.S) Structure using below XQuery expressions:

· $body/sfd:QLIRequestElement/sfd:inRequest/sfd:LineItems/sfd:listprice/text()

· $body/sfd:QLIRequestElement/sfd:inRequest/sfd:LineItems/sfd:Quantity/text()

· $body/sfd:QLIRequestElement/sfd:inRequest/sfd:LineItems/sfd:MaterialId/text()

· $body/sfd:QLIRequestElement/sfd:inRequest/sfd:LineItems/sfd: Netunitprice/text()

In Order to Iterate over the List of LineItems,I can use the F of FLWOR Expression,which stands for FOR.

The behavior of the for clause is straight forward: it iterates over a list of Items and calculates some value for each item in that list, and returns a list obtained by concatenating the results of these calculations.

return







File: Query.xquery

<cars>
{for $i in (1,3,5,7,9) return <mycar>{$i}</mycar>}
</cars>
Output:

<?xml version="1.0" encoding="UTF-8"?>
<cars>
<mycar>1</mycar><mycar>3</mycar><mycar>5</mycar><mycar>7</mycar><mycar>9</mycar>
</cars>


Extending the above logic on XML source carrying List of <LineItems>, We need to introduce an iterator $var1 to iterateover <LineItems> having Zero or more repetition.,

And we need to return the resultant expression for each iteration in the List






<qlir:QLIRequest xmlns:qlir="http://soap.sforce.com/schemas/class/QLIRequest">

<qlir:inRequest>

<qlir:EAIHeader>

<qlir:applicationId>{$body/sfd:QLIRequestElement/sfd:eaiHeader/sfd:applicationId/text()}</qlir:applicationId>

<qlir:transactionId>string</qlir:transactionId>

<qlir:messageId>string</qlir:messageId>

<qlir:messageHistory>string</qlir:messageHistory>

<qlir:tracingId>string</qlir:tracingId>

<qlir:timeStamp>2008-09-28T18:49:45</qlir:timeStamp>

<qlir:instanceId>string</qlir:instanceId>

<qlir:timeToLive>3</qlir:timeToLive>

<qlir:payloadVersion>string</qlir:payloadVersion>

</qlir:EAIHeader>

<!--Zero or more repetitions:-->

{ for $var1 in $body/sfd:QLIRequestElement/sfd:inRequest/sfd:LineItems return

<qlir:LineItem>

<qlir:UOM>{fn:concat($var1/sfd:listprice/text(),"-", $var1/sfd:Quantity/text(),"-",$var1/sfd:MaterialId/text(),"-",$var1/sfd:Netunitprice/text())}</qlir:UOM>

</qlir:LineItem>

}

<qlir:Quote_refnum>{$body/sfd:QLIRequestElement/sfd:inRequest/sfd:ObjectId/text()}</qlir:Quote_refnum>

</qlir:inRequest>

</qlir:QLIRequest>


Analyze the result:



In fact I have replaced the entire body replace with an XML template containing Xquery Expressions.You may try a different approach of generating an XSLT using Jdeveloper and user XSLT resources to map.

Alternately you can create an XQuery( .xq )mapper file out of Eclipse with OEPE Plug-in for OSB.

Friday, 25 October 2013

OSB Dashboard Monitoring | OSB Service Health

OSB Dashboard Monitoring.

In order to Monitor your Deployed Services and get their statistics in tabular format ,you would need to enable the monitoring in your Proxy service and Business services.

  • Project Explorer >> Select  your <proxy_service>  >> Operational Settings >> Monitoring >> Enable Pipeline Monitoring

  • Save and Activate your Changes




  •  Project > Select your <business_service>  >> Operational Settings  >> Monitoring   >> Enable Pipeline Monitoring

  • Save and Activate your Changes.




OSB Dashboard Monitoring helps to monitor the health of the Deployed Services like the Proxy Services[that does the Routing and Validation] and the Business Services[configured against External end Systems].

This information can be gathered using Service Health Tab under Operations > Dashboard > Service Health



The below Statistics shows:

Average Response Time – The average response time associated with each service deployed.

Messages – the Total count of messages that is inbound to proxy and outbound from Business Service.

Error – Count of Error Transactions.

Status of End Point – whether Online/Offline



 

Thursday, 17 October 2013

Parsing XML element with Attribute names,using XPath in OSB

Parsing XML element with Attribute names,using XPath in OSB ,Say <Element_01 Name="attribute"></Element_01>

<?xml version="1.0" encoding="UTF-8"?>
<?CRM-Property-Set EscapeNames="false"?>
<CRMMessage MessageId="Rhombus_31275" IntObjectFormat="CRM Hierarchical" MessageType="Integration Object" IntObjectName="RCRM Interface Activity External">
<RCRMInterface InterfaceEvent="Insert" SenderSysUID = "Rhombus_Alert_123158" SenderSys = "Rhombus" TransmitTime = "10/03/2013 11:35:19" ReceiverSys="MyCompany CRM" ReceiverSysUID="">

</RCRMInterface>
</CRMMessage>

Solution

· Receive the message in body variable.

·To extract: 123158

Xpath:

  • $body/RCRMInterface/Object/InterfaceActivity/Element_01[@Name="AlertId"]/text()

  • $body/RCRMInterface/Object/InterfaceActivity/Element_01/text()


· To extract Same with tag name: <Element_01 Name="AlertId">123158</Element_01>

Xpath:

  •  $body/RCRMInterface/Object/InterfaceActivity/Element_01

Using fn-bea:inlinedXML in OSB to parse XML Text

Using  fn-bea:inlinedXML in OSB to parse XML Text

fn-bea:inlinedXML in OSB

Consider a scenario where in you expect an XML String from the target application.

In case you find it challenging to use the Xpath to parse the XML string and retrieve value from a particular node the, Xquery function fn-bea:inlinedXML in OSB may be used to Parses textual XML and returns an instance of the XQuery 1.0 Data Model.In simple terms ,parse from xml string to xml Element that can be processed by the parser.

A working example is shown below, where I receive an XML String from end system $body,which is converted to an XML object,using the fn-bea:inlinedXML.Just make sure that your XML string is valid with proper tags and namespace declaration.



[caption id="attachment_199" align="alignnone" width="620"]image0011 OSB Assign Statement[/caption]






image0022

Once done the Xpath expression can be applied on $MyVar for Parsing the DOM Structure.
Ø $MyVar/RCRMInterface/Object/InterfaceActivity/ActivityID/text()

-Ritz

Friday, 4 October 2013

OSB automatic lock issue: ConfigFwk:390105

Having encountered this issue in DEV, thought of sharing the same:

OSB automatic lock issue: ConfigFwk:390105

When developing some services in the OSB from Eclipse or directly from  the sbconsole. ,You get below error while activating your changes to the session
[ConfigFwk:390105]Unable to create WLS change list due to a short term automatic lock obtained by user weblogic. The user has no pending changes and the lock will expire in -1.311.836.889 seconds. Please try again after the lock has expired.

As per online blog:To resolve the issue go to your middelware/domain directory (eg user_projects/domains/osb_domain) and remove or rename the *.lok files. (close your weblogic server first of course)



· Alternate option: Tried this and worked

Issue:



Resolution:

· Check your Weblogic for any existing Activated session,if yes please Activate changes .


· Try again to Activate the OSB session

RIJOY

OSB Message Report : The server encountered an unexpected condition which prevented it from fulfilling the request.

ISSUE: osbconsole>Operations > Message Reports

console exception

Unable to retrieve OSB reporting data on osb console:


Message : The server encountered an unexpected condition which prevented it from fulfilling the request.

Possible cause:

· By default, the Oracle Service Bus JMS reporting provider is deployed in an Oracle Service Bus domain. The reporting provider uses a database to persist reporting data. This is specified under the DataSource wlsbjmsrpDataSource

· Check whether the Datasource os properly targeted to a running server/Adminserver.

· Use the Testing Tab to check whether the database connection specified by dataSource.



In case the test fails:

· Navigate to Weblogic console path for wlsbjmsrpDataSource

· Home >Summary of Servers >Summary of JDBC Data Sources >wlsbjmsrpDataSource

· Manually bounce the instances of this datasource using Shut down followed by Start



Ensure the start is complete and test the data source connection: Once test is successful..



Check the Reports on osb console by Navigating to Operations > Message Reports..You should be able to find the Summary of Message Report screen coming up now.



RIJOY

Thursday, 19 September 2013

OSB - returns java.lang.NullPointerException while using https

OSB Issue:

While invoking Services through https , returns General runtime error: java.lang.NullPointerException witherrorCode BEA-380000

Issue:











ISSUE: trying to perform Salesforce login servicehttps://www.salesforce.com


<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>General runtime error: java.lang.NullPointerException</con:reason>
<con:location>
<con:node>RouteTo_XtraBusinessService</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>


FIX

Driven by the information on Oracle forum https://forums.oracle.com/thread/2266873,where the exception shown resembles closely with Java.lang.NullPointerException in our PROD environment(attached .jpg)

Forum briefly Says:

[OSB] "SSL renegotiation" issue during HTTPS web service invocation
After some time debugging, I have found that the origin of the NPE is the "Use JSSE SSL" that I had selected in the OSB configuration. After uncheck this option, the test goes succesfull against the simulated server.


I did a comparison between Blue –Lite and Prod on Weblogic server, to find our PROD Weblogic SSL configuration has ”Use JSSE SSL” option activated.Can we un-check this and re-try our https invocation.

Enable and Disable JSSE-Based SSL for WebLogic Server from the Administration Console

· You can enable the JSSE-based SSL implementation through the Administration Console, on the

· Environment > Servers > ServerName > Configuration > SSL > Advanced page. This affects both outbound and inbound SSL connections.

· You then need to restart SSL on the Environment > Servers > ServerName > Control > Start/Stop page.



RIJOY

Tuesday, 3 September 2013

Enabling/Disabling the interface

Fallback Rollback requirements, OSB Enabling/Disabling the interface



In case of Fallback requirements, Enabling/Disabling the interface should be pretty easy on OSB console,by using the Project Explorer:

Select your Proxy Service:

Choose the Operational settings TAB, uncheck the tick mark to Disable the State.

And you better do a testing from test console…J

Tuesday, 25 June 2013

OSB Tricks...

Fallback Rollback requirements, OSB Enabling/Disabling  the interface

 

 

In case of Fallback requirements, Enabling/Disabling the interface should be pretty easy  on OSB console,by using the Project Explorer:

  • Select your Proxy Service:

  • Choose the Operational settings TAB, uncheck the tick mark to Disable the State.

  • And you better do a testing from test console…J