Saturday, 20 February 2016

SOA Interview Questions : Service Oriented Architecture Interview Questions Part 3


What is WSDL ?

The Web Services Description Language (WSDL) is an XML-based interface definition language that is used for describing the functionality offered by a web service. The WSDL provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.


Can you write a sample WSDL ?

<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="tns:https://www.DemoService.test" xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="tns:https://www.DemoService.test" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<!-- Abstract type -->
  <types>
    <xsd:schema targetNamespace="tns:https://www.DemoService.test/types" elementFormDefault="qualified"/>
  </types>

<!-- Abstract Message -->
  <message name="NewMessage">
    <part name="in" element="xsd:any"/>
  </message>
  <message name="NewReturnMessage">
    <part name="return" element="xsd:any"/>
  </message>

<!-- Abstract Port Type -->
  <portType name="DemoServicePortType">
    <operation name="NewOperation">
      <input message="tns:NewMessage"/>
      <output message="tns:NewReturnMessage"/>
    </operation>
  </portType>

<!-- Concrete Binding with SOAP-->
  <binding name="DemoServiceBinding" type="tns:DemoServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="NewOperation">
      <soap:operation style="document" soapAction="tns:https://www.DemoService.test/NewOperation"/>
      <input>
        <soap:body use="literal" parts="in"/>
      </input>
      <output>
        <soap:body use="literal" parts="return"/>
      </output>
    </operation>
  </binding>

<!-- Concrete Service location-->
  <service name="DemoService">
    <port name="DemoServicePort" binding="tns:DemoServiceBinding">
      <soap:address location="http://www.example.com"/>
    </port>
  </service>

</definitions>


How are different Elements of WSDL related ?

This can be understood by below representation





Explain different versions of WSDL standards ?

The current version of the specification is 2.0; version 1.1 has not been endorsed by the W3C but version 2.0 is a W3C recommendation.





Explain elements/tags of WSDL ?


WSDL 1.1 Term
WSDL 2.0 Term
Description
Service
Service
Contains a set of system functions that have been exposed to the Web-based protocols.
Port
Endpoint
Defines the address or connection point to a Web service. It is typically represented by a simple HTTP URL string.
Binding
Binding
Specifies the interface and defines the SOAP binding style (RPC/Document) and transport (SOAP Protocol). The binding section also defines the operations.
PortType
Interface
Defines a Web service, the operations that can be performed, and the messages that are used to perform the operation.
Operation
Operation
Defines the SOAP actions and the way the message is encoded, for example, "literal." An operation is like a method or function call in a traditional programming language.
Message
n/a
Typically, a message corresponds to an operation. The message contains the information needed to perform the operation. Each message is made up of one or more logical parts. Each part is associated with a message-typing attribute. The message name attribute provides a unique name among all messages. The part name attribute provides a unique name among all the parts of the enclosing message.
Messages were removed in WSDL 2.0, in which XMLschema types for defining bodies of inputs, outputs and faults are referred to simply and directly.
Types
Types
Describes the data. The XML Schema language (also known as XSD) is used (inline or referenced) for this purpose.


What are  different types of WSDL ?
There are two types of WSDL
1.       Concrete WSDL
Abstract WSDL 


Can you define types of  WSDL ?

 Abstract WSDL contains only Types, Messages and Operations. Abstract WSDL is used by server side components programming.

Concrete WSDL contains all elements of WSDL, such as Types, Messages, Operations , Binding and Service transport specific information (JMS or Http). This is used by client side components. 





Refer Previous post on Interview questions at

1. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service.html

2. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 2

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_16.html

Friday, 19 February 2016

weblogic server Error - ORA-00257: archiver error. Connect internal only, until freed

ORA-00257: archiver error. Connect internal only, until freed


Recently I was trying to open Oracle Service bus console, it was not opening. Then I logged into Weblogic console, where inside server tab, all Managed Servers and Admin server was in Warning state.

With curiosity I wanted to know, what is wrong with the servers. so I opened the weblogic server logs. In the logs the below content was repeatedly written


Error

