Thursday, October 19, 2017

WebService TitBits - 4

A service groups a set of related ports together:
< wsdl : definitions .... >
    < wsdl :  service name="nmtoken " > *
        < wsdl : port .... / > * 
    < / wsdl : service >
< / wsdl : definitions >
The name attribute provides a unique name among all services defined within in the enclosing WSDL document.
Ports within a service have the following relationship:
  • None of the ports communicate with each other (e.g. the output of one port is not the input of another).
  • If a service has several ports that share a port type, but employ different bindings or addresses, the ports are alternatives. Each port provides semantically equivalent behavior (within the transport and message format limitations imposed by each binding). This allows a consumer of a WSDL document to choose particular port(s) to communicate with based on some criteria (protocol, distance, etc.).
  • By examining it's ports, we can determine a service's port types. This allows a consumer of a WSDL document to determine if it wishes to communicate to a particular service based whether or not it supports several port types. This is useful if there is some implied relationship between the operations of the port types, and that the entire set of port types must be present in order to accomplish a particular task.

WebService TitBit - 3

Difference between Source.Mode.Message and Source.Mode.Payload .

Both are enum vars representing mode of  response .
Message

Operates directly with the entire message. For example, if a SOAP binding is used, then the entire SOAP envelope is accessed.

Payload

Operates on the payload of a message only. For example, if a SOAP binding is used, then the SOAP body is accessed.

For more details  >>

https://docs.oracle.com/cd/E17904_01/web.1111/e13734/provider.htm#WSADV559

which encoding style are acceptable by ws-basic profile  1.1 ?
 RPC-literal and Document literal 

for more details  >>

https://www.ibm.com/support/knowledgecenter/SSFTBX_8.5.7/com.ibm.wbpm.wid.integ.doc/access/topics/rwsdlstyle.html

# Types of XML signature  :

1) Eneveloping  Sign


.....

Signature will contain the object 

2) Eneveloped Sign 

.......
Signature will be eneveloped inside object 


3) Detached  

Signature will be  outside the document containing or referring data URL

Data to be signed is accessible through the Ref URI .

for more info check out >> https://www.ibm.com/support/knowledgecenter/en/SS3JSW_5.2.0/com.ibm.help.svcs_adpts_m_z.doc/XML_Dig_Sig_svc.html

Wednesday, October 11, 2017

WebService TitBit - 2

SAAJ.jar API that was available  externally before  ... has been integrated with JDK 1.6 . 
However higher releases are still available  outside .

Difference between Endpoint and EndpointReference 
Endpoint is the URL where your service can be accessed.
EndPointReference is a reference to itself.
check out here >> https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.0.0/com.ibm.websphere.nd.doc/info/ae/ae/twbs_wsa_eprs_jaxws.html
EPR is mostly used  locally by a WebService.

Why WS-Addressing is needed ?

It is a transport neutral way to address WebService  For more info  check out  on web .

How to generate Faults  in SOAP ?
There are two types of SOAP faults  .
1) modeled - Exception are mapped to WSDL:fault tag
2) Unmodeled - Run time exceptions SOAPFaultException and RuntimeException messages are returned

Tuesday, October 3, 2017

WebService TitBit- 1

Difference between SOAP 1.1 and 1.2 

SOAP 1.1 technically allows XML elements
to occur after the SOAP body. In SOAP 1.2, by contrast, the SOAP body is the last XML
element in the SOAP envelope.

The 1.1 version binds SOAP
to HTTP transport, whereas the 1.2 version also supports SOAP over SMTP.

Thursday, September 14, 2017

Common terms in Web services

JAXB - API for XML Binding
JAXP - API for XML Processing
JAXM - API for XML Messaging
JAXR - API for XML Registries
JAX RPC - API for XML Remote Procedure Call
JAX TX - API for XML Transactions
JAAS- Java Authentication and Authorization Services 
JAF - Java Beans Activation Framework
JNDI- Java Native and Directory Interface
UDDI - Universal Description and Discovery Integration
WSDL - Web Service Description Language 
SOAP - Simple Object Access  Protocol
JSON - Java Script Object Notation
SAAJ- SOAP with Attachments for Java.


JAX WS ( API ) ( Metro = implementation ) ( requires WSDL ) 
JAX RS ( API ) ( Jersey = implementation ) 

Web service concept was developed to  remove short comings of  EJB .
An EJB can be also be deployed as  Web Service .

Since Java 1.6, there's a built-in HTTP server included with the JDK.
The HttpServer provides a simple high-level Http server API, which can be used to build embedded HTTP servers.
Endpoint.publish  accepts requests from a webservice  at a port at the same HTTP server .
for more into check out 

Thursday, August 24, 2017

Long Data types in DB

The use of LONG values is subject to these restrictions:
  • A table can contain only one LONG column.
  • You cannot create an object type with a LONG attribute.
  • LONG columns cannot appear in WHERE clauses or in integrity constraints (except that they can appear in NULL and NOT NULL constraints).
  • LONG columns cannot be indexed.
  • LONG data cannot be specified in regular expressions.
  • A stored function cannot return a LONG value.
  • You can declare a variable or argument of a PL/SQL program unit using the LONG data type. However, you cannot then call the program unit from SQL.
  • Within a single SQL statement, all LONG columns, updated tables, and locked tables must be located on the same database.
  • LONG and LONG RAW columns cannot be used in distributed SQL statements and cannot be replicated.
  • If a table has both LONG and LOB columns, then you cannot bind more than 4000 bytes of data to both the LONG and LOB columns in the same SQL statement. However, you can bind more than 4000 bytes of data to either the LONG or the LOB column.
In addition, LONG columns cannot appear in these parts of SQL statements:
  • GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
  • The UNIQUE operator of a SELECT statement
  • The column list of a CREATE CLUSTER statement
  • The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
  • SQL built-in functions, expressions, or conditions
  • SELECT lists of queries containing GROUP BY clauses
  • SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators
  • SELECT lists of CREATE TABLE ... AS SELECT statements
  • ALTER TABLE ... MOVE statements
  • SELECT lists in subqueries in INSERT statements



Tuesday, August 22, 2017

Difference between trustStore and keyStore

TrustManager determines whether remote connection should be trusted or not

·         trustStore is for client  to validate the  authenticity of  web server .
·         It holds public key provided by the web server . 
·         trustStore is used by TrustManager in Java
·         -Djavax.net.ssl.trustStore to specify path for trustStore in Java.




keystore decides which  authentication credentials should be sent to the remote host for authentication during SSL handshake

·         It hold the private key used by Web server to encrypt the messages send to Clients.
·         keyStore is used by keyManager in java.
·         -Djavax.net.ssl.keyStore is path to specify keystore in Java