Showing posts with label SOA. Show all posts
Showing posts with label SOA. Show all posts

Friday, December 09, 2016

OSB-382032: The message must be an instance of: {http://www.w3.org/2003/05/soap-envelope}Envelope

The error could be as seen below :

<soap:Text xml:lang="en">
OSB-382032: The message must be an instance of: {http://www.w3.org/2003/05/soap-envelope}Envelope
</soap:Text>
</soap:Reason>
<soap:Detail>
<con:stack-trace xmlns:con="http://www.bea.com/wli/sb/context">
com.bea.wli.sb.service.handlerchain.HandlerException: The message must be an instance of: {http://www.w3.org/2003/05/soap-envelope}Envelope
 at com.bea.wli.sb.service.handlerchain.handlers.ComputeOperation$1.getPayload(ComputeOperation.java:204)
 at com.bea.wli.sb.services.bindinglayer.BindingOperationMapper$QNameMapper.computeOperationName(BindingOperationMapper.java:564)
 at com.bea.wli.sb.service.handlerchain.handlers.ComputeOperation.dispatch(ComputeOperation.java:93)


Analysis:
This issue comes when you are invoking a SOAP 1.2 web service.
The request you sent, to service must have namespace declaration with
http://www.w3.org/2003/05/soap-envelope

I see 3 differences in SOAP 1.1 & SOAP 1.2 :
  • SOAP 1.2 uses "application/soap+xml" as Content-Type and SOAP 1.1 uses "text/xml".
  • SOAP 1.2 does not use SOAPAction header line.
  • SOAP 1.2 uses "http://www.w3.org/2003/05/soap-envelope" as the envolope namespace and SOAP 1.1 uses "http://schemas.xmlsoap.org/soap/envelope/".

Solution :
Make sure the payload you are sending to Target SOAP 1.2 service is having correct namespace declaration.
Your payload should be something like below :

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

<soapenv:Header xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
</soapenv:Header>
<soapenv:Body xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<get:string xmlns:get="http://xmlns.oracle.com/OSB_App_Jaguar/Santa/GetSantaDetails"></get:string>
</soapenv:Body>
</soapenv:Envelope>


Tuesday, November 08, 2016

Error Cluster BEA-000140 Failed to deserialize statedump from server

The Error could look something similar to below on managed server log file:


<Error> <Cluster> <BEA-000140> <Failed to deserialize statedump from server 2880051432324383502S:158.151.155.53:[8503,8503,-1,-1,-1,-1,-1]:soa_domain:soa_server1 with java.lang.ClassNotFoundException: oracle.bpm.bpmn.engine.instancemanagement.ejb.IInternalInstanceManagementServiceRemote.
java.lang.ClassNotFoundException: oracle.bpm.bpmn.engine.instancemanagement.ejb.IInternalInstanceManagementServiceRemote
        at weblogic.application.internal.AppClassLoaderManagerImpl.loadApplicationClass(AppClassLoaderManagerImpl.java:154)
        at weblogic.common.internal.ProxyClassResolver.resolveProxyClass(ProxyClassResolver.java:68)
        at weblogic.common.internal.WLObjectInputStream.resolveProxyClass(WLObjectInputStream.java:76)
        at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
        Truncated. see log file for complete stacktrace


Reason:
Corrupted files due to temporary communication failure between WebLogic admin and managed server instances. This also happens if one of the server node was down for longer time.


Solution:
1. Shut Down Weblogic Managed/Admin Server
2.Delete the directory under $DOMAIN_HOME/servers/<SOA_SERVER1>/tmp/ and $DOMAIN_HOME/servers/<SOA_SERVER1>/cache/ 
3.Restart Admin/Managed servers. The file will create automatically.



Wednesday, June 22, 2016

File based MDS configuration SOA Jdevloper

Hi Guys, Today we are going with Steps for File Based MDS configurations.

STEP 1 :
Login to EM console.Expand SOA and right click on soa-infra and selcet Adminstration -->MDS configuration.



STEP 2:

Click on Export button on MDS configuration screen and save it your local disk

unzip the folder soa_infra_metadata, 
you will see the 
apps folder. 
All your project related WSDlS,XSD,fault-policy.xml,fault-binding.xml etc will be inside the apps folder.

STEP 3:


Now go to your C:\Oracle\Middleware\jdeveloper\integration\seed folder in your system, or it could be any other location as well, based on your Installation directory.
The above path created automatically while you installed JDeveloper studio.


STEP 4:

Copy and Paste apps folder, which you have got in from STEP 2.
Now its look like C:\Oracle\Middleware\jdeveloper\integration\seed\

STEP 5:
To use these schemas/wsdl etc in Jdeveloper we need to add some parameters in adf-config.xml under Application Resources.




Click on the adf-config.xml
Note:For each and every application it has his own adf-config.xml file persist.

Once opened the file need to add metadata-storage-usage_2 

 <metadata-namespaces>
          <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
          <namespace metadata-store-usage="mstore-usage_2" path="/apps"/>
 </metadata-namespaces>
    <metadata-store-usages>
        <metadata-store-usage id="mstore-usage_1">
              <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property  name="metadata-path" value="${oracle.home}/integration"/>
              <property name="partition-name" value="seed"/>
              </metadata-store>
        </metadata-store-usage>
        <metadata-store-usage id="mstore-usage_2">
             <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
             <property name="metadata-path" value="C:\Oracle\Middleware\jdeveloper\integration"/>
             <property name="partition-name" value="seed"/>
             </metadata-store>
        </metadata-store-usage>
    </metadata-store-usages>
    



    Note:
1. I have specify mstore_usage_2 path="/apps"-------because my all schemas   under that folder only.Incase ur schemas under apps folder only u can specify path like path="/apps"
     :Oher case if your schemas folder name is SOASchemas then u can specify path like
       path="/apps/SOASchema" 

2.Metadata-Path value  must be C:\Oracle\Middleware\jdeveloper\integration in real time scenarios
3.Patition-name valuse must be seed in real time scenarios.


    


STEP 6: 
To use a wsdl or any resource in your project use below reference. 

<wsdl:types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema">
         <import namespace="http://xmlns.example.com/unique/default/namespace/1103228635369" schemaLocation="oramds:/apps/ApplicationComponents/BAM/LoggingBAM.xsd"/>
      </schema>

   </wsdl:types>





    Thats it guys. 

Sunday, February 21, 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