Handling constants in OSB

I need to treat some of the variables as constants as they depend on environment. In Java I used to handle these constants by putting them in
property files, reading them in when application starts and put them in cache.
How can I handle these type of constants in OSB?

Re: OSB: What is best practice for reading configuration information -- this thread documents some 2 methods you can use for the having constants that need to be present across instances of a all proxy services in OSB.
Hope this helps.
Manoj

Similar Messages

  • Fault Handling Issue in OSB

    Hi,
    This is regarding SOAP fault handling in OSB11g.
    i am expecting that whenever OSB proxy service recieves a fault response the flow should move to service error handler if any. But its not happening.
    We tested our service with SOA Test stubs and SOAP UI mock services. When SOA test stub send fault response OSB considering it as normal response. But when the same fault is sent by SOAP UI mock service OSB is considering it as fault and going to service error handler.
    Now the same is happening when we replaced the service provider with one of the .NET service. The fault response is in SOAP 1.1 structure.
    Please let me whats the difference or any setting or HTTP response code we need to look at.
    Thanks & Regards
    Siva

    Hi Anuj,
    I am using the same fault structure which is working in Soap UI mock service. Still its not working in Soa test stub. And now facing the same issue when fault comes from .NET based service provider.
    Will verify once to see whats the response code thats being sent.
    Thanks
    Siva

  • How to handle OOME in OSB/ALSB

    In WebLogic the advice on OutOfMemoryError is to restart the server via the panic action in overload configuration.
    However, in OSB an OOME is always caught by an OSB errorhandler, so I think that leaves you with the following options
    1. in all your OSB errorhandlers call System.exit(), not nice since errorhandlers cannot be reused
    2. configure JRockit to exit on OOME
    3. monitor WebLogic/OSB log for OOME and take some action on that
    What do you think?

    1. in all your OSB errorhandlers call System.exit(), not nice since errorhandlers cannot be reused
    Not Recommended, OOM are runtime errors and you cannot predict the when/where they can happen. Why would you want to put system.exit in every error handler. this would be over-kill. Its like putting try-catch block for every piece of java code that is written.
    2. configure JRockit to exit on OOME
    May not be good idea either. Only some sub-system might be effected by OOM, other systems might not be...
    3. monitor WebLogic/OSB log for OOME and take some action on that
    This would be the best way if I have to choose from your given 3 options
    You should not how ever forget that with step 3, we should also spend some (painful!) time to identify the root-cause of the OOM and eliminate either by changing program/logic or upgrading the hardware...That is the only long-term solution.
    Thanks
    Manoj

  • Need Help:Handling CLOB in OSB Proxy Service

    Hello All-
    We have created an AQ in Oracle DB which will have the following message Structure:
    CREATE OR REPLACE TYPE enqueue_payload AS OBJECT
    ( field1 VARCHAR2(100),
    field2 VARCHAR2(100),
    field3 DATE,
    field4 VARCHAR2(100),
    field5 NUMBER,
    payload CLOB,
    In the Payload field we are enqueing an XML message.
    We have to use a OSB proxy service to dequeue the message from the AQ, transform it to another format and send to a SOA Composite.
    We created a AQ Adapter in Jdeveloper 11g and imported the WSDL, XSD and .jca jca binding file into the OSB project. And configured the OSB proxy service using the WSDL imported.
    However in OSB proxy service message flow when I try to create an XQUERY transformation, I see that the Payload field does not expose the structure of the XML message that is being enqueued. I even changed the message structure definition to have the payload field as XMLType. But it didn't help.
    On analyzing the XSD created by AQ Adapter, I see that the payload is being defined as "string" in the XSD.
    Inputs Needed
    =========
    1. How can we parse the payload field defined as CLOB/XMLType in OSB so that I can see the structure of the XML message it holds ?
    2. Is there any in-built function in OSB to convert it to XML ?
    3. Any other inputs in order to transform the XML message coming in the payload field as CLOB/XMLType
    Please provide your inputs and I hope that I have clearly explained my use case.
    Thanks in advance for your time and help!!
    Regards,
    Dibya

    Hi Atheek-
    Please find the logs below:
    Payload:: Indicates the actual payload with all the headers fields coming from AQ
    Payload After Applying the Function:: Indicates the data that is logged after applying the fn-bea:inlinedXML function.
    The function fn-bea:inlinedXML is extracting the data from the XML tags :(
    ####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <ALSB Logging> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-000A464703C2C06A4338> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466595> <BEA-000000> < [PipelinePairNode1, PipelinePairNode1_request, stage1, REQUEST] Payload:: <apps:ORA_FUSION_LOAD_XMLTYPE xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apps="http://xmlns.oracle.com/xdb/APPS">
    *<RICE_ID>PRJ_INT_30</RICE_ID>*
    *<SOURCE_SYSTEM>ORACLE</SOURCE_SYSTEM>*
    *<DATETIME>2010-12-20T10:49:17.000Z</DATETIME>*
    *<TRANSACTION_ID>PRJ_INT_30-1</TRANSACTION_ID>*
    *<RECORD_COUNT>1</RECORD_COUNT>*
    *<PAYLOAD><![CDATA[<ALTPPSEGHIERARCHY><sgmt_name>Company</sgmt_name><include_parent_child>C</include_parent_child><parent_flex_value>P</parent_flex_value><child_flex_value_low>03</child_flex_value_low><child_flex_value_high>03</child_flex_value_high><start_date_active></start_date_active><end_date_active></end_date_active></ALTPPSEGHIERARCHY>]]></PAYLOAD>*
    *<ATTRIBUTE1 NULL="TRUE"/>*
    *<ATTRIBUTE2 NULL="TRUE"/>*
    *<ATTRIBUTE3 NULL="TRUE"/>*
    *<ATTRIBUTE4 NULL="TRUE"/>*
    *<ATTRIBUTE5 NULL="TRUE"/>*
    *</apps:ORA_FUSION_LOAD_XMLTYPE>>*
    ####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <ALSB Logging> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-000A464703C2C06A4338> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466595> <BEA-000000> < [PipelinePairNode1, PipelinePairNode1_request, stage1, REQUEST] Payload After Applying the Function:: PRJ_INT_30ORACLE2010-12-20T10:49:17.000ZPRJ_INT_30-11>
    ####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <JDBC> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466688> <BEA-001128> <Connection for pool "EBS_DHAARA_DataSource" closed.>

  • How to handle exception in OSB 11g

    Hi,
    In my project, in Proxy services level have to add exception handling , please brief me the steps.
    Please let me know

    Hi, Eric
    i tried above link. In my project.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode xmlns:soap="fault/webservices/vendavo/com">soapenv:Server</faultcode>
    <faultstring>BEA-380000*:* </faultstring>
    <detail>
    <con:fault xmlns:con="fault/webservices/vendavo/com">
    <errorCode>BEA-380000</errorCode>
    *<reason/>*
    <location>
    <node>RouteTo_VendavoCallOutBS</node>
    <path>response-pipeline</path>
    </location>
    <operation>find</operation>
    <uri>
    /SFADeal/ </uri>
    <host/>
    <request_body/>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    In this responce i am not getting reason of the fault, what i need to do for to get the reason
    Please let me know
    Thanks..

  • OSB - x509 token handler

    Hello,
    I'm trying to develop a webservice with some policies associated:
    @Policies( {
    @Policy(uri = "policy:Wssp1.2-2007-EncryptBody.xml"),
    @Policy(uri = "policy:Wssp1.2-2007-SignBody.xml"),
    @Policy(uri = "policy:Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml") })
    After adding those policies to my webservice and configuring the weblogic server (11g), I've used a jdeveloper web proxy and i've successfully invoked the web service.
    Now this is where the problem starts, in front of the web service there must be an OSB, which must not decrypt the message, so i've set the Process WS-Security Header = No.
    I've set the OSB policy as owsm: oracle/wss11_username_token_with_message_protection_service_policy
    Using the same jdeveloper web proxy, i've invoked the OSB proxy service but the business service returns :
    <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <faultcode>wsse:InvalidSecurity</faultcode>
    <faultstring>Failed to create Reference for token of type http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3, token handler did not return
    a token for claims com.bea.xbean.store.Xobj$ElementXobj@25a29128</faultstring>
    </env:Fault>
    On the weblogic log there is no information regarding a request.
    Can anyone help? I've found no information regarding this error.

    For poller transports (email/File/FTP etc) it is not possible to catch errors of transport layer, in your service error handler. Re: OSB - Error Handler in FTP Transport for TransportException
    Thanks
    Manoj
    Edited by: Manoj Neelapu on Jun 28, 2010 3:51 PM

  • Osb - bind error handler to proxy service

    Hi!
    I have got a proxy service which polls a POP3 server to download emails and process them.
    My question: How could I bind an error handler to proxy service for noticing when the POP3 server is not available?
    So I would like to put an alert when the OSB looses the connection to email server. I tried to put an error handler to top component on message flow but it doesn't work...
    Could anyone help me?
    Thanks!
    Viktor

    For poller transports (email/File/FTP etc) it is not possible to catch errors of transport layer, in your service error handler. Re: OSB - Error Handler in FTP Transport for TransportException
    Thanks
    Manoj
    Edited by: Manoj Neelapu on Jun 28, 2010 3:51 PM

  • OSB Error handling

    Hi,
    Could you point me to some OSB error handling examples? I am trying to understand how to handle errors at OSB. We are planning to build a number of message flows into OSB and trying to figure out the best way to handle errors.
    Thank you

    Hi
    From the main entry point of a proxy service you can create an error handler (as well as stages, routing nodes etc).
    In the Error Handlers you get the BEA error code which is sometimes helpful and sometimes not.
    For example, if I have a validate node in my main flow that cause an XML validation error, that is easy recognisable so an 'if then' node will be able to route to the appropriate error handling logic. If the proxy service calls another service which throws a SOAP fault back, things get a little trickier as all you get back from the container is a BEA-380001 error code - basically an 'Internal Server Error'. So to sort this out you need an 'if then' node to trap this error code and then include a nested 'if then' node to look for the real error. The nest if statement condition would look something like "$body/soap-env:Fault/detail/mf:MyFault/mf:MyFaultcode = ERROR_CODE". Notice here, the way to get the actual fault it to use XPath to traverse the actual message returned and not use the $fault variable provided by the container.
    I also suggest you create your own Fault type in an xsd so that the OSB always returns a consistent fault format.
    In each of the 'if then' condition branches in the error handler I have an assign which creates the SOAP fault using the user defined fault type, a sanitised example of which is shown below.
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:gn="http://www.mycompany.com/wsdl/path/notification/1.0">
         <soapenv:Fault>
              <faultcode>gn:MyException</faultcode>
              <faultstring/>
              <detail>
              <fault:Fault xmlns:fault="http://www.mycompany.com/schema/fault/1.0">
                   <fault:code>10000</fault:code>
                   <fault:message>System Returned Error:
                        Details are:
                        Error Code - {fn:string($body/soap-env:Fault/detail/ser:ServiceException/ser:faultCode)}
                        Error Message - {fn:string($body/soap-env:Fault/detail/ser:ServiceException/ser:message)}
                   </fault:message>
                   <fault:processId>{fn:string($body/ns1:Type/ns2:id)}</fault:processId>
                   <fault:shortMessage>system Returned Error</fault:shortMessage>
                   <fault:time>{fn:current-dateTime()}</fault:time>               
              </fault:Fault>
              </detail>
         </soapenv:Fault>
    </soapenv:Body>
    Notice how my fault type is populated in the detail stanza of the overall SOAP fault message.
    This XML just gets assigned to body.
    the very last thing in the error handler is to add a reply node "with failure" if you wish to return a soap fault or "with success" if you have handled the error and don't need tot return a fault.
    Hope this at least points you in the right direction.
    Cheers
    MAtt

  • How to create a generic error handling proxy?

    Hello,
    i have few services proxies.
    I want to create a generic error handling osb proxy which does only errorhandling.
    This proxy would be called by all my services.Now suppose my services proxies would throw any error,the control will pass to error handling block of proxy..from there i will call this generic errorhandling proxyusing a service callout or publish action.In this proxy i want to do all my error handling based on 'n' conditions.and i want to pass the message to the fault variable of services proxy..kindly suggest ways..*main challenge is passing the message to the fault variable of services proxy*

    Hi,
    For generic error handling framework or common error handling framework...create a bpel process which takes the error details payload and sends the inf/data as email to the particular receipients.
    create business process with bpel process and proxy using business service.so wen ever error occurs at stage or route or proxy level ..call error handler action in OSB.Assign error handler details to the bpel input payload.
    FOR EX:
    <soap-env:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <com:test>
    <com:ProcessInfo>testDetails</com:ProcessInfo>
    <com:BusinessProcessName>testprocess</com:BusinessProcessName>
    <com:BusinessProcessInstanceId>{fn-bea:uuid()}</com:BusinessProcessInstanceId>
    <com:BusinessProcessStep>ReqLayer</com:BusinessProcessStep>
    <com:ErrorCode>{string($fault/ctx:errorCode)}</com:ErrorCode>
    <com:ErrorType>Technical</com:ErrorType>
    <com:StatusCode>Error</com:StatusCode>
    <com:ImplementationCode>OSB</com:ImplementationCode>
    <com:ErrorDescription>{string($fault/ctx:reason)}</com:ErrorDescription>
    <com:ErrorDateTime>{fn:current-dateTime()}</com:ErrorDateTime>
    <com:Node>{string($fault/ctx:location/ctx:node)}</com:Node>
    <com:Path>{string($fault/ctx:location/ctx:path)}</com:Path>
    </com:test>
    </soap-env:Body>
    this assign the error details values to the bpel process.

  • Java client for OSB service

    Hi All,
    We have to talk to OSB11g proxy service which is created as Any Soap service (url: http://myosb.firmname.com:7001/osb-ws)
    I have java client applications which need to consume this proxy service built on top of OSB by providing the necessary inputs.
    Typically we get wsdl url's and then we use Jdeveloper to create web service client proxies to generate client side web service artifacts and call the web service.
    But I am confused here as to how can I get a handle to the OSB service from a java client. The OSB developers on the project tell me they don't have and cannot provide a WSDL based URL.
    What are the general practices for consuming OSB proxy service from java client apps. Google search result did not yield much help.
    Please let me know your thoughts.
    Regards,

    Hi Anuj,
    Thanks for reply. As u guys mentioned that about the URL I have rechecked the URL and realized the port number which I was using that was Admin Server Port while environment contains two servers Admin and Managed both. I have change the Port Number from Admin to Managed now its hitting the Service but now another problem I start facing that I need to pass a big XML as input request to that OSB Proxy Service. I have two different code where I am attaching the input request in two different ways but none of them is passing that request to URL and in both cases I am getting default response from URL.
    Here is the Code, Code1 through Core Java:
    ===============================================================================================
    package retriggerpsftorder;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.URL;
    import java.net.URLConnection;
    import java.net.URLEncoder;
    public class MyTest {
    public MyTest() {
    System.out.println("Constructor executing");
    System.out.println("JAVA Version : " + System.getProperty("JAVA.VERSION"));
    public static void main(String arga[]) {
    try {
    // Construct data
    String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" +
    " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" +
    " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" +
    " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" +
    " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n", "UTF-8");
    //data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
    System.out.println("Data going for Request : "+data);
    // Send data
    URL url = new URL("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(data);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    int i=0;
    while ((line = rd.readLine()) != null) {
    System.out.println("Values of Line : "+ i + " : "+ line);// Process line...
    i++;
    wr.close();
    rd.close();
    } catch (Exception e) {
    =========================================
    Code 1 Response
    Values of Line : 0 : <?xml version="1.0" encoding="UTF-8"?>
    Values of Line : 1 : <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    Process exited with exit code 0.
    Note: The above response message is the default response message, even if u not pass any input parameter then also the above message will come.
    ==========================================================================================================
    Code 2 : Using Servlet
    package retriggerpsftorder;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.Servlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.http.client.HttpClient;
    import org.apache.commons.httpclient.HttpConnection;
    import org.apache.commons.httpclient.HttpState;
    import org.apache.commons.httpclient.NameValuePair;
    import org.apache.commons.httpclient.URI;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.apache.commons.httpclient.methods.RequestEntity;
    import org.apache.http.client.HttpClient;
    public class GIFTProcess extends HttpServlet implements Servlet {
    private static final String CONTENT_TYPE =
    "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest req,
    HttpServletResponse resp) throws ServletException,
    IOException {
    resp.setContentType(CONTENT_TYPE);
    PrintWriter out = resp.getWriter();
    try {
    NameValuePair nvpRtn =
    new NameValuePair("body", "<migrateOrder>\n" +
    " <migrateOrderId>51c797d61dd211b2818a</migrateOrderId>\n" +
    " <createCustomer>false</createCustomer>\n" +
    " <createBillingAccount>false</createBillingAccount>\n" +
    " <Customer>\n" + " <ID>\n" +
    " </PIN>\n" +
    "     </customerAccountNumber\"></customerAccountNumber\">\n" +
    " </externalIdentifier>\n" +
    " </ID>\n" +
    " <creditClass>W</creditClass>\n" +
    " </Customer>\n" + " <Account>\n" +
    " <name>Gurwinder Singh</name>\n" +
    " <ID>\n" + " <PIN>1987</PIN>\n" +
    "     <billingAccountNumber>695909361</billingAccountNumber>\n" +
    " </ID>\n" + " </Account>\n" +
    " <CustomerOrder>\n" +
    " <customerOrderPartyReference>\n" +
    " <MSISDN>61425265789</MSISDN>\n" +
    " </customerOrderPartyReference>\n" +
    " <orderSource>\n" +
    " <templateName>AUP1057_AU10357_24_DATA_0113</templateName>\n" +
    " </orderSource>\n" +
    " <typeCode>Connect</typeCode>\n" +
    " <futureSubmitDate>2011-02-28</futureSubmitDate>\n" +
    " <cancelOpenOrdersIndicator>false</cancelOpenOrdersIndicator>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"1\">\n" +
    " <product ID=\"AUX221\" type=\"SAMID\" attributeCount=\"19\">\n" +
    " <attribute>\n" +
    " <name>Accept Code</name>\n" +
    " <value>Accept 5</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Add\" priorityRanking=\"2\">\n" +
    " <product ID=\"OFF0018\" type=\"SAMID\" attributeCount=\"1\">\n" +
    " <attribute>\n" +
    " <name>Period Override</name>\n" +
    " <value>24</value>\n" +
    " </attribute>\n" +
    " </product>\n" + " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"3\">\n" +
    " <equipment ID=\"012645002053476\" type=\"Handset\" />\n" +
    " </lineItem>\n" +
    " <lineItem actionCode=\"Allocate\" priorityRanking=\"4\">\n" +
    " <resource ID=\"89610300000905636996\" type=\"SIM\" />\n" +
    " </lineItem>\n" +
    " <externalOrderReference>\n" +
    " <serviceID>75055433</serviceID>\n" +
    " <customerID>921092224696621123154029260421</customerID>\n" +
    " <serviceStartDate>2009-02-10</serviceStartDate>\n" +
    " <serviceRatePlan>X3Cap $29 24m($29min-35cFF)</serviceRatePlan>\n" +
    " <agreementNumber>VHU0029215</agreementNumber>\n" +
    " <accountNumber>3382437469</accountNumber>\n" +
    " <migrationType>Loyalty Handset Upgrade Acq</migrationType>\n" +
    " <receiveMarketingInfoOverrideIndicator>false</receiveMarketingInfoOverrideIndicator>\n" +
    " </externalOrderReference>\n" +
    " <orderSalesReference>\n" +
    " <dealerReferenceID>D3641</dealerReferenceID>\n" +
    " <trailingCommissionRatePlan>MUPR9</trailingCommissionRatePlan>\n" +
    " <trailingCommisionDealerReference>D3734</trailingCommisionDealerReference>\n" +
    " </orderSalesReference>\n" +
    " </CustomerOrder>\n" +
    " <ContactManagementActivity>\n" +
    " <activityCategory>Proof of Purchase - Mig from 3</activityCategory>\n" +
    " <activityType>Migration from 3</activityType>\n" +
    " <activityDescription>Proof of Purchase Information</activityDescription>\n" +
    " <activityComment>MSISDN: 0425265789354610026170561</activityComment>\n" +
    " </ContactManagementActivity>\n" +
    "</migrateOrder>\n");
    NameValuePair[] nvpout = { nvpRtn };
    HttpConnection httpConn = new HttpConnection("172.22.161.101", 8017);
    System.out.println("httpConn : " + httpConn.getHost() + " getPost: " + httpConn.getPort());
    httpConn.open();
    System.out.println("Is Connection Open? --> " + httpConn.isOpen());
    PostMethod postMethod = new PostMethod();
    postMethod.setPath("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    System.out.println("postMethod.getPath() : " + postMethod.getPath());
    //postMethod.setQueryString("http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder");
    //System.out.println("getQueryString : " + postMethod.getQueryString());
    //System.out.println("postMethod.getParams() : " + postMethod.getParams());
    postMethod.setRequestBody(nvpout);
    System.out.println("validate--> " + postMethod.validate());
    postMethod.execute(new HttpState(), httpConn);
    System.out.println("isRequestSent --> " + postMethod.isRequestSent());
    System.out.println("statusLine--> " + postMethod.getStatusLine());
    String serviceResponse = postMethod.getResponseBodyAsString();
    System.out.println("Response from Call : " + serviceResponse);
    } catch (Exception e) {
    out.println("Error Occured during the process.");
    e.printStackTrace();
    ==========================================================================================
    Code 2 Response -----
    C:\Oracle\Middleware\SOASuite101351\jdk\bin\javaw.exe -jar C:\jdevstudio10135\j2ee\home\admin.jar ormi://10.161.1.169:23891 oc4jadmin **** -updateConfig
    11/03/02 15:30:19 WARNING: Shared-library oracle.expression-evaluator:10.1.3.1 is closing, but is imported by adf.oracle.domain:10.1.3.1, adf.generic.domain:10.1.3.1.
    2/03/2011 15:30:19 com.oracle.corba.ee.impl.orb.ORBServerExtensionProviderImpl preInitApplicationServer
    WARNING: ORB ignoring configuration changes. Restart OC4J to apply new ORB configuration.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 7765 ms.
    Target URL -- http://10.161.1.169:8988/JAVAProject-RetriggerPSFTOrder-context-root/giftprocess
    ERROR: Unable to connect to JQS service: connection refused
    11/03/02 15:30:22 httpConn : 172.22.161.101 getPost: 8017
    11/03/02 15:30:22 Is Connection Open? --> true
    11/03/02 15:30:22 postMethod.getPath() : http://172.22.161.101:8017/app/mig3/migrate/MigrateOrder
    11/03/02 15:30:22 validate--> true
    11/03/02 15:30:22 isRequestSent --> true
    11/03/02 15:30:22 statusLine--> HTTP/1.1 200 OK
    2/03/2011 15:30:22 org.apache.commons.httpclient.HttpConnection releaseConnection
    WARNING: HttpConnectionManager is null. Connection cannot be released.
    11/03/02 15:30:22 Response from Call : <?xml version="1.0" encoding="UTF-8"?>
    <migrateOrderReply><statusCode>Failed</statusCode><errorReturn><errorCode>CORE_SYS_GENERIC</errorCode><errorMessage>Unexpected System exception</errorMessage></errorReturn></migrateOrderReply>
    ==================================================================================
    If u find any thing wrong then please let me know.
    Any reply is highly appreciated.
    Thanks Manish

  • Constants in BPEL - best practice?

    Hello,
    In our workflows we use a lot of constant values. Constants can be of course hardcoded to the bpel process, but it is not very nice solution for viewing or editing them later. What would be the best practice for handling constants in BPEL? Could the constants be defined in a xml schema and use them in bpel process? I couldn't get this work with a quick try.
    Best regards,
    Tommi

    This should work as well. Thanks!
    I made a customXPath function for reading the constants from a table. Here is the how-to if somebody is interested:
    1. I created a table "bpel_constants" with two colums "key" and "Value"
    2. I created a customXPath function for reading a "value" from the "bpel_constants" based on the "key"
    public class ReadConstant implements IXPathFunction
    private String dbName = "jdbc/BPELSamplesDataSource";
    public Object call(IXPathContext context,
    List args) throws XPathFunctionException
    if (args.size() == 1)
    if (args.get(0) instanceof String)
    return readConstant((String)args.get(0));
    throw new XPathFunctionException( "readConstant() requires string argument." );
    private String readConstant(String key) throws XPathFunctionException
    Connection conn = null;
    String result = "";
    Statement stmt = null;
    try
    conn = makeConnection();
    stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select " + "value " + "from " + "bpel_constants " + "where " + "key = '" + key + "'");
    if (rs.next())
    result = rs.getString(1);
    else
    throw new XPathFunctionException("Value not found for " + key);
    } catch (SQLException se)
    throw new XPathFunctionException(se.getMessage(), se);
    } catch (NamingException ne)
    throw new XPathFunctionException(ne.getMessage(), ne);
    } finally
    try
    if (stmt != null)
    stmt.close();
    if (conn != null)
    conn.close();
    } catch (SQLException se)
    throw new XPathFunctionException(se.getMessage(), se);
    return result;
    private Connection makeConnection() throws NamingException, SQLException
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup(dbName);
    return ds.getConnection();
    - makeConnection uses a JNDI to lookup the same datasource that the BPEL Engine uses (this requires a jndi.properties file to be in a BPEL Engine classpath to work).
    3. I put the ReadConnection class to the BPEL Engine classpath and defined the function in the xpath-functions.xml config file:
    <function id="readConstant">
    <classname>asdf.xpath.function.ReadConstant</classname>
    <comment>
    <![CDATA[Reads constant from bpel_constants table based on the key. The signature of this function is <i>asdf:readConstant(string)</i>.]]>
    </comment>
    <property id="namespace-uri">
    <value>http://asdf.com/xpath/CustomXpathFunction</value>
    <comment>Namespace URI for this function</comment>
    </property>
    <property id="namespace-prefix">
    <value>asdf</value>
    <comment>Namespace prefix for this function</comment>
    </property>
    </function>
    4. Then the function can be called in the bpel like for example:
    <assign name="Assign_2">
    <copy>
    <from expression="asdf:readConstant(string(bpws:getVariableData('inputVariable','payload','/client:customXPathtestProcessRequest/client:input')))"/>
    <to variable="outputVariable" part="payload" query="/client:customXPathtestProcessResponse/client:result"/>
    </copy>
    </assign>

  • Custom logging in OSB

    I want to create a common proxy service in OSB which can be called by other services for logging body, fault etc. I intend to log to three different channels : File, Queue & Database. Now the approach is
    1. While executing any OSB process, accept a "logDestination" input from the user.
    2. Within the OSB process, just do a service callout to the common OSB Logging proxy service.
    3. Logging OSB proxy service will read the "logDestination" value and based on that route to a
    file proxy service, queue proxy service etc to write logs to respective channels.
    Will this work? I tried doing this but i am unable to create and read the "logDestination" value in my common OSB logging proxy service (its in a different project).
    Need help in doing this. Thanks!

    >
    Can you please suggest a better approach ?
    >
    Well, I don't know your requirements, but concerning logging I'm quite sure that client can't (and shouldn't) decide where to log in service implementation. In other words, you should decide whether to log in file, queue or db in proxy service flow and without any explicit client input.
    >
    The problem I am facing is that I am unable to propogate the value of "logDestination" to my OSB logging proxy service. In addition to this variable value I also need to propogate the $body of the OSB process to my common logging service.
    I hav a service callout (within the stage error handler) from the OSB process to my common service. How can i propogate all the above mentioned details to the common service at the same time ? I am pretty new to OSB, so plz excuse me if thats a basic question.
    >
    It seems you are not asking this question for the first time. :-)
    How to call a OSB proxy service from a different OSB process?
    I hope my answer in that thread should help you.

  • Handling Concurrency in Oracle Service Bus11g

    Hi,
    I"m searching for how to handle concurrency within OSB.
    Scenario: +I've a proxy service which listens to MQ and whenever a message is picked up, it routes it to READProxy service and followed by CREATEProxy service or UPDATEProxy service.+
    However, the message rate is ~1000 per hour. So there could be a chance such a way two or more messages can be picked up by LISTENERProxy service at different managed servers at a time.
    Could somebody help me how to make sure READProxy service reads right data by considering the nature of concurrency?
    Thank you
    Edited by: 1002815 on May 2, 2013 10:50 AM

    Yes, you're right and this is easy and one of the best strategies..however,
    Locking Strategies: --> [http://www.dba-oracle.com/t_locking_strategies.htm]
    select for update - This holds an exclusive lock on the target row and is 100% reliable.  The downside is with disconnected session which may require DBA intervention to release the locks.  In general, the "select for update" is not used in web-based systems, or on applications with unreliable network connectivity.
    So we tried to implement Timstamp based locking but couldn't succeed as it involves millisecs and requires comparision xml timestamp to oracle timestamp..
    Just try to get help with someone who knows PL/SQL in your org or go through some tutorials over internet.Thanks for your suggestion. I can manage to understand the basic level of SQL and PL/SQL
    I'm trying to understand whether I missed out any best approach
    Thank you
    Edited by: 1002815 on May 4, 2013 10:13 AM

  • OSB Routing (static) changes

    Hi ,
    Some time back i had upgraded from osb patch set 3 ro osb patchset 6.
    In patchset 3 we saw some limitation of routing node which does static routes, because of which we needed to have all the dependent module in the sbconfig jar. or else it wouldn't create one.
    However now in patchset 6 , there is no such issue anymore, using static routes too there is no need to check in for the dependent module; which ofcourse is checked at time of deploy.
    I was looking for the oracle documentation or enhancement for this change/bug; however was not able to find; can anybody help me in finding the oracle link to this change.
    Many Thanks

    HI Matt,
    As per WS-I BP, the service provider should send the HTTP response code as 200 when the error is being sent back as normal response and 500 should be sent when the error being sent back in form of the SOAP fault.
    When HTTP response code 200 is received, OSB treats it as a normal response and $body will have the received response. And when response code 500 is received, the OSB runtime control goes to the ‘Service Error Handler’ if present or to ‘System Error Handler’.
    And OSB populates different message context variables in case of fault response with 500 code depending on whether Routing or Service Callout are used to call the business service. When routing is used, the variable $body will have the fault response. When service callout is used, the variable $fault will have the fault response in ‘ReceivedFaultDetail’ structure.
    Look at : http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/consolehelp/errorcodes.html

  • Adding Jax-RPC Handlers to OSB Proxy Service

    Hi All,
    I am new to OSB and wanted to know if I can add a Client side (My proxy Service -> external business service) Handler chain to OSB Proxy Services. I know how to add handlers to general webservice. But is there any way to intercept the request by adding handlers to OSB proxy service before it goes to business service?
    Any help is highly appreciated.
    Thanks,
    Swetha

    Hi Eric,
    Thanks for your response. we are trying to access WSRR( manages end point urls for 7 different environments) and generate the end point dynamically at the design time. As we figured out WSRR is not compatible with OSB we are trying to implement these client side (OSB Proxy service) handlers which would get the dynamic endpoint depending on the environment used. I was able to create the handlers for this and set the jar in the classpath but the client service which should be using these handlers have to have these handlers defined in the deployment descriptor(web.xml) which am unable to see with a OSB project.
    Will there be a deployment descriptor(web.xml/webservices.xml) associated with Proxy services on OSB? Or Is there any other way to add custom JAX-RPC Handlers to a proxy service? Or is there any way to connect to WSRR directly?
    Thanks,
    Swetha

Maybe you are looking for