Tuesday, March 31, 2015

Error: there is no receive activity that starts the process

Problem :
              When using BPEL template  Define Service Later, gives below error while building it.

              Error(41): There is not an activity (receive/pick) to start the process
              Error(41): Initial activity is invalid. An initial activity must be of a receive or pick activity.
              Error: there is no receive activity that starts the process

Cause :
              This issue arises when you are using receive activity in BPEL .
               In this case you are using  BPEL template as Define Service Later and it generates
               receive activity code as below :

                           <receive name="Receive1" createInstance="no"
                             variable="Receive1_InputVariable"
                              partnerLink="Service1"
                               portType="ns1:getApplicationServiceSoap"
                            operation="getApplication"/>

           In above code you can see   createInstance="no" which is generated because you haven't checked Create Instance in receive activity as shown below.




Solution :

                To overcome this, you need to check Create Instance as shown in below or you can manually                                     change createInstance="no"  value to createInstance="yes" .


             

Saturday, March 28, 2015

XSLT Transformation file Design View not opening in Jdeveloper

Problem :
                 Design View XSLT transformation file(.xsl) not showing/opening.

Cause :
              Probably,It happens when you export Project from em console and import it in Jdeveloper.
               which removes oracle-xsl-mapper tag which contains mapSources and mapTargets.

Solution :
             Try to add manually  <?oracle-xsl-mapper>  tag after xml start tag and above stylshhet tag with                                   corresponding mapSources and mapTargets.

Sample Oracle-xsl-mapper :  which generates in xsl file when you create first time in jdev.

<?oracle-xsl-mapper
   <mapSources>
    <source type="WSDL">
      <schema location="../sourceWsdlName.wsdl"/>
      <rootElement name="sourceRootElement" namespace="sourceWsdlNamespace"/>
    </source>
  </mapSources>
  <mapTargets>
    <target type="WSDL">
      <schema location="targetWsdlLocation"/>
      <rootElement name="targetRootElement" namespace="targetNamespace/"/>
    </target>
  </mapTargets>
 ?>
               

Add the above code to your xsl file above stylesheet tag and do changes accordingly to your source and target as mentioned in Bold.

Please refer below screens shots  :




Unable to edit DB/File Adapter in JDeveloper

Problem :
                Unable to Edit DB/File Adapter in JDEV

Cause :
             It happens when you export Project from em console and import it in Jdeveloper .

Solution :

  • For File Adapter : 
                             Add  <?binding.jca jcafilename_file.jca?>  in corresponding wsdl below
                            <?xml version= '1.0' encoding= 'UTF-8' ?> tag generated when creating file adapter.

  • For DB Adapter :
                            Add  <?binding.jca jcafilename_db.jca?>  in corresponding wsdl below
                          <?xml version= '1.0' encoding= 'UTF-8' ?> tag  generated when creating DB adapter.



In case of DB Adapter Polling(Inbound), if you add <?binding.jca jcafilename_db.jca?>  tag and edit the db adapter then it is editable but with some error like below :



This error gives when you use Polling db records, in this case db adapter creates mapping and property files.

To overcome this issue you need to add below line in your properties.xml file above properties tag.

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">


Understanding WSDL

Why WSDL...
  • When we create a service, we typically do it because we want other people to use it or reuse it.
  • In order for them to do that, they need to know ,
    • what information to send to the service,
    • what information the service is going to send back,
    • and where to find the service in the first place.
  • As communications protocols and message formats are standardized in the web community, it becomes increasingly possible and important to be able to describe the communications in some structured way.
  • WSDL addresses this need by defining an XML grammar for describing network services as collections of communication endpoints capable of exchanging messages.

Specifically WSDL is..
  • is an XML document
  • used to describe Web services
  • specifies the location of the service
  • specifies  the operations (or methods) the service exposes
The WSDL Document Structure..

Abstract Part : Describes
  • the messages it sends and receives
  • the operation associates a message exchange pattern with one or more messages
  • Types– a container for data type definitions using some type system (such as XSD).
  • Message– an abstract, typed definition of the data being communicated.
  • Operation– an abstract description of an action supported by the service.
  • Port Type–an abstract set of operations supported by one or more endpoints.
Concrete part : specifies
  • transport and wire format details for one or more interfaces
  • a port (an endpoint) associates a network address with a  binding
  • a service which groups together endpoints that implement a common interface
  • Binding– a concrete protocol and data format specification for a particular port type.
  • Port– a single endpoint defined as a combination of a binding and a network address.
  • Service– a collection of related endpoints