Manage the response of Web Service in case of Fault

Hi,
invoking the adapter HTTA, the Web Service send a response. B1i manage only the failure of adapter HTTA, but not the response of Web Service. If you want use the PostProcessing BizFlow correctly, i need to manage the response for check the presence of node Fault.
This is the generic code for check this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:fo="http://www.w3.org/1999/XSL/Format" bfa:force="">
     <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
     <xsl:param name="IDOCNUM"></xsl:param>
     <xsl:template match="/">
          <bfa:call>
               <xsl:copy-of select="/bfa:call/bfa:in_doc"/>
               <xsl:copy-of select="/bfa:call/bfa:inbound"/>
               <bfa:outbound>
                    <bfa:payload>
                         <xsl:apply-templates select="bfa:call/bfa:outbound/bfa:payload"/>
                    </bfa:payload>
                    <xsl:copy-of select="/bfa:call/bfa:outbound/bfa:propertylist"/>
               </bfa:outbound>
          </bfa:call>
     </xsl:template>
     <xsl:template match="bfa:call/bfa:outbound/bfa:payload">
          <Envelope xmlns="">
               <Header>
                    <xsl:choose>
                         <xsl:when test="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault">
                              <ActionResult>failure</ActionResult>
                              <ActionMessage>
                                   <xsl:text>PROCESS FAILURE - IDOC NUM: </xsl:text>
                                   <xsl:value-of select="$IDOCNUM"></xsl:value-of>
                                   <xsl:text> - CAUSE OF FAILURE: </xsl:text>
                                   <xsl:value-of select="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault/env:Reason/env:Text"/>
                              </ActionMessage>
                              <Exception>
                              <xsl:value-of select="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault/env:Reason/env:Text"/>
                              </Exception>
                         </xsl:when>
                         <xsl:otherwise>
                              <ActionResult>success</ActionResult>
                              <ActionMessage>
                              <xsl:text>PROCESS SUCCESS - IDOC NUM: </xsl:text>
                              <xsl:value-of select="$IDOCNUM"></xsl:value-of>
                              </ActionMessage>
                         </xsl:otherwise>
                    </xsl:choose>
               </Header>
          </Envelope>
     </xsl:template>
</xsl:stylesheet>
With this example you can set the message in B1i GUI (Message Log, Message Result column) and you can set the result of action (success or failure).

Hi,
invoking the adapter HTTA, the Web Service send a response. B1i manage only the failure of adapter HTTA, but not the response of Web Service. If you want use the PostProcessing BizFlow correctly, i need to manage the response for check the presence of node Fault.
This is the generic code for check this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:fo="http://www.w3.org/1999/XSL/Format" bfa:force="">
     <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
     <xsl:param name="IDOCNUM"></xsl:param>
     <xsl:template match="/">
          <bfa:call>
               <xsl:copy-of select="/bfa:call/bfa:in_doc"/>
               <xsl:copy-of select="/bfa:call/bfa:inbound"/>
               <bfa:outbound>
                    <bfa:payload>
                         <xsl:apply-templates select="bfa:call/bfa:outbound/bfa:payload"/>
                    </bfa:payload>
                    <xsl:copy-of select="/bfa:call/bfa:outbound/bfa:propertylist"/>
               </bfa:outbound>
          </bfa:call>
     </xsl:template>
     <xsl:template match="bfa:call/bfa:outbound/bfa:payload">
          <Envelope xmlns="">
               <Header>
                    <xsl:choose>
                         <xsl:when test="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault">
                              <ActionResult>failure</ActionResult>
                              <ActionMessage>
                                   <xsl:text>PROCESS FAILURE - IDOC NUM: </xsl:text>
                                   <xsl:value-of select="$IDOCNUM"></xsl:value-of>
                                   <xsl:text> - CAUSE OF FAILURE: </xsl:text>
                                   <xsl:value-of select="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault/env:Reason/env:Text"/>
                              </ActionMessage>
                              <Exception>
                              <xsl:value-of select="soap:Envelope/soap:Body/node()/node()/env:Envelope/env:Body/env:Fault/env:Reason/env:Text"/>
                              </Exception>
                         </xsl:when>
                         <xsl:otherwise>
                              <ActionResult>success</ActionResult>
                              <ActionMessage>
                              <xsl:text>PROCESS SUCCESS - IDOC NUM: </xsl:text>
                              <xsl:value-of select="$IDOCNUM"></xsl:value-of>
                              </ActionMessage>
                         </xsl:otherwise>
                    </xsl:choose>
               </Header>
          </Envelope>
     </xsl:template>
