SOAP Station to BPEL
Hi,
From SOAP station, I am sending the large message as attachment in .gz format.
Other end I am giving BPEL flow endpoint as Managed Service point in SOAP station.
Can I process the Attachment as input to BPEL process ?
Thanks,
bharath
The receive activity is the first entry point into your BPEL process. If this is not invoked by and adapter, (FTP, FILE, etc) then it is triggered by the WSDL that is deployed on the application server. This location can be found in the BPEL console. Check the BPEL process tab then the desired process. On this page you will see a tab for WSDL.
Not sure how to answer your first question, I assume this comes down to your PL/SQL package.
Not sure if this is relevant to what you are trying to achieve but I would suggest using AQ instead of triggers to invoke the BPEL process. You can use the trigger to populate the queue, the AQ adapter will then dequeue. This method sould provide you better flexibility around message tranfer.
cheers
James
Similar Messages
-
How to Capture SOAP Header in BPEL
Hi All,
I have a requirement to pass a value from SOAP Header to BPEL and has to capture the value in BPEL and manipulate the data.
In the receive activity i created a variable and assigned Header to it, but iam getting NULL value when i check the instance, this is the code i used in receive
activity.
<receive name="receiveInput" partnerLink="bpelsensor_client" portType="client:BPELSensor" operation="process" variable="inputVariable" createInstance="yes"
bpelx:inputHeaderVariable="headerID"/>
Any suggestions how to do this?How did you define headerID?
You can also see an example here:
http://java.net/projects/oraclesoasuite11g/pages/BPEL
Arik -
Accessing SOAP Headers in BPEL
Hi All,
I have been trying to access a custom soap header in BPEL but in vain.
I have the header like this in my wsdl
<wsdl:message name="doTransactionRequest">
<wsdl:part name="part1" element="tns:doTransaction"/>
</wsdl:message>
<wsdl:message name="doTransactionHeader">
<wsdl:part name="teamName" element="tns:myName"/>
</wsdl:message>
<wsdl:message name="doTransactionResponse">
<wsdl:part name="part1" element="tns:doTransactionReply"/>
</wsdl:message>
<wsdl:binding name="RequestHandlerProxySoapBinding" type="tns:RequestProxyPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doTransaction">
<soap:operation soapAction=""/>
<wsdl:input name="doTransactionInput">
<soap:header message="doTransactionHeader" part="teamName" use="literal"/>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="doTransactionOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>In BPEL I have a corresponding header variable defined for the header "teamName".
Now how do I tell BPEL "receive" to copy the incoming header to this variable ? There is no parameter called "headerVariable" or so for the receive element. As far as I understand, when the soap header "myName" comes, it is copied as a property in the normalized message. Now I need to tell BPEL service engine some how to copy the property to the header variable. But I don't know how to do that.
I Really need some help. Thanks in advance.
best regards,
balaI would try defining the soap:header under the <operation> description in your .wsdl
to look something like this:
<Input>
<soap:header message="tns:SessionHeader" part="SessionHeader"/>
<soap:body message="[yourprocess]RequestMessage"/>
</Input>
Then create a variable of the sessionHeader message type and assign it in the adapters tab.
You'll probably also need to add this namespace to your wsdl:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
I haven't tested this but it should get you on the right track... -
Calling Web Service with SOAP header from BPEL
Hi,
I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
Below is the error message (copied from clipboard).
+<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
+<pSubnoin>+
+<insubno>12345678</insubno>+
+</pSubnoin>+
+</getsubinfoElement>+
+</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
start fault message:+
Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
*:end fault message*</summary>
+</part></bindingFault></fault></messages>+
As said, no header information is visible in the Invoke activity.
Please provide help for the above issue.
-MJHello Patrick,
Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
+<assign name="Assign_Header">+
+<copy>+
+<from expression="'tkl12'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'tkl123'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'TKL'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+</assign>+
The expected input by the web service is as below with the header information highlighted.
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
+*<soap:Header>*+
+*<ns1:LOGIN_INFO>*+
+*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
+*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
+*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
+*</ns1:LOGIN_INFO>*+
+*</soap:Header>*+
+<soap:Body>+
+<ns1:substatusElement>+
+<ns1:pInparam>+
+<ns1:insubno>7674988</ns1:insubno>+
+</ns1:pInparam>+
+</ns1:substatusElement>+
+</soap:Body>+
+</soap:Envelope>+ -
How to put SOAP body in BPEL variable
Hi everybody,
I have a BPEL process which needs to pick up a SOAP-message from a queue, transform the body and send the result to a webservice.
The process is running deployed and picks up the soap message. In the receive action I see the SOAP message - envolope, header and body - as expected (shown below).
- <businessEventBody>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- <SOAP-ENV:Header>
<wsa:To>
http://testhost/CCS/Service_Endpoint
</wsa:To>
- <wsa:From>
<wsa:Address>
http://localhost/CCS/Service_Endpoint
</wsa:Address>
- <wsa:Metadata>
- <device xmlns:hl7="urn:hl7-org:v3" xmlns="urn:hl7-org:v3">
<id root="1.3.6.1.4.1.25208.20.100.50" extension="CCSMESSAGING"/>
</device>
</wsa:Metadata>
</wsa:From>
<wsa:Action>
urn:hl7-org:v3:CCS_POCD_IN009010CS14
</wsa:Action>
<wsa:MessageID>
MSG_ID1208340800216
</wsa:MessageID>
</wsse:Security>
</SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <CCS_POCD_IN009010CS14 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xsi:type="II" root="1.3.6.1.4.1.25208.20.100.30" extension="com.scandihealth.ccs.NoteInformerCS14com.csc.hat.collaboration.Collaboration@127.0.0.1:1208340800190:0.9747211212965656"/>
<employerCCS_IdentifiedOrganization classCode="ORG" determinerCode="INSTANCE">
<id xsi:type="II" root="1.2.2.1" extension="18573" displayable="false"/>
<id xsi:type="II" root="1.3.6.1.4.1.25208.20.20" extension="5234102" displayable="false"/>
<code xsi:type="CE" code="ENTERPRISE" codeSystem="1.3.6.1.4.1.25208.20.10.20" codeSystemName="CcsOrgUnitType" displayName="Enterprise"/>
- <name xsi:type="EN" use="L">
<given>88</given></name>
- <name xsi:type="EN" use="AL">
<given>mnemo-88</given>
</name>
- <name xsi:type="EN" use="C">
<given>Enterprise 88</given>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</part>
</businessEventBody>
Now what I want to do is simply assign the body to a variable as a string (using a copy operation), however all I get is a few scattered excerpts from the body of the message (as shown here).
<javaInput>
http://testhost/CCS/Service_Endpoint
http://localhost/CCS/Service_Endpoint
urn:hl7-org:v3:CCS_POCD_IN009010CS14
MSG_ID1208340800216
88
mnemo-88
Enterprise 88
81.1
mnemo-81.1
Unit 81.1
88
mnemo-88
Enterprise 88
</javaInput>
My FormatMessageToGS.bpel file is as shown here:
<?xml version = "1.0" encoding = "UTF-8" ?>
<process name="FormatMessageToGS"
targetNamespace="http://xmlns.ccs.scandihealth.com/FormatMessageToGS"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns4="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:ns7="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bees="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventErrorService/"
xmlns:ns5="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:ns6="http://com.scandihealth.ccs.webservices.messaging.common/CCSMessageServiceRemote.wsdl"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ns1="http://com.scandihealth.ccs.webservices.task.common/CCSBPELTaskServiceRemote.wsdl"
xmlns:ccstypes="http://ccs.scandihealth.com/workflow/types/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://com.scandihealth.ccs.webservices.security.common/CCSSecurityServiceRemote.wsdl"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:jms="http://xmlns.oracle.com/pcbpel/adapter/jms/"
xmlns:bes="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventService/">
<bpelx:exec import="javax.xml.transform.*"/>
<bpelx:exec import="javax.xml.transform.stream.*"/>
<bpelx:exec import="java.io.*"/>
<bpelx:exec import="java.util.*"/>
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<partnerLink name="BusinessEventService"
partnerLinkType="bes:Consume_Message_plt"
myRole="Consume_Message_role"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<variable name="businessEventBody" messageType="ccstypes:body_msg"/>
<variable name="businessEventInboundHeader"
messageType="jms:InboundHeader_msg"/>
<variable name="javaInput" type="xsd:string"/>
<variable name="javaOutput" type="xsd:string"/>
<variable name="FirstXSL" type="xsd:string"/>
<variable name="SecondXSL" type="xsd:string"/>
<variable name="SimplerXML" type="xsd:string"/>
<variable name="OutputToGS" type="xsd:string"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<receive name="ReceiveBusinessEvent" partnerLink="BusinessEventService"
portType="bes:Consume_Message_ptt" operation="Consume_Message"
variable="businessEventBody" createInstance="yes"
bpelx:headerVariable="businessEventInboundHeader"/>
<!-- <throw faultName="deliberateFault" /> -->
<scope name="XSLT">
<sequence name="Sequence_1">
</scope>
</sequence>
</process>
And my types.wsdl is like this:
<definitions targetNamespace="http://ccs.scandihealth.com/workflow/types/"
xmlns:tns="http://ccs.scandihealth.com/workflow/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="http://ccs.scandihealth.com/workflow/types/"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="stringElement" type="string"/>
<complexType name="ccsExceptionType">
<sequence>
<element name="faultString" type="string"/>
<element name="detail" type="string"/>
</sequence>
</complexType>
</schema>
</types>
<message name="body_msg">
<part name="body" element="tns:stringElement"/>
</message>
<message name="createTaskResponseMessage"/>
<message name="ccsExceptionMessage">
<part name="ccsException" type="tns:ccsExceptionType"/>
</message>
</definitions>
Does anybody have any idea as to what I am doing wrong, and more interesting how I can make it right?
Any help is truly appreciated.
Kind regards
AagaardHow did you define headerID?
You can also see an example here:
http://java.net/projects/oraclesoasuite11g/pages/BPEL
Arik -
Sending SOAP Attachments through BPEL--Urgent
Hi All,
we are calling one external web service from bpel.webservice expecting 2 attachments as part of request. here is the sample soap request.
*<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:imp="http://www.agile.com/2004/01/ais/import">*
*<soapenv:Header/>*
*<soapenv:Body>*
*<imp:importDataRequest>*
*<imp:dataSource>*
*<imp:attachmentRef href="cid:12266262222"/>*
*<imp:type>aXML</imp:type>*
*</imp:dataSource>*
*<imp:mapping>*
*<imp:attachmentRef href="cid:9876553333"/>*
*</imp:mapping>*
*</imp:importDataRequest>*
*</soapenv:Body>*
*</soapenv:Envelope>*
1.how can we attach file throgh bpel in SOAP request and then how to provide reference number to href field..
2. is there any alternative to achive this?
if anyone have the working example or link please send me to [email protected]
Thanks,
Sudhakar.MYou could create a variable base64Binary and assign the content of the ora:getAttachmentContent() return value. And then write to a file using the option "Native format translation is not required (Schema is opaque)" from the file adapter and assign to the opaque element.
-
Help in forming SOAP message for Bpel process
Hi,
I have a following schema file - UnpackMessage.xsd
<?xml version="1.0" encoding="windows-1252"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema/UnpackMessage"
xmlns:tns="http://www.w3.org/2001/XMLSchema/UnpackMessage"
elementFormDefault="qualified">
<complexType name="PackHandlerProcessRequestType">
<sequence>
<element name="instanceId" type="string"/>
<element name="activityName" type="string"/>
<element name="result" type="string"/>
</sequence>
</complexType>
<element name="PackHandlerProcessRequest" type="tns:PackHandlerProcessRequestType"/>
</schema>
and the following wsdl file for a bpel process
<?xml version = '1.0' encoding = 'UTF-8'?>
<definitions name="PackManagerWSDL"
targetNamespace="http://xmlns.oracle.com/PackManager"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:client="http://xmlns.oracle.com/PackManager"
xmlns:tns="http://xmlns.oracle.com/PackManager"
xmlns:ns2="urn:UnpackHandler"
xmlns:ns3="http://www.w3.org/2001/XMLSchema/UnpackMessage">
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/PackManager"
xmlns="http://www.w3.org/2001/XMLSchema"
>
<import namespace="http://www.w3.org/2001/XMLSchema/UnpackMessage" schemaLocation="UnpackMessage.xsd"/>
<element name="PackManagerProcessResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="PackManagerRequestMessage">
<part name="payload" type="ns3:PackHandlerProcessRequestType"/>
</message>
<message name="PackManagerResponseMessage">
<part name="payload" element="client:PackManagerProcessResponse"/>
</message>
<portType name="PackManager">
<operation name="initiate">
<input message="client:PackManagerRequestMessage"/>
</operation>
</portType>
<portType name="PackManagerCallback">
<operation name="onResult">
<input message="client:PackManagerResponseMessage"/>
</operation>
</portType>
<plnk:partnerLinkType name="PackManager">
<plnk:role name="PackManagerProvider">
<plnk:portType name="client:PackManager"/>
</plnk:role>
<plnk:role name="PackManagerRequester">
<plnk:portType name="client:PackManagerCallback"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
The receive activity in bpel process expects input message "PackManagerRequestMessage" of type "PackHandlerProcessRequestType"
Now on invoking the Bpel process directly by using the console ... the default input to the process looks like this -
<payload xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema/UnpackMessage"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="def:PackHandlerProcessRequestType">
<instanceId xmlns="http://www.w3.org/2001/XMLSchema/UnpackMessage">600</instanceId>
<activityName xmlns="http://www.w3.org/2001/XMLSchema/UnpackMessage">receive</activityName>
<result xmlns="http://www.w3.org/2001/XMLSchema/UnpackMessage">ok</result>
</payload>
and the receive activity gets the following as input (as taken from Flow in bpel console)
<ReceiveInput_initiate_InputVariable>
<part name="payload" >
<payload xsi:type="def:PackHandlerProcessRequestType" >
<instanceId>800</instanceId>
<activityName>receive</activityName>
<result/>
</payload>
</part>
</ReceiveInput_initiate_InputVariable>
But when i invoke the same process using a SOAP message which looks like
<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.w3.org/2001/XMLSchema/UnpackMessage" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP:Body>
<payload xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="def:PackHandlerProcessRequestType">
<ns2:instanceId>600</ns2:instanceId>
<ns2:activityName>receive</ns2:activityName>
<ns2:result>OK</ns2:result>
</payload>
</SOAP:Body>
</SOAP:Envelope>
the receive activity now gets the following as input (taken from Flow in bpel console)
<ReceiveInput_initiate_InputVariable>
<part name="payload">
<ns1:instanceId>600</ns1:instanceId>
</part>
</ReceiveInput_initiate_InputVariable>
So i am losing input data. Can someone help me form appropriate SOAP message for this ?
Thanks,
SriniThanks Marc,
The SoapUI is really useful. The SOAP request as generated by the SoapUI for above case is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:pack="http://xmlns.oracle.com/PackManager" xmlns:unp="http://www.w3.org/2001/XMLSchema/UnpackMessage">
<soapenv:Body>
<pack:initiate>
<payload>
<unp:instanceId>800</unp:instanceId>
<unp:activityName>receive</unp:activityName>
<unp:result/>
</payload>
</pack:initiate>
</soapenv:Body>
</soapenv:Envelope>
and the input received at BPEL was as expected.
Thanks a lot.
Srini. -
Is there a way to get SOAP header in bpel?
Hi,
My web service returns a SessionID contained in the SOAP header. In Oracle PM, is there a way I could extract the SOAP header, or manipulate the SOAP header when invoking the web services? Any information would be appreciated.
Thanks!
FengEdwin,
I was trying your second approach, which utilizes the bpel extension to hold the header info, but with no luck.
The provided sample (Salesforce Flow) works well, and I can see the SOAP header using TCPMonitor. Then I created a simple echo service (using bpel) to replace the Salesforce.com Enterprise Web Services, and invoke the echo service from a bpel process with the same bpel extension. However, no header was sent out.
I guess there are something I was missing. Attached please find the wsdl file of the echo service, as well as the bpel files. Could you give me some idea what I did wrong? Or do you have any documentation about the bpel extensions?
Thanks a lot for the good support!
Feng
echo.wsdl
<?xml version="1.0"?>
<definitions name="echo"
targetNamespace="http://acm.org/samples"
xmlns:tns="http://acm.org/samples"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE DEFINITION - List of types participating in this BPEL process
The BPEL Designer will generate default request and response types
but you can define or import any XML Schema type and use them as part
of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://acm.org/samples"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="echoRequest">
<complexType>
<sequence>
<element name="input" type="string"/>
</sequence>
</complexType>
</element>
<element name="echoResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
<!-- Header Elements -->
<element name="SessionHeader">
<complexType>
<sequence>
<element name="sessionId" type="xsd:string"/>
<element name="InvokeID" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="QueryOptions">
<complexType>
<sequence>
<element name="batchSize" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="SaveOptions">
<complexType>
<sequence>
<element name="autoAssign" type="xsd:boolean"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MESSAGE TYPE DEFINITION - Definition of the message types used as
part of the port type defintions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<message name="echoRequestMessage">
<part name="payload" element="tns:echoRequest"/>
</message>
<message name="echoResponseMessage">
<part name="payload" element="tns:echoResponse"/>
</message>
<!-- Header Message -->
<message name="Header">
<part element="tns:SessionHeader" name="SessionHeader"/>
<part element="tns:SaveOptions" name="SaveOptions"/>
<part element="tns:QueryOptions" name="QueryOptions"/>
</message>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PORT TYPE DEFINITION - A port type groups a set of operations into
a logical service unit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- portType implemented by the echo BPEL process -->
<portType name="echo">
<operation name="process">
<input message="tns:echoRequestMessage" />
<output message="tns:echoResponseMessage"/>
</operation>
</portType>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARTNER LINK TYPE DEFINITION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<plnk:partnerLinkType name="echo">
<plnk:role name="echoProvider">
<plnk:portType name="tns:echo"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
echo.bpel
<!-- echo BPEL Process [Generated by the Oracle BPEL Designer] -->
<process name="echo" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:cx="http://schemas.collaxa.com/xpath/extension">
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<partnerLink name="client" partnerLinkType="tns:echo" myRole="echoProvider"/>
</partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="input" messageType="tns:echoRequestMessage"/>
<!--
Reference to the message that will be returned to the requester
-->
<variable name="output" messageType="tns:echoResponseMessage"/>
</variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in echo.wsdl
-->
<receive name="receiveInput" partnerLink="client" portType="tns:echo" operation="process" variable="input" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<assign>
<copy>
<from expression="concat('echo: ', bpws:getVariableData("input", "payload", "/tns:echoRequest/tns:input"))">
</from>
<to variable="output" part="payload" query="/tns:echoResponse/tns:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client" portType="tns:echo" operation="process" variable="output"/>
</sequence>
</process>
bpel process that invokes the echo service
<!-- testHeader6 BPEL Process [Generated by the Oracle BPEL Designer] -->
<process name="testHeader6" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:cx="http://schemas.collaxa.com/xpath/extension">
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<partnerLink name="client" partnerLinkType="tns:testHeader6" myRole="testHeader6Provider"/>
<partnerLink name="echo" partnerLinkType="tns:echo" partnerRole="echoProvider"/>
</partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="input" messageType="tns:testHeader6RequestMessage"/>
<!--
Reference to the message that will be returned to the requester
-->
<variable name="output" messageType="tns:testHeader6ResponseMessage"/>
<variable messageType="tns:echoRequestMessage" name="i2"/>
<variable messageType="tns:echoResponseMessage" name="o2"/>
<variable name="header" messageType="tns:Header"/>
</variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in testHeader6.wsdl
-->
<receive name="receiveInput" partnerLink="client" portType="tns:testHeader6" operation="process" variable="input" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<assign>
<copy>
<from expression="12345">
</from>
<to variable="i2" part="payload" query="/tns:echoRequest/tns:input"/>
</copy>
<copy>
<from expression="1111">
</from>
<to variable="header" part="SessionHeader" query="/tns:SessionHeader/tns:sessionId"/>
</copy>
</assign>
<invoke partnerLink="echo" portType="tns:echo" operation="process" inputVariable="i2" bpelx:inputHeaderVariable="header" outputVariable="o2"/>
<reply name="replyOutput" partnerLink="client" portType="tns:testHeader6" operation="process" variable="output"/>
</sequence>
</process> -
Manipulating soap headers in BPEL 11g doesn't work
Hi,
I need to change the values of the soap header elements MessageId and RelatesTo in SOA Suite 11.1.1.5. The documentation is not very clear on how to achieve this. In the development guide bpelx:inputHeaderVariable is mentioned for manipulating soap headers. If you use the "Headers" tab on the invoke activity I instead get bpelx:headerVariable. But I've tried both and then run the calls through TCP Monitor. The messageId/RelatesTo is still not changed.
I have also tried the "Properties" tab on the invoke activity. There are two properties called wsa.messageId and wsa.relatesTo which sounds perfect. But still nothing happens when I use them.
My invoke looks like this (if e.g. using bpelx:headerVariable):
<invoke name="InvokeSomeProcess" partnerLink="SomeProcess"
portType="ns1:SomeProcessCallback" operation="onResult"
inputVariable="someProcessInputVariable"
bpelx:invokeAsDetail="no"
bpelx:headerVariable="relatesTo,MessageIdHeader">
</invoke>
This worked perfectly in 10.3.4 which is what I'm migrating from (then using bpelx:inputHeaderVariable).
Is this not working in 11g?? Or have I missed some crucial detail? Has anybody got it to work?
Thankful for any help!
Kind Regards
KerstinOk, there are at least two bugs that are related to this problem:
1) JDeveloper adds the wrong property when you add a header through the GUI tab "Headers" on an invoke activity. It should be "bpelx:inputHeaderVariable" and NOT "bpelx:headerVariable". (Bug #12541901).
2) Currently in SOA Suite 11g the WS-Addressing headers are overwritten when the SOAP call is made. Enhancement Request #13718140 has been logged asking for this behaviour to be changed in a future release. This is currently being considered by Product Management.
Oracle support suggests that you use OSB to set the headers.
Kind Regards
Kerstin -
Get Custom SOAP Header Value in SOA Suite 11.1.1.6 using BPEL 1.1
Hi Experts,
We are using SOA Suite 11.1.1.6 and in one of the projects we have requirement to retrieve custom SOAP header value.
This is enhancement to existing process which is developed using BPEL 1.1 and deployed to Production. So we cannot convert this now to BPEL 2.0
We suggested to use custom XML element in Header the definition of which will be defined in custom XSD and stored in common location. However the 3rd party who are invoking this service will not be able to do any customization in their process to pass custom XML header.
Please can you help me in providing any approach through which we can retrieve custom Header value from SOAP header using BPEL 1.1
I have read some blogs for retrieving the custom XML header but they are using BPEL 2.0. I would like achieve this functionality using BPEL 1.1
Appreciate your inputs.
Thanks in Advance - RKHello RK,
Have you've tried to put the bpex:outputHeaderVariable on the invoke activity of the invoked service.
<invoke name="Invoke"
bpelx:outputHeaderVariable="HeaderVariable"/>
Where the "HeaderVariable" reflects the XSD Datastructure of the received header.
This is also specified here in section 6.19.1 How to Receive SOAP Headers in BPEL
Please note that the exact header must be specified in the WSDL of the invoked service.
Also note that in case of a soap fault. No header will be returned from the invoked service but only a /soap/body/fault part.
Good luck!
Melvin -
How To : Call External Webservice from BPEL and pass SOAP Message to the WS
Hello All-
Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
<strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
<strong>2. Transform the message</strong>
<strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
I am new to Webservice integration using BPEL and would really appreciate your help.
Thanks In Advance
Regards,
DibyaHi Dharmendra,
I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
This is what I see in the TCP monitor, please note the double SOAP env:Body:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
<wsa:Metadata>
<device xmlns:hl7="urn:hl7-org:v3">
</device>
</wsa:Metadata>
</env:Header>
<env:Body>
<RCMR_IN000002NR01>
</RCMR_IN000002NR01>
</env:Body>
</RCMR_IN000002NR01>
</env:Body>
</env:Envelope>
Any help is appreciated.
Regards,
Aagaard
Edited by: Aagaard on Oct 30, 2008 8:59 PM
Should have mentioned. I am using BPEL 10.1.3.4
Edited by: Aagaard on Oct 31, 2008 8:43 AM
I have opened a new thread for this question so as to not confuse the issue more than necessary.
How many SOAP envelopes do you really need? -
BPEL partnerlink SOAP encodingStyle
I am getting error calling a partnerlink WebMethod Glue web service. I think Glue requires encodingStyle set for either SOAP Envelope or SOAP Body. It is not clear how BPEL is constructing the call to partnerlink. I need to figure out how can I make sure the encodingStyle attribute is added to SOAP Body or Envelope.
Anybody has any idea how it is done. I know I could modify SOAP header in BPEL process. How do I modify SOAP Body or Envelope? I want the soap call to partnerlink look like this: (the key thing is soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/")
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="x">
<soapenv:Header/>
<soapenv:Body>
<x:getOperation soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arg0 xsi:type="xsd:string">000000010</arg0>
</x:getOperation>
</soapenv:Body>
</soapenv:Envelope>
I played with property setting in bpel.xml, but didn't seem to have any effect:
<partnerLinkBinding name="SomeWebService">
<property name="wsdlLocation">SomeWebServiceRef.wsdl</property>
<property name="encodingStyle">http://schemas.xmlsoap.org/soap/encoding/</property>
<property name="optSoapShortcut">false</property>
<property name="sendXSIType">true</property>
</partnerLinkBinding>
Edited by: user636556 on Sep 24, 2008 3:01 PMSettting property in property tab of partnerlink is same as putting those values directly in bpel.xml like I showed in my previous post. That didn't make any difference.
-
Security related information in SOAP thruough BPEL
Hi all,
How to pass the security related information in SOAP(UsernameToken) in BPEL
thanks
kalyanYou can also add the username and password as properties to the invoke .
open the bpel.xml of your bpel process and the below properties where your partner link is defined
<property name="wsseHeaders">credentials</property>
<property name="wsseUsername">YOUR USER</property>
<property name="wssePassword">YOUR PASSWORD</property>
As an example check this :
<partnerLinkBinding name="PartnerLink_1">
<property name="wsdlLocation">DMSBODServiceRef.wsdl</property>
<property name="wsseHeaders">credentials</property>
<property name="wsseUsername">marattu</property>
<property name="wssePassword">wipro@143</property>
</partnerLinkBinding> -
How to Post XML Messages with SOAP Headers to a Trading Partner URL
Hi All,
Greeting to the Oracle B2B Community. We are currently working on how to post a Custom XML Message with SOAP Headers to a Trading Partner URL. I would really appreciate if anybody could provide me some inputs or links to some documentation on how to achieve the above requirement. The details are below:
1. Our Internal Application generates a Flat File (PO Extract).
2. The Extract then needs to be transformed to an XML Message. We are planning to use BPEL to do the transformation to XML Message.
3. Once it is transformed to an XML message it needs to be posted to the Trading Partner URL as an HTTP Post and with SOAP Headers.
We are planning to use B2B to do the posting but I am not sure on how to do the set-ups and what all parameter files in B2B needs to be updated in order to achieve the same. Also it is mandatory that we send SOAP Headers in the XML Message.
Thanks In Advance for your help.
Regards,
DibyaHello Dibya,
As you are already doing the transformation from Flat file to XML in BPEL which is typically the capability of B2B, please use the Soap binding in BPEL to send the document to Trading partner.
Rgds,Ramesh -
Hi, I'm a new guest here and I have a problem using BPEL 10.1.3.3. I work for HP now and I''ve updated the version of the application passing from BPEL 10.1.3.1 to BPEL 10.1.3.3. Running the project, when I want to create a task, it occurs a problem:
<WARN> <default.collaxa.cube.ws> <WSInvocationManager::Failed to get callback ServiceName in wsdl> Failed get wsdl service definition.
Failed to get a WSDL service that support the portType "{http://xmlns.oracle.com/pcbpel/taskservice/taskmanager}TaskManagerCallback" in WSDL definition "{http://xmlns.oracle.com/pcbpel/taskservice/taskmanager}TaskManager".
Please verify that WSDL portType "{http://xmlns.oracle.com/pcbpel/taskservice/taskmanager}TaskManagerCallback" is supported by a service in WSDL file.
and then other ERRORS:
<2008-04-08 10:36:14,683> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Internal Error.
<2008-04-08 10:36:14,684> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Internal error due to {0}.
<2008-04-08 10:36:14,685> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Contact oracle support if error is not fixable.
<2008-04-08 10:36:14,686> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Error in initiating task.
<2008-04-08 10:36:14,686> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Error while initiating the task . The task is associated with the business process WFPlaylistWorking, identified by 70005
<2008-04-08 10:36:14,687> <ERROR> <default.collaxa.cube.services> <PCException::<init>> Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
Please I need help. BPEL tecnology is new for me and then I don't know the answer.
My English is not perfect but I hope to explain myself good. Hi from Rome !!!Hi Dharmendra,
I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
This is what I see in the TCP monitor, please note the double SOAP env:Body:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
<wsa:Metadata>
<device xmlns:hl7="urn:hl7-org:v3">
</device>
</wsa:Metadata>
</env:Header>
<env:Body>
<RCMR_IN000002NR01>
</RCMR_IN000002NR01>
</env:Body>
</RCMR_IN000002NR01>
</env:Body>
</env:Envelope>
Any help is appreciated.
Regards,
Aagaard
Edited by: Aagaard on Oct 30, 2008 8:59 PM
Should have mentioned. I am using BPEL 10.1.3.4
Edited by: Aagaard on Oct 31, 2008 8:43 AM
I have opened a new thread for this question so as to not confuse the issue more than necessary.
How many SOAP envelopes do you really need?
Maybe you are looking for
-
Migrating from SBS 2011 to Windows Server 2012R2 Standard with 365
Im looking to move SBS 2011 to Server 2012R2 standard and with a 365 migration as well. Im thinking BPA for AD (health check) Add the Server2012R2 as a DC Ensure replication Move DHCP Change DNS Now this is where I get lost, now Im lost to use either
-
~webgui_simple_toolbar parameter not working in ITS 7.0
Hi Experts, I want to disable the back and cancel options in my webgui HTML pages. To make this i have used the parameter called ~webgui_simple_toolbar with value 18, why 18 is, as per the note 1010519 i have taken these values. But still i am gettin
-
BO 3.1 SP3 - "Execution Time" query for reports has been changed?
Hi, We can see BO XI 3.1 SP3, the execution time for a report is faster. is it using BOXI Enterprise APIs to determine the start and end? How is calculated? thx aurora
-
Disabling E-mail notifications not working after reboot
Hello. It seems that the mail notification and the mail count still persist even if I have it disabled on the settings after rebooting. I've checked the settings after reboot and it is still set as disabled (after following the guide), but the notifi
-
Get items between in the publishingstartdate and publishingend date in a content type.
Hi, I have a content type that has two site columns publishingStartdate and publishing end date. The content type is added to a document library. When I create an item of the content type then it gives two options for publishing start date as immed