Tuesday, December 20, 2016

WSWS3581E: Error: PortType operation has no corresponding binding

WSWS3581E: Error: PortType operation has no corresponding binding


Technote (troubleshooting)

Problem(Abstract)

WSWS3574E: ---------- FATAL ERRORS ENCOUNTERED ----------
GENERATION OF ARTIFACTS HAS BEEN SUSPENDED.

Symptom

The details of the error looks like the following:

WSWS3574E: ---------- FATAL ERRORS ENCOUNTERED ----------
GENERATION OF ARTIFACTS HAS BEEN SUSPENDED.
See messages to follow for more details.
WSWS3581E: Error: PortType operation has no corresponding binding
operation: name = operationXYZ, input name = operationXYZRequest, output
name
= operationXYZResponse

Cause

If you have a WSDL file with some operations and its web service bindings
created by a software other than WebSphere Integration Developer such as
Rational Application Developer and import it into WebSphere Integration
Developer, you may encounter fatal error when you add a new operation from

WebSphere Integration Developer and generate web service export with this
interface.
The root cause is due to that the WSDL file is maintained differently in
Rational Application Developer (potentially other software as well) and
WebSphere Integration Developer:
1. Rational Application Developer uses one WSDL file to maintain a WSDL
definition.
2. WebSphere Integration Developer uses two WSDL files to maintain a WSDL
definition, one for WSDL message (interface) and another for WSDL service
and binding information.
This will cause problem when a web service WSDL is created in Rational
Application Developer and modified in WebSphere Integration Developer.
When adding new operation into a WSDL, WebSphere Integration Developer
just generates WSDL message information, and the binding information will
only be generated when WebSphere Integration Developer generates a Web
Service Export in the Assembly Editor. The WSDL binding information will
always be generated in a new WSDL file because this way we can use same
WSDL interface to generate different Web Service Exports at different places.
Writing WSDL binding information in the same file as the WSDL message is
not how WebSphere Integration Developer/WebSphere Process Server
maintain the binding information.
Diagnosing the problem
Open the original WSDL file and look for the binding information enclosed by
the <wsdl:binding> tags. You will find that the operations generated in
WebSphere Integration Developer will not have its binding information inside
these binding tags.
Resolving the problem
If you get the error after generating a Web Service Export for this WSDL,
modify the original WSDL file generated by Rational Application Developer.
Remove the Web Service Export created in WebSphere Integration Developer.
Remove all <wsdl:binding> and <wsdl:service> information generated by
Rational Application Developer and recreate the Web Service Export in
WebSphere Integration Developer. The new binding information will be
generated automatically when the new Web Service Export component is
created in WebSphere Integration Developer. You will see an additional WSDL
file named XYZExport.wsdl which contains the binding information for each
operation being created.

If this WSDL is used as Web Service Import in WebSphere Process Server,
after adding new operation in WebSphere Integration Developer, select
WebSphere Integration Developer -> Business Integration -> Module Name ->
Web Service Port, right click on the WSDL and select Open With -> WSDL
Editor, Right click on the Binding icon (the square icon between the service
and the interface), and select Generate Binding Content to regenerate binding
information.
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list
of IBM trademarks is available on the Web at "Copyright and trademark
information" at www.ibm.com/legal/copytrade.shtml.

Software

http://www.eclipse.org/

Isolation Level

http://www-01.ibm.com/support/docview.wss?uid=nas8N1012999

Issue : 127 records

http://javapapers.com/java/java-integer-cache/
http://stackoverflow.com/questions/20541636/compare-non-primitive-long-values-127-and-128
http://stackoverflow.com/questions/1700081/why-does-128-128-return-false-but-127-127-return-true-when-converting-to-integ

Since java.lang.String class override equals method, It return true if two String object contains same content but == will only return true if two references are pointing to same object.

Tuesday, October 25, 2016

SQL Quaries

commonj.sdo.DataObject __smo = (commonj.sdo.DataObject)smo;
 int tableSize=0;

try {

Context ctx = new InitialContext();
DataSource ds = (javax.sql.DataSource) ctx.lookup("jdbc/PIMS.Oracle.DS");
Connection conn = ds.getConnection();
String sql = "SELECT PIMS.SEQ_T_OB_EDI_315.nextVal from dual";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);

while (rs.next()) {
tableSize = rs.getInt(1);
   __smo.getDataObject("context").getDataObject("transient").setInt("tableSize", tableSize);

}

}
catch(Exception ex){
CommonLogger.error("---error while getting Max TID in EDI315InboundMF module from Oracle T_OB_EDI_315----"+ex.getMessage());
}

out.fire(__smo);



1.SELECT PIMS.SEQ_T_OB_EDI_315.nextVal from dual

If you have sequencing imposed and you want to get next value use this.

2. Go the BO and then to application info and then right click and go to new and then select UID.

And then give schemaname.sequencename.
EX: PIMS.SEQ_T_OB_EDI_315




3.SELECT MAX(TID) FROM PIMS.T_OB_EDI_315

to get max value of a column from a table 


Wednesday, September 14, 2016

JDBC Adapter

http://www.ibm.com/support/knowledgecenter/SSFTBX_8.5.5/com.ibm.wsadapters.jca.jdbc.doc/doc/srjdb_outoperations.html

http://www-01.ibm.com/support/knowledgecenter/SSTLXK_8.5.0/com.ibm.wsadapters.jca.jdbc.doc/doc/cbp_jdb_intro.html?cp=SSTLXK_8.5.0&lang=en


With IBM® WebSphere® Adapter for JDBC, you can create integrated applications that can interact and exchange information with a database. By using the adapter, an application can send requests to the database, as well as receive events from the database, often without the need for SQL code.
The adapter enables two-way communication between an application running on IBM Business Process Manager or WebSphere Enterprise Service Bus and a database. Using the adapter, an application can send requests to read, create, modify, or delete data in a database, often without writing any SQL code. To process requests received from an application, the adapter updates the database tables using SQL queries or stored procedures. An application can also receive events from the database, for example, it can be notified that specific database tables are updated. To process events that result from changes to the database, the adapter delivers events to an application. Using event notification, updates to the database can be automatically propagated to other applications. By combining event processing by IBM WebSphere Adapter for JDBC and another adapter, updates can be automatically propagated to enterprise applications such as Siebel, PeopleSoft, and Oracle.
The adapter provides a standard interface that integrates with diverse database software vendors and versions; it supports any database server with a Java™ Database Connectivity (JDBC) driver that supports the JDBC 2.0 or later specification. The JRE version required by the JDBC driver must be lower than or equal to the JRE version in the runtime environment. Examples of such servers include IBM DB2®, Oracle, Microsoft SQL Server, Sybase, Derby, and Informix®. The adapter uses business objects to exchange data between the application and the database, so the application does not need to use the JDBC application programming interface (API). Business objects are containers for application data that represent business functions or elements, such as a database table or the result of an SQL query. The adapter understands the data format provided by the application, and can process the data, perform the operation, and send the results back in that format.