</xsl:stylesheet>
With this example you can set the message in B1i GUI (Message Log, Message Result column) and you can set the result of action (success or failure).

Similar Messages

  • How to attach XML file in the response of Web Services

    Hi
    I am new to the WEB SERVICE. this my requirement.
    I need to make a class file a web service. and i need to get data from the data base and attach it in the response. I need to use SOAP MEssaging for this. so how to call the service from the JSP and how to get the data from the response,Before that which technology i need to use for this requirement. Plz let me know how to accomplish this task. I have gone thur lot of tech stuff and i am confused a lot, what to use and how to use. Will any one help me out.
    Thanks
    Vidya

    Hey VP, thanks for replyng.
    I have read the codes from a book and havesome code for client. The server side is yet to be done....but I have problems in compiling them as I am Unable to import javax.xml.soap.*;
    This is basically a request to the Server asking it to find the match of the word "Mickey" from the XMLfile at the server...JAXRPC is involved(I Presume:) There are some supporting files.........hey But it doesn't compile only here. Hope it does in yrs
    *******The client..........**********
    * Client
    package com.aby.jwsdp.soap.client;//the package
    import javax.xml.messaging.URLEndpoint;
    import javax.xml.soap.SOAPConnectionFactory;
    import javax.xml.soap.SOAPConnection;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamResult;
    import com.aby.jwsdp.soap.client.Fault;//supporting file
    import com.aby.jwsdp.soap.client.RequestMessage;//supporting file
    public class Client {
         static final string SERVICE_ENDPOINT="http://localhost:8080/chap/servlet/chap.RecieveServlet";
         public static void main(String args[]) {
              if(1!=args.length) {
                   System.err.println("Usage: java "+"com.aby.jwsdp.soap.client.Client <name>");
              } else {
                   new Client(args[0]);
         public Client(String name) {
              try{
                   URLEndpoint endpoint = new URLEndpoint(SERVICE_ENDPOINT);
                   SOAPConnectionFactory scf=SOAPConnectionFactory.newInstance();
                   SOAPConnection connection = scf.createConnection();
                   RequestMessage reqMsg = new RequestMessage();
                   reqMsg.setName(name);
                   SOAPMessage replySOAP = connection.call(reqMsq.getMessage(),endpoint);
                   if(Fault.hasFault(replySOAP)) {
                        Fault fault = new Fault(replySOAP);
                        System.err.println("Recieved SOAP Fault");
                        System.err.println("Fault Code: "+fault.getFaultCode());
                        System.err.println("Fault string: "+fault.getFaultString());
                        System.err.println("Fault detail: "+fault.getFaultDetail());
                   }else {
                        ResponseMessage respMsg = new ResponseMessage(replySOAP);
                        String responseValue = null;
                        try{
                             responseValue = respMsg.getValue();
                             System.out.println("Response: "+responseValue);
                        }catch(SchemaException e) {
                             System.err.println("Parsing error");
                   connection.close();
              }catch(EXception e) {
                   System.err.println(e/toString());
    /*@author Aby
    *Fault.java
    package com.aby.jwsdp.soap.client;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPFault;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.Detail;
    import javax.xml.soap.DetailEntry;
    import java.util.Iterator;
    public class Fault {
         protected SOAPFault soapFault;
         public Fault(SOAPMessage msg) throws SOAPException {
              SOAPPart soapPart = msg.getSOAPPart();
              SOAPEnvelope envelope = soapPart.getEnvelope();
              SOAPBody soapBody = envelope.getBody();
              soapFault = soapBody.getFault();
         public static boolean hasFault(SOAPMessage msg) throws SOAPException {
              SOAPPart soapPart = msg.getSOAPPart();
              SOAPEnvelope envelop = soapPart.getEnvelop();
              SOAPBody soapBody = envelop.getBody();
              return soapBody.hasFault();
         public String getFault() {
              return soapFault.getFaultCode();
         public String getFaultString() {
              return soapFault.getFaultString();
         public String getFaultDetail() {
              String ret = null;
              Detail detail = soapFault.getDetail();
              if(null!=detail) {
                   Iterator it = detail.getDetailEntries();
                   if(it.hasNext()) {
                        DetailEntry detEntry = (DetailEntry)it.next();
                   ret = detEntry.getValue();
              return ret;
    * RequestMessage.java
    package com.aby.jwsdp.soap.client;
    import com.aby.jwsdp.soap.client.Client;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPException;
    public class RequestMessage {
         protected SOAPMessage soapMessage = null;
         public RequestMessage()
         throws SOAPException {
              MessageFactory mf = MessageFactory.newInstance();
              soapMessage = mf.createMessage();
         public void setName(String name)
         throws SOAPException {
              SOAPPart soapPart = soapMessage.getSOAPPart();
              SOAPEnvelope envelope = soapPart.getEnvelope();
              SOAPBody body = envelope.getBody();
              SOAPElement requestElement;
              requestElement = body.addChildElement(envelope.createName("GetValueByName","myns","www.syngress.com/JWSDP/soap-example"));
              SOAPElement paramElement;
              paramElement = requestElement.addChildElement("name");
              paramElement.addTextNode(name);
         public SOAPMessage getMessage() {
              return soapMessage;
    check this out then we will see

  • SQL 2012 R2 - SSRS with the Report Server Web Service URL, can't access

    Hello:
    I am installing Dynamics CRM 2013.  When I am on RS Configuration manager; I am running into the SSRS (SQL 2012 on Server 2012)SQL issue, can't access the
    http://servername/:80/ReportsServer or
    http://servername/:Reports web pages
    The database server has SSRS native mode installed, it is using a domain account for the service credentials.  This account also has permission to log on a service in the GPO
    Account is a domain admin and is a local administrator
    SQL server is 2012 R2 on Windows Server 2012.  User base is less than 60 people and they have SharePoint 13 on the same SQL server.  Server more than enough resources.
    Any assistance would be appreciated.
    Thanks..Dan

    Hi DCas1,
    According to your description, you could not access
    http://servername/:80/ReportsServer or http://servername/:Reports web pages from Reporting Services configuration manager, SSRS in configured in native mode and the account you used is a local administrator.
    In Reporting Services, URLs are used to access the Report Server Web service and Report Manager. Before we can use either application, we need to configure at least one URL each for the Web service and Report Manager. If we are using the Reporting Services
    Configuration tool to create or modify the URLs, we can accept the default values for a URL or specify custom values. When we create a report server URL, we must specify the following parts: Host name, port and Virtual directory. In order to improve the efficiency
    of troubleshooting, I need to ask several questions:
    Since the default URL is http://<computername>/reportserver, did you type the URLs manually? or the URLs configured in Reporting Services configuration manager are
    http://servername/:80/ReportServer and
    http://servername/:Reports?
    Could you provide detailed information of error log(default location: %programfiles%\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles)?
    For more information about Configuring a URL, please refer to the following documents:
    http://msdn.microsoft.com/en-us/library/ms159261(v=sql.110).aspx
    http://msdn.microsoft.com/en-us/library/bb630447(v=sql.110).aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Manage session state in web service (web tier)

    Hallo, is anybody know how to manage session state in web service application?
    I 'm building an application using Sun Java System Application Server 8.1, and using web as web service end point.

    By default webservice is a stateless, but there is a option where you can specify the Request scope session/Reqeust/application
    You can use the above and have to make a change in the client side to particiapte in the session.
    Or
    In the server side you can have webservicesession tracker class...very first time when user is authenticated, you generated a unique token and send them with request....and from there on client should send the same token for further request.
    Token is checked with your webservicesession tracker class which maintains all active seesions. Session tracker class can also inactivate the token session if there was no request from the user for a certain period of time....
    Its similar to HttpSession class ( i call it as WebServiceSession.)
    If you need more help on the webservicesession class...pls let me know.

  • What do I do to close eform on screen and display response of web service in another screen.?

    Hi,
    I am trying to build following functionality.
    I want to submit form to a web service through SOAP request on click of a button.
    I want to display response of web service like “form has been submitted successfully” on screen.
    What has been achieved.
    I am able to submit form to an adobe web service passing base64 string to adobe process.(see the script in image#1).
    When I receive base64 string in adobe process, I am able to re-generate document (using getDocFromBase64(/process_data/@inputStr) ).
    After that I am returning a message string to as response “Form submitted successfully”.
    When I get the response I populate response to a text field variable (Out Str). See image#2
    Problem/Desirable functionality.
    I want to close this eform and display the message “form has been submitted successfully” on another page in browser so that it depicts to end user that form has been submitted successfully with confirmation.
    What do I do to close eform on screen and display response of web service in another screen.?
    Image#1
    Image#2

    Method1: This method only works in same PDF window.
    On the click of the submit button, based on the webservice result we can close the PDF. As you already having in the "Out Str", this variable having detailed message kind of thing, so it would be easier if you have one more output variable to know if this submission is success or failure or can use the "Out Str", it self to compare and close the PDF.
    Here i am using "strResult" to hold webservice success or failure using true/ false values.
    Get the "strResult" value from binded field of webservice response and compare and close or display messages based on requirement.
    var strResult = YourFieldname.rawValue;
                        if(strResult != "" && strResult != null){
                                  if(strResult.toUpperCase() == "TRUE"){
                                            xfa.host.messageBox("Successfully Saved the Data.", "Submit Confirmation", 3,0);
                                            //Close the PDF
                                            app.execMenuItem("Close");
                        else{
                                  xfa.host.messageBox("Failed to Save the Data.", "Submit Confirmation", 3,0);
    If the result need to show in separate window and having LiveCycle process connected to PDF via. webservice or REST:
    Method2. If the PDF inside the browser
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in same window, host pdf will be disappeared.
    Type2 - You can set the process output is string variable, this STRING may contain your static/dynamic message. In this method the string will be appered in the same PDF window, host pdf will be disappeared.
    Method3. If the PDF is stand alone (not opend in any browser)
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in new window, host pdf will be also stayed and may make readonly after submission success.
    Type2 - If the process output is string, it cannot handle this situation, may get the content type exception while receiving the result string, because.
    Used all of the above methods in various situations and it worked without any issues.
    -Raghu.

  • How do I set up Mozilla to accept connections on port "The World Wide Web service (HTTP)"?

    When attempting to embed a video in PowerPoint 2013, the message "Sorry we are having some temporary service issues" appears.
    In researching the problem at Microsoft. com, the following message was received: Mozilla is not set up to accept connections on port "The World Wide Web service (HTTP)."

    Hmm... PowerPoint should use Windows to connect to the internet and not Firefox.
    Which method are you using?
    (1) Insert > Video > Online Video
    Apparently there was an update this month that enables this, as described in this support post (see top Answer just after the question): [http://answers.microsoft.com/en-us/office/forum/office_2013_release-powerpoint/embedding-online-you-tube-video-in-powerpoint-2013/0bc00dde-420c-4c6a-bd47-3fb105ce40fc Embedding online you tube video in powerpoint 2013 - Microsoft Community]
    Here's how it should work after the update: [http://office.microsoft.com/en-us/powerpoint-help/insert-or-link-to-a-video-on-youtube-HA104192855.aspx Insert or link to a video on YouTube - PowerPoint]
    (2) Developer > More Controls > Shockwave Flash Object
    As documented on other sites, such as: https://www2.palomar.edu/pages/atrc/2013/09/17/how-to-embed-youtube-video-in-powerpoint-2013/

  • My mom helped me to create my iTunes account and load it with a 50$ gift card and now I wanted to purchase a one month subscription at the AYI dating web service but apple never let them take money from my account and I was declined,don't know why?

    My mom helped me to create my iTunes account and load it with a 50$ gift card and now I wanted to purchase a one month subscription at the AYI dating web service but apple never let them take money from my account and I was declined,don't know why?

    You have posted to the iTunes Match forum, which your question is not related to. I suggest you contact the web site from whom you wish to purchase the subscription.

  • In Java EE 7's Firstcup tutorial, why does does the web tier consume the data from the dukes-age web service?

    In the Firstcup tutorial, the responsibilities of the web tier are listed as:
    dynamically generate content for the client
    collect input from the user
    return results from business tier components
    control the flow of client screens & pages
    maintain session state
    perform basic logic
    hold data temporarily in JavaBeans components
    Which of these responsibilities would retrieving data from a web service fall under?
    The tutorial also lists the technologies used in the web tier, and JAX-RS is not included in that list. The list of technologies used by the business tier does, however, list JAX-RS. I was surprised to find the DukesBDay JavaBeans component (in the web tier) calling the dukes-age web service, instead of the DukesBirthdayBean EnterpriseBean (in the business tier), which uses hard coded value for Duke's birth date.
    Is it typical for the web tier to consume web services in this way? What about when using an application client container, wouldn't that skip the web tier altogether, and in doing so also skip the web service call? Wouldn't DukesBirthdayBean in the business tier benefit from making the call to the web service, instead of having the date hard coded into it, and wouldn't this also solve the problem of the missing web service call when using an application client container?

    Hi Shadab,
    Here is a list of Web service standards supported by SAP in NetWeaver 7.1.1: [Supported Standards|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/624479f7e608fae10000000a422035/frameset.htm] (also in [7.0|http://help.sap.com/saphelp_nw70/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm] and [7.0.1|http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm]). The Enterprise Services adhere to these standards, and on the provider side you have the tools to configure the authentication settings as needed. On the consumer side, one just has to use a Java release (or any other platform) that supports these standards.
    While I am not a Java developer, there should be [many ways to consume a Web service in Java|http://www.google.bg/search?q=consumewebservice+java].
    Hope this helps,
    Rossen

  • What is the workflow document web services service?

    Workflow approval message is stuck in the inbox. It mail_status is mail. It's status is open.
    I can see the approval message in the inbox and it is holding up other emails as it's just sitting there.
    I can't see any reason for it to be sitting there so I bounced the WF Notification Mailer using:
    service_components -> WorkflowMailer Service -> Stop All wait for it to stop completely then -> start all
    So after starting all -> the workflow services (all 3 ) State is Activated, but there is a Big red X in the Status and the status of the workflow I'm trying to get out of the inbox is still open.
    There is nothing in the logs yet so I can't see what that big red X means.
    So I decide to stop and start the WF services one by one.
    I stop workflow document web services service first. As soon as it starts to stop, the Worfkflow agent listener and the Workflow Mailer suddenly start up, the big red X goes away and the messages in the inbox all process.
    What's up with that? What is " the workflow document web services service?" and why is it hanging my Mailer?

    What is the application release?
    what is the workflow document web services service?Oracle Workflow Administrator's Guide -- Page 7-75
    http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121wfag.pdf
    Workflow approval message is stuck in the inbox. It mail_status is mail. It's status is open.
    I can see the approval message in the inbox and it is holding up other emails as it's just sitting there.Can you find any errors in the Workflow log file?
    A Guide For Troubleshooting Workflow Notification Emails - Inbound and Outbound [ID 831982.1]
    Outbound Workflow Email Notification is Not Received [ID 370327.1]
    How to Perform a Meaningful SMTP Telnet Test to Troubleshoot Java Mailer Issues [ID 753845.1]
    What to Review When Notifications are not Emailed (Outbound Processing) ? [ID 1051421.1]
    Also, see old threads for similar discussion.
    Receive Workflow Notification
    http://forums.oracle.com/forums/search.jspa?threadID=&q=Receive+Workflow+Notification&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Delete / create the operations in Web services incoming

    Hi Experts,
    I have a situation, I begins in SIEBEL, and I have a question: I search the command that allows me to delete / create the operations in Web services incoming.
    Thanks;
    Hussam

    Help me please!!

  • ORA-31050:Access denied when trying enabling the database-native Web servic

    Dear all,
    I'm trying to follow the instruction of OBE about "Using Oracle XML DB Web Services for Service-Oriented Architecture " as this url http://st-curriculum.oracle.com/obe/db/11g/r1/prod/datamgmt/xmldb2_b/xmldb2_b.htm#http .
    I would like to enable the database-native Web service end point in Oracle XML DB and I already execute the script to create Web Service Endpoint.
    Anyway, I got the following error.
    ORA-31050: Access denied
    ORA-06512: at "XDB.DBMS_XDB", line 528
    ORA-06512: at "SYSTEM.ADDSERVLETMAPPING", line 91
    I found that this procedure was created on system schema but the problem occur when I tried to call ADDSERVLETMAPPING procedure.
    This is a code that I used to enable.
    set pagesize 100
    set linesize 132
    set long 20000
    set echo on
    -- conn sys/oracle as sysdba
    create or replace procedure addServletMapping (pattern varchar2,
    servletname varchar2,
    dispname varchar2,
    servletclass varchar2,
    servletschema varchar2,
    language varchar2,
    description varchar2,
    securityRole xmltype) as
    xdbconfig xmltype;
    begin
    xdbconfig := dbms_xdb.cfg_get();
    select deleteXML
    xdbconfig,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name="' || servletname || '"]'
    into xdbconfig
    from dual;
    if (language = 'C') then
    select insertChildXML
    xdbconfig,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list',
    'servlet',
    xmlElement
    "servlet",
    xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"),
    xmlForest
    servletname as "servlet-name",
    language as "servlet-language",
    dispname as "display-name",
    description as "description"
    securityRole
    into xdbconfig
    from dual;
    else
    select insertChildXML
    xdbconfig,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list',
    'servlet',
    xmlElement
    "servlet",
    xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"),
    xmlForest
    servletname as "servlet-name",
    language as "servlet-language",
    dispname as "display-name",
    description as "description",
    servletclass as "servlet-class",
    servletschema as "servlet-schema"
    into xdbconfig
    from dual;
    end if;
    select deleteXML
    xdbconfig,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping[servlet-name="' || servletname || '"]'
    into xdbconfig
    from dual;
    select insertChildXML
    xdbconfig,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings',
    'servlet-mapping',
    xmltype
    '<servlet-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
    <servlet-pattern>'||pattern||'</servlet-pattern>
    <servlet-name>'||servletname||'</servlet-name>
    </servlet-mapping>'
    into xdbconfig
    from dual;
    xdb.dbms_xdb.cfg_update(xdbconfig);
    end;
    call addServletMapping(
    '/orawsv/*',
    'orawsv',
    'Oracle Query Web Service',
    null,
    null,
    'C',
    'Web Services Servlet',
    xmltype(
    '<security-role-ref>
    <role-name>XDB_WEBSERVICES</role-name>
    <role-link>XDB_WEBSERVICES</role-link>
    </security-role-ref>'
    call addServletMapping(
    '/orawsdl/*',
    'orawsdl',
    'Oracle WSDLs',
    null,
    null,
    'C',
    'WSDL Servlet',
    xmltype(
    '<security-role-ref>
    <role-name>XDB_WEBSERVICES</role-name>
    <role-link>XDB_WEBSERVICES</role-link>
    </security-role-ref>'
    --grant XDB_WEBSERVICES to oe
    grant XDB_WEBSERVICES to TESTDB
    -- For 11g only
    --grant XDB_WEBSERVICES_OVER_HTTP to oe
    grant XDB_WEBSERVICES_OVER_HTTP to TESTDB
    --grant XDB_WEBSERVICES_WITH_PUBLIC to oe
    grant XDB_WEBSERVICES_WITH_PUBLIC to TESTDB
    -- Clean up afterward
    drop procedure addServletMapping
    Regards,
    Zenoni
    Edited by: zenoni on Jan 28, 2011 10:18 AM

    Test if you can access the generic WSDL using a browser
    http://server:port/orawsv?wsdlYou should get prompted for a username and password. If you provide the username and password of a database user who was been granted the Web Services Roles you should see the query service WSDL
    <definitions name="orawsv" targetNamespace="http://xmlns.oracle.com/orawsv"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:tns="http://xmlns.oracle.com/orawsv"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
    <types>
      <xsd:schema
            targetNamespace="http://xmlns.oracle.com/orawsv"
       elementFormDefault="qualified">
       <xsd:element name="query">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:element name="DDL_text" type="xsd:string"
           minOccurs="0" maxOccurs="unbounded" />
          <xsd:element name="query_text">
           <xsd:complexType>
            <xsd:simpleContent>
             <xsd:extension base="xsd:string">
              <xsd:attribute name="type">
               <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                 <xsd:enumeration value="SQL" />
                 <xsd:enumeration value="XQUERY" />
                </xsd:restriction>
               </xsd:simpleType>
              </xsd:attribute>
             </xsd:extension>
            </xsd:simpleContent>
           </xsd:complexType>
          </xsd:element>
          <xsd:choice minOccurs="0" maxOccurs="unbounded">
           <xsd:element name="bind">
            <xsd:complexType>
             <xsd:simpleContent>
              <xsd:extension base="xsd:string">
               <xsd:attribute name="name" type="xsd:string" />
              </xsd:extension>
             </xsd:simpleContent>
            </xsd:complexType>
           </xsd:element>
           <xsd:element name="bindXML">
            <xsd:complexType>
             <xsd:sequence>
              <xsd:any/>
             </xsd:sequence>
            </xsd:complexType>
           </xsd:element>
          </xsd:choice>
          <xsd:element name="null_handling" minOccurs="0">
           <xsd:simpleType>
            <xsd:restriction base="xsd:NMTOKEN">
             <xsd:enumeration value="DROP_NULLS" />
             <xsd:enumeration value="NULL_ATTR" />
             <xsd:enumeration value="EMPTY_TAG" />
            </xsd:restriction>
           </xsd:simpleType>
          </xsd:element>
          <xsd:element name="max_rows" type="xsd:positiveInteger" minOccurs="0"/>
          <xsd:element name="skip_rows" type="xsd:positiveInteger" minOccurs="0"/>
          <xsd:element name="pretty_print" type="xsd:boolean" minOccurs="0"/>
          <xsd:element name="indentation_width" type="xsd:positiveInteger" minOccurs="0"/>
          <xsd:element name="rowset_tag" type="xsd:string" minOccurs="0"/>
          <xsd:element name="row_tag" type="xsd:string" minOccurs="0"/>
          <xsd:element name="item_tags_for_coll" type="xsd:boolean" minOccurs="0"/>
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>
       <xsd:element name="queryOut">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:any/>
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>
      </xsd:schema>
    </types>
      <message name="QueryInput">
       <part name="body" element="tns:query"/>
      </message>
      <message name="XMLOutput">
       <part name="body" element="tns:queryOut"/>
      </message>
      <portType name="ORAWSVPortType">
       <operation name="XMLFromQuery">
        <input message="tns:QueryInput"/>
        <output message="tns:XMLOutput"/>
       </operation>
      </portType>
      <binding name="ORAWSVBinding" type="tns:ORAWSVPortType">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="XMLFromQuery">
        <soap:operation soapAction="http://localhost/orawsv"/>
        <input>
         <soap:body use="literal"/>
        </input>
        <output>
         <soap:body use="literal"/>
        </output>
       </operation>
      </binding>
      <service name="ORAWSVService">
       <documentation>Oracle Web Service</documentation>
       <port name="ORAWSVPort" binding="tns:ORAWSVBinding">
        <soap:address location="http://localhost/orawsv"/>
       </port>
    </service>
    </definitions>Edited by: mdrake on Jan 27, 2011 8:42 PM

  • JDeveloper Configuration to Deploy the pl/sql web services to external oc4j

    Hello
    I am using JDeveloper 10.1.3.1.0,
    I have a created a pl/sql webservice and when i deply, it was working
    successfully with embedded OC4j.
    I want to deply that web serive to external oc4j.
    Could any suggest me, what are configurations required to set in external oc4j
    to deploy the pl/sql web services.
    Regards
    Malathi

    Hi
    We have already registered the application server and Database in the connections navigator.In the Application server,we have created different domains.
    We used to deploy the bpel process to particular domain in the appplication server.
    But for the web services,when we deply the web service, we were getting only the application server name,how can we deploy our process to external oc4j(Application server)?
    Regards
    Malathi

  • Enterprise Manager can't show web-service in the web-services area

    I'm deploying my application(stateless web-service) it work's well, but Enterprise Manager show that it's not a web-service, it can't show application in the web-services area, this fuсking server have many-many-many bugs and errors (fuсking developers was drunken a lot, imho), documentation's have many errors too, and I hate this server, but I need to use it on my work :-(
    p.s. read documentation's carefully it have many errors.
    p.p.s. From Russia with LOVE! Russian developers are the best from the best!

    Hello,
    Could you be more specific about the version of OracleAS you are using?
    - which exact version ? (10.1.3.x, 10.1.2.x or 9.0/x)
    - which kind of Web Service are you developing? (J2EE 1.4/JAX-RPC or earlier version)
    Also if you find bug in the documentation or product please send let the Oracle Support Service knows.
    Regards
    Tugdual Grall

  • Extracting the data from web service response

    Hi,
    I called a web service and in response got an XML data, now I have to extract the values and store in table
    My steps,
    1,call web service
    2,stored response in CLOB column
    3,Then used following query
    SELECT loc.*
    FROM my_xml PO,
    XMLTable(XMLNAMESPACES(
    'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
    ,'http://api.***.com/' as "ns0"
    ,'/ns0:DataSet/diffgr:diffgram/NewDataSet/OptOutAll'
    PASSING xmltype.createxml(PO.xml_data)
    COLUMNS
    "Email" CHAR(100) PATH 'Email',
    "Reason" CHAR(150) PATH 'Reason'
    ) As loc
    WHERE ROWNUM <= 10;
    I have written it by using this example
    But it is not working, dont know why
    /Zab

    If I use the following sample XML (stored in XMLType table TMP_XML) :
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
        <GetOptOutAllResponse xmlns="http://api.***.com/">
          <GetOptOutAllResult>
            <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas- microsoft-com:xml-msdata">
              <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                <xs:complexType>
                  <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="OptOutAll">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="OptOutTime" type="xs:dateTime" minOccurs="0"/>
                          <xs:element name="Email" type="xs:string" minOccurs="0"/>
                          <xs:element name="MailingList" type="xs:string" minOccurs="0"/>
                          <xs:element name="SendQueueId" type="xs:int" minOccurs="0"/>
                          <xs:element name="Reason" type="xs:string" minOccurs="0"/>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:choice>
                </xs:complexType>
              </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
              <NewDataSet xmlns="">
                <OptOutAll diffgr:id="OptOutAll1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-05-09T22:40:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-07T22:30:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll3" msdata:rowOrder="2" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-14T00:20:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll4" msdata:rowOrder="3" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-19T20:50:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
              </NewDataSet>
            </diffgr:diffgram>
          </GetOptOutAllResult>
        </GetOptOutAllResponse>
      </soap:Body>
    </soap:Envelope>Then I can do :
    SQL> SELECT x.*
      2  FROM tmp_xml t
      3     , XMLTable(
      4         XMLNamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "soap"
      6         , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
      7         , 'http://api.***.com/' as "ns0"
      8         )
      9       , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
    10         PASSING t.object_value
    11         COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
    12               , MailingList VARCHAR2(100)            PATH 'MailingList'
    13               , Reason      VARCHAR2(150)            PATH 'Reason'
    14       ) x
    15  ;
    OPTOUTTIME                          MAILINGLIST                    REASON
    09/05/12 22:40:00,000000 +02:00     information                    Subscriber confirmed
    07/06/12 22:30:00,000000 +02:00     information                    Subscriber confirmed
    14/06/12 00:20:00,000000 +02:00     information                    Subscriber confirmed
    19/06/12 20:50:00,000000 +02:00     information                    Subscriber confirmed
    Are you getting anything different?

  • How to provide the data directly for the report using web service

    Hi all,
    I'm trying to execute a report from the webservice API (using BIP version 10.1.3.4) and want to provide the report with a pre-fetched data set. According to the Dev-Guide, I should use element /ReportRequest/reportData for this, but I can't find a proper example illustrating this use case. The problem is that I don't know how to enter my data set into the element. My data set is xml (text) while the data type of the reportData element is base64binary.
    I've tried something like the following, but without any success:
    ...<reportData>
           <ns1:rowset>
               <ns1:row>
                   <ns1:emp>
                      <ns1:name>
                   </ns1:emp>
               </ns1:row>
           </ns1:rowset>
       </reportData>
    ...Any help is highly appreciated.
    Thanks in advance,
    H
    Edited by: Harm Verschuren on Nov 10, 2008 1:01 PM

    Hello,
    Thanks for your answer, the situation is a little different from what you describe.
    We make a call to BI Publisher via a Web Service (PublicReportService) via the ReportRequest operation.
    The report we call contains a query to a database.
    When we do not include XML in the reportData field then the report data is obtained from the Database and the report result is returned via the Web Service.
    !http://s3.amazonaws.com/twitpic/photos/full/2863197.jpg?AWSAccessKeyId=0ZRYP5X5F6FSMBCCSE82&Expires=1235722431&Signature=oboPzLWqQDwB2AGCDCAj3ujHRi4%3D!
    When, however, we include XML data in the reportData field, then we see that ONLY the XML data in the reportData field is used, and NOT data from the Database.
    !http://twitpic.com/img/1pzrp-81573d3dde07b9b643d91800cf2715ef.49a79f9e-original.jpg!
    Is there a possibility to combine the two?
    Regards Léon

Maybe you are looking for

  • Null values not getting

    Hi all, Below query is not getting null values. Please help me to get the null values. SELECT T5.name, T4.VOD_NAME, count(T6.ATTRIB_03) FROM SIEBEL.S_VOD_VER T1 INNER JOIN VOD T2 ON T1.VOD_ID = T2.ROW_ID LEFT OUTER JOIN ISS_OBJ_DEF T3 ON T1.VOD_ID =

  • How to upload data from R/3 system to BW

    hi friends, i m new to SAP BW........... i hv upload data from local pc file to SAP bw system............ but i dont know jow to upload data from sap r/3 system to bw.......? pls tell me step by step procedure...for this..........?

  • Elements 11 and Bridge

    I have been using Photoshop Elements 8 and Bridge CS4 happily with my Nikon d40x Camera.  I imported the photos into a folder and opened them with Bridge in camera raw, rated them with stars, and used Photoshop Elements 8 for editing.  My camera brok

  • HT1727 i lost all that i paid cash for..... computer crashed now on a differant computer

    i had a laptop that crashed.i am now on a differant laptop but using same itune account and it will not bring up any music or apps the i paid for

  • Podcasts show up as music and not podcasts

    All of my podcasts synch to my iPhone as music and do not show up under podcasts. They do show up as podcasts in my iTunes. Does this happen to anyone else or does anyone know a solution to this?