Feb 19, 2016 2:21:00 AM oracle.security.jps.internal.idstore.util.LibOvdUtil pushLdapNamesToLibOvd
INFO: Pushed ldap name and types info to libOvd. Ldaps : DefaultAuthenticator:idstore.ldap.provideridstore.ldap.
[EL Severe]: ejb: 2016-02-19 02:21:00.467--ServerSession(1545095313)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.

Error Code: 257
[EL Severe]: ejb: 2016-02-19 02:21:00.546--ServerSession(1545095313)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.

Error Code: 257
[EL Severe]: ejb: 2016-02-19 02:21:00.62--ServerSession(1545095313)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.

Error Code: 257
Feb 19, 2016 2:21:00 AM oracle.security.jps.internal.config.OpssCommonStartup start
INFO: Jps startup failed.
<Feb 19, 2016 2:21:00 AM MST> <Error> <Security> <BEA-090892> <The loading of an OPSS java security policy provider failed due to an exception. See the exception stack trace or the server log file for the root cause. If there is no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null>
<Feb 19, 2016 2:21:00 AM MST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 6 exceptions.  They are:
1. weblogic.security.SecurityInitializationException: The loading of an OPSS java security policy provider failed due to an exception. See the exception stack trace or the server log file for the root cause. If there is no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.PreSecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.security.SecurityService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.security.SecurityService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.nodemanager.adminserver.NodeManagerMonitorService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.nodemanager.adminserver.NodeManagerMonitorService

A MultiException has 6 exceptions.  They are:
1. weblogic.security.SecurityInitializationException: The loading of an OPSS java security policy provider failed due to an exception. See the exception stack trace or the server log file for the root cause. If there is no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.PreSecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.security.SecurityService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.security.SecurityService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.nodemanager.adminserver.NodeManagerMonitorService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.nodemanager.adminserver.NodeManagerMonitorService

        at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:88)
        at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:269)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413)






[EL Severe]: ejb: 2016-02-19 02:20:59.486--ServerSession(1545095313)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.

Error Code: 257
Feb 19, 2016 2:20:59 AM oracle.security.jps.internal.common.config.AbstractSecurityStore getSecurityStoreVersion
WARNING: Unable to get the Version from Store returning the default
oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00257: archiver error. Connect internal only, until freed.

Error Code: 257
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2180)
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:1028)
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.jpsObjectBaseQuery(JpsDBDataManager.java:3089)
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.queryBaseObjects(JpsDBDataManager.java:5761)
        at oracle.security.jps.internal.common.config.AbstractSecurityStore.getSecurityStoreVersion(AbstractSecurityStore.java:211)
        at oracle.security.jps.internal.common.config.AbstractSecurityStore.getSecurityStoreVersion(AbstractSecurityStore.java:195)
        at oracle.security.jps.internal.common.config.AbstractSecurityStore.<init>(AbstractSecurityStore.java:99)
        at oracle.security.jps.internal.keystore.FarmKeyStoreServiceImpl.<init>(FarmKeyStoreServiceImpl.java:121)
        at oracle.security.jps.internal.keystore.ldap.LdapKeyStoreServiceImpl.<init>(LdapKeyStoreServiceImpl.java:106)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.createInstance(KeyStoreProvider.java:356)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.createInstance(KeyStoreProvider.java:329)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:271)
        at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.createContextInternal(ServiceContextManagerImpl.java:432)
        at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.createDefaultContext(ServiceContextManagerImpl.java:216)
        at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.initialize(ServiceContextManagerImpl.java:156)
        at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.initialize(ServiceContextManagerImpl.java:112)
        at oracle.security.jps.internal.config.OpssCommonStartup$1.run(OpssCommonStartup.java:158)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.internal.config.OpssCommonStartup.start(OpssCommonStartup.java:110)
        at oracle.security.jps.wls.JpsWlsStartup.start(JpsWlsStartup.java:80)


Solution

This error is related with the Database available space issue. Check with Database team, if your Database is handled by different team, If you handle database by yourself, then look for the available space in Database.
Once you have, increased the space in the Database for the schemas which are being used by Weblogic servers, then you can restart weblogic server instances.
The error will be gone, now you can open your applications.