Get Metadata XML per HTTP

Hi all,
I got the following code which retrieves the metadata.xml file from the local hard disk working, but now I need to load the file with a HTTP request. Is that possible and if so how?
Here is the code for the local file import:
SELECT image FROM mytable WHERE id = 1 FOR UPDATE' INTO image;
meta := XMLTYPE(BFILENAME(dir_name, file_name), NLS_CHARSET_ID('WE8MSWIN1252'));
image.putMetadata(meta);
Thank you for your feedback.

You can use the UTL_HTTP package to access content stored outside the database.
You could also use create an ORDDoc object, set the source information to HTTP and the URL and then call import. This will import the XML into the clob of the ORDDoc. You can then use the getContent() method to retrieve the lob locator and use that to construct an XMLType.

Similar Messages

  • Where to get to xml to alter photo gallery?

    In the new format for BC I can't seem to find where to upload a XML file to help me tweek the photo gallery.
    I was going to buy this tutorial in the hopes it will help me fix the sizing issue of the Photo Gallery. When a picture is really large it fills the whole page when the picture is in slideshow mode. I can't figure out how to change this, however, I've seen the XML referenced a few times. Any help on where to do so in the new  layout?"
    Or thoughts on this tutorial helping?
    http://kiyuco.com/tutorials/build-a-custom-gallery-using-the-photo-gallery-module

    The first thing to change is the module paramaters...
    {module_photogallery,ID,rowLength,targetFrame,resultsPerPage,Width,Height,UseStandardMethod,thumbnailAlgorithm}
    ID - System generated ID (Do not change this number.)
    rowLength - Set the number of photos displayed per row
    targetFrame - Set the destination frame where the photos will open (such as _blank)
    resultsPerPage - Set the number of photos displayed per page
    Width/Height - Set the width and height of the thumbnail images. The default value is 80 pixels wide by 80 pixels high.
    UseStandardMethod - Use the standard Thumbnail Generation. Set to False for better thumbnail quality (with increased file size).
    thumbnailAlgorithm - To avoid squashed images and control image proportion size. Use the following paramaters: proportional,fill,fill_proportional.
    To get the xml feed you go to the gallery in the admin it will be there.

  • Oracle.adf.controller.activity.ActivityLogicException: ADFC-02013: Unable to get metadata for activity

    Hello,
    I am new to ADF, I am trying to learn how to navigate from one page to another, the code that I have is simple, but it is not working, I specified the control flow rules in the adfc-config.xml and I even tried to specify the navigation rules in the faces-config.xml file, but it doesn't matter if I do it in one configuration file or another I get the same error.  This is my first time working with ADF, I don't have formal training, just some video tutorial that I have seen on internet.  I have previous experience with JSF, so I feel more comfortable writing the code for my program than using all the graphical tools (at least at this moment)
    Any help to solve this problem will be highly appreciated.
    This is my page1.jsf  code:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
        <af:document title="page1.jsf" id="d1" binding="#{backingBeanScope.backing_page1.d1}">
            <af:form id="f1" binding="#{backingBeanScope.backing_page1.f1}"></af:form>
        </af:document>  
        <h:head>
            <title>First JSF Example</title>
        </h:head>   
        <h:body>
            <h3>ADF Hello World Example</h3>
            <h:form>
                What's your name?
                <h:inputText value="#{backingBeanScope.backing_page1.message}"></h:inputText>
                <h:commandButton value="Welcome Me" action="#{backingBeanScope.backing_page1.processPage1}"></h:commandButton>
            </h:form>
        </h:body>   
    </f:view>
    This is my backing bean for page1:
    package view.backing;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    public class Page1 {
        private RichForm f1;
        private RichDocument d1;
        private String message;
        public void setF1(RichForm f1) { this.f1 = f1; }   
        public RichForm getF1() {return f1;}   
         public void setD1(RichDocument d1) {this.d1 = d1;}
        public RichDocument getD1() {return d1;}
        public void setMessage(String msg) { this.message= msg;  }
        public String getMessage() { return this.message; }
        public String processPage1()
            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++move to next page");
            return "success";   
    This is my adfc-config.xml file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <control-flow-rule id="__5">
        <from-activity-id>page1.jsf</from-activity-id>
        <control-flow-case id="__6">
          <from-action>#{backingBeanScope.backing_page1.processPage1}</from-action>
          <from-outcome>success</from-outcome>
          <to-activity-id>page2.jsf</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <managed-bean id="__2">
        <managed-bean-name>backing_page1</managed-bean-name>
        <managed-bean-class>view.backing.Page1</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1page1.jsf-->
      </managed-bean>
      <managed-bean id="__1">
        <managed-bean-name>backing_page2</managed-bean-name>
        <managed-bean-class>view.backing.Page2</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1page2.jsf-->
      </managed-bean>
    </adfc-config>
    Finally this is my page2.jsf
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"  xmlns:h="http://java.sun.com/jsf/html">
        <af:document title="page2.jsf" id="d1" binding="#{backingBeanScope.backing_page2.d1}">
            <af:form id="f1" binding="#{backingBeanScope.backing_page2.f1}"></af:form>
        </af:document>
        <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_page2-->
        <h:body>
            <h3>ADF Hello World Example PAGE2</h3>  
        </h:body>     
    </f:view>
    This is the error that I get when I push the button on page1 and I try to navigate to page 2:
    Target URL -- http://127.0.0.1:7101/EcatsADF12c-ViewController-context-root/faces/page1.jsf
    <org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl> <ViewHandlerImpl> <_checkTimestamp> <TIMESTAMP_CHECKING_ENABLED_SHOULDNOT_IN_PRODUCTION>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,015 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,014 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,013 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,017 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,016 during the configured idle timeout of 5 seconds.>
    ++++++++++++++++++++++++++++++++++++++++++++++move to next page
    <oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 11 created with problem key "ADFC-02013 [ADFc]">
    <oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 12 created with problem key "ADFC-02013 [ADFc]">
    <oracle.adf.view> <RichExceptionHandler> <_logUnhandledException> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5>
    oracle.adf.controller.activity.ActivityLogicException: ADFC-02013: Unable to get metadata for activity 'page2.jsf'.
      at oracle.adfinternal.controller.util.Utils.createAndLogActivityLogicException(Utils.java:234)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:1133)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:979)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:551)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:162)
      at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:119)
      at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:88)
      at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
      at javax.faces.component.UICommand.broadcast(UICommand.java:315)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1074)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    User, tell us your jdev version, please!
    What is your goal?
    What you have find had nothing to do with ADF. If you ent to learn adf then I recommend to work through find of the tutorials available on the jdev home page.
    If adf is not your goal, you might want to use Trinidad and ask your question in their forum.
    You might not like the declarative approach adf uses, but if you want to learn how to use adf, you have to understand how ADF works. Most can be done using java, but one you understand the framework you see the advantage.
    Timo

  • FlashBuilder Burrito - metadata code completion (metadata.xml)

    Hello,
    I’ve already posted my question on the Flex Coders Yahoo Group, but I think Adobe Forums>Flash Builder>Using Flash Builder http://forums.adobe.com/ http://forums.adobe.com/ is more appropriate for this kind of questions. So, here is my problem:
    There is an actionscript framework called Robotlegs ( http://www.robotlegs.org/ ), which uses automated, metadata based Dependency Injection.
    The code for an injection could look like this:
    [Inject]
    public var myDependency:Depedency; //unnamed injection
    or this:
    [Inject(name="myNamedDependency")]
    public var myNamedDependency:NamedDepedency; //named injection
    The new, great features in FlashBuilder Burrito allow us to create code templates.
    I can add a new pattern like this:
    [Inject]
    public var ${ myDependency }:${ Depedency };
    "Flash Builder also supports metadata tags from third party SWCs if they have the required metadata.xml file embedded in them." (
    http://www.adobe.com/devnet/flex/articles/coding_enhancements_burrito.html#articlecontentA dobe_numberedheader_0 )
    Under \Adobe Flash Builder Burrito\sdks\4.5.0\frameworks there is a metadata.xml file.
    Following that example, I think that I could do something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <annotations version="1.0">
    <metadata name="Inject" description=”the uber cool robotlegs Injection”>
    <context name="class" />
    <context name="variable" />
    <context name="method" />
    </metadata>
    </annotations>
    for a Field Injection, a Method Injection and a Constructor Injection in Robotlegs.
    Question
    How exactly should the metadata.xml file look like in order to get 
    [Inject(name="myNamedDependency")]
    public var myNamedDependency:NamedDepedency;
    in your code, meaning the [Inject] metadata tag and a template for the variable?
    I’d really appreciate your help.
    Cheers,
    Ondina

    There is some output however the tag appears different
    Instead of appearing as this
    <title>GENERIC TITLE</title>
    <title>GENERIC TITLE</title>
    It appears as
    <title xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2" xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2" xmlns:ezicp="http://sampleURL/xsd/ezicp_rootv1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">GENERIC TITLE</title>
    <title xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2" xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2" xmlns:ezicp="http://sampleURL/xsd/ezicp_rootv1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">GENERIC TITLE</title>
    Not sure where I am going wrong. I used the same code as above with the code you have written below.
    Many thanks

  • Not able to get MetaData of BlobItems using java or by using the URI

    line1
    String metadta = blob.getMetadata().toString();
    line2 System.out.println(metadta);
    line3 blob.download(fileOutputStream);
    line4 metadta = blob.getMetadata().toString();
    line5 metadta.toString();
    line6 System.out.println(metadta);
    I will get NullPointerException on Line1
    And will be Able to get MetaData of the blob item after i initiate download .

    Hi,
    You have got NullPointerException on Line1, what was this blob on line 1, I didn't very familar with java, but from my experience, we need to know the details of getMetadata(), about download blob file, I suggest you read this article:
    http://www.windowsazure.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/
    Best Regards
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do you query the Hotmail Calendar with a freebusy URL to get an XML response ?

    Hello,
    I've posted this on the Exchange Server Legacy thread, but they point me back here....
    Assuming that Outlook's (Hotmail's) Calendar service still supports XML FreeBusy requests, what am I doing wrong here ?
    I'm sending this GET request to obtain an XML return that I can then further process:
    GET / HTTP/1.1
    owa/public/?cmd=freebusy&start=2014-12-04T14: 00:00+01:00&end=2014-12-08T16:00:00+01:00&interval=30&u=SMTP:*** Email address is removed for privacy ***
    Translate: t User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
    Content-Type: text/xml
    Host:
    www.calendar.live.com
    (Translate: t comes from http://www.infinitec.de/post/2004/12/31/Retrieving-a-users-availability-(freebusy-data).aspx)
    (User-Agent seems needed in order to get an XML response)
    It keeps giving me "400 - BAD REQUEST".
    What is the correct syntax for this  ?

    Hi,
    From your description, I would like to clarify the following things:
    1. If you use an Exchange account, you can use an OWA command to retrieve Free/busy information for a particular user.
    2. In your case, you use an Hotmail account. Actually, we have a dedicated support team regarding the Microsoft Outlook.com . I recommend you ask your question on our Microsoft Outlook.com forum which is staffed by more experts specializing in this kind
    of problems. Your understanding will be appreciated.
    For your convenience:
    http://answers.microsoft.com/en-us/outlook_com/forum/ocalendar?tab=Threads
    Hope this can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • Data template with xml over http

    Hi!
    I have a data template what should get data from xml file.
    <dataTemplate name="ccbXML" description="For xml output">
    <properties>
    <property name="debug_mode" value="on"/>
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    <property name="scalable_mode" value="on"/>
    <property name="db_fetch_size" value="1000"/>
    </properties>
    <dataQuery>
    <xml name="DATA_XML">
    <url method="GET" realm="" username="" password="">http://my.site.sise/00000000070000000001.xml</url>
    </xml>
    </dataQuery>
    </dataTemplate>
    The result is:
    <CCBXML>
         <LIST_data_xml></LIST_data_xml>
    </CCBXML>
    When I use:
    <url method="GET" realm="" username="" password="">file:///D:\files\result.xml</url>
    then I get a parsal result from the XML (it is not structuated and it does not show all the xml content, only random tag's).
    In the end it is not possible for me to use the file protocol because the xml is generated dynamically in a http page. Is it even possible to use the http protocol in data template? Or is anything else wrong with my data template that I'm not getting the right result (even with file:///)?
    I work BI Publisher Enterprise Release 10.1.3.4
    Evelyn

    Could u please send the working example for http binding on SOA Suite 11 g.
    Thanks and Regards,
    Anil verma

  • XML over HTTP

    Hi,
    I found the code below in the question of the week archive (http://developer.java.sun.com/developer/qow/archive/84/) and was wondering could anyone tell me what I need to do to get it running. I have JDK1.3, the xerces parser and Tomcat.
    It's a basic Java technology framework for getting an applet to send an XML message (Document) to a Servlet, and get another XML message (Document) back in response.
    import org.w3c.dom.*;
    import org.apache.xerces.*;
    import org.apache.xerces.dom.*;
    import org.apache.xerces.parsers.*;
    import org.apache.xml.serialize.*;
    import org.xml.sax.*;
    import java.net.*;
    import java.io.*;
    class XmlBridge {  
    private String sURI;
    public XmlBridge(String serverURI) {      
         sURI = serverURI;
    public Document sendRequest(Document doc) {
         Document docOut = null;      
         try {
         URL url = new URL("http://" + sURI);
         HttpURLConnection conn =
         (HttpURLConnection)
         url.openConnection();
         conn.setDoInput(true);
         conn.setDoOutput(true);
         OutputStream out =
         conn.getOutputStream();
         XMLSerializer ser =
              new XMLSerializer(out,
              new OutputFormat("xml",
              "UTF-8", false));
         ser.serialize(doc);
         out.close();
         DOMParser parser = new DOMParser();
         parser.parse(new
         InputSource(conn.getInputStream()));
         docOut = parser.getDocument();
         } catch (Throwable e) {
         e.printStackTrace();
         return docOut;
    public static void main(String[] args) {
         try {  // Build up an XML Document
         Document docIn = new DocumentImpl();
         Element e =
         docIn.createElement("Order");
         e.appendChild(docIn.createElement(
         "Type"));
         e.appendChild(docIn.createElement(
         "Amount"));
         docIn.appendChild(e);
         // Send it to the Servlet
         XmlBridge a =
         new XmlBridge(args[0]);
         Document docOut =
         a.sendRequest(docIn);
         // Debug - write the sent
         //Document to stdout
         XMLSerializer ser =
         new XMLSerializer(System.out,
         null);
         ser.serialize(docOut);
         } catch (Throwable e) {
         e.printStackTrace();
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import org.apache.xerces.*;
    import org.apache.xerces.dom.*;
    import org.apache.xerces.parsers.*;
    import org.apache.xml.serialize.*;
    public abstract class XmlServlet
    extends GenericServlet {    
    protected abstract Document
    doRequest(Document req);
    public XmlServlet() {}
    public void service(ServletRequest
    req, ServletResponse res)
    throws ServletException {
         try {
         DOMParser parser =
         new DOMParser();
         parser.parse(new InputSource(
         req.getInputStream()));
         Document docOut =
         doRequest(
         parser.getDocument());
         XMLSerializer ser =
              new XMLSerializer(
              res.getOutputStream(),
              new OutputFormat("xml",
              "UTF-8", false));
         ser.serialize(docOut);     
         res.getOutputStream().close();
         } catch (Throwable e) {        
         e.printStackTrace();

    Check out JDOM, it's gonna be rolled into the core Java soon, see the link below:
    http://www.jdom.org
    It's very cool and simplifies just about everything to do with XML...
    You can then write an XML file to a HTTP connection easily...and have the other end read it in easily...

  • XML over HTTP using BPEL (not using SOAP)... is this possible?

    Hi there.
    We're trying to expose a BPEL process which will be exclusively triggered from a HTTP POST. The Client Partner Link in the BPEL process models Oracle's Transparent PunchOut standard. This standard is strict XML-over-HTTP, SOAP is not involved.
    However, I am getting issues when I POST the XML to BPEL. It is telling me that it requires a SOAPAction in the header. Again, the design dictates that this is raw XML over HTTP, so we are not to use any SOAP specific header values nor any kind of SOAP wrapper.
    I deployed the sample 'HTTPPostService' process which was delivered with BPEL. I am seeing the same error when I try to POST XML to this process as well. I get a response (in a SOAP wrapper) saying that it wants a SOAPAction in the header. The WSDL used to create this sample process clearly does not bind to SOAP, (there are no mentions of the SOAPAction in the operation, etc) so I do not understand.
    So, my question is: Is is possible to POST raw XML to a BPEL process? Or does BPEL require all processes to follow the SOAP 'protocol' ?
    Thanks for any help.
    Message was edited by:
    [email protected]

    I am also trying to do the same stuff. If i deploy the sample application HttpGetService, will i be able to send the request from browser the way we send typical http get request?
    here is the url which i want to use to invoke Http get BPEL
    http://cybage1:9700/httpbinding/default/HTTPGetService?ssn=10&id=20
    but i am getting following exception
    500 Internal Server Error
    java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
         at java.util.ArrayList.RangeCheck(ArrayList.java:507)
         at java.util.ArrayList.get(ArrayList.java:324)
         at com.collaxa.cube.ws.http.HttpBindingServlet.call(HttpBindingServlet.java:113)
         at com.collaxa.cube.ws.http.HttpBindingServlet.doGet(HttpBindingServlet.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:798)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:278)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • How to get built.xml for ear file in jdeveloper?

    Hi,
    I am using JDeveloper to create EAR file for my ADF Fusion Application. I think Jdeveloper use ant to create EAR file. I know how to get built.xml for my war file.
    Can anyone tell how to get that built.xml that create EAR file in Jdeveloper.?

    This blog explains:
    http://adfhowto.blogspot.com/2011/03/ojdeploy-deploying-adf-application-from.html
    Based on the blog, I simply copied an existing project "deploy" target definition and augmented the project's build.xml with a new target "deployApp" that omits the Project parameter to ojdeploy. This causes ojdeploy to build the workspace-level deploy profile instead. I also omitted the output directory parameter (default is app's /deploy folder) and assume that there is only one application deployment profile (i.e. the default for profile parameter is the '*' wildcard). You can augment the build.properties file if you need to get fancier than that.
    <target name="deployApp" description="Deploy Complete YourFoo Application"
    depends="init">
    <taskdef name="ojdeploy"
    classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
    uri="oraclelib:OJDeployAntTask"
    classpath="${oracle.jdeveloper.ant.library}"/>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
    executable="${oracle.jdeveloper.ojdeploy.path}"
    ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
    ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
    <ora:deploy>
    <ora:parameter name="workspace"
    value="${oracle.jdeveloper.workspace.path}"/>
    <ora:parameter name="profile"
    value="${oracle.jdeveloper.deploy.profile.name}"/>
    <ora:parameter name="nocompile" value="true"/>
    </ora:deploy>
    </ora:ojdeploy>
    </target>

  • Post XML over HTTPS in a loop

    HI,
    I have a requirement to post XMLs over HTTPS. I also am supposed to retrieve the response XML, interpret it and do some processing based on the response status in the response XML. This has to be done for each XML.
    Currently I am establishing a new HTTPsURLConnection for each XML, wrting the XML to output stream, retrieving the response from input stream and then releasing the connection using disconnect() method.
    Is this the recommended approach or should I be creating just one connection for posting all the XMLs? Also, does java use some kind of connection pooling while creating HTTPURLConnection?
    I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?
    This program is running as a stand alone program on unix box.
    Regards,
    Jacob

    Is this the recommended approachYes.
    or should I be creating just one connection for posting all the XMLs?No.
    Also, does java use some kind of connection pooling while creating HTTPURLConnection? Yes.
    I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?Could be, especially if you're doing them in parallel.

  • A web service that returns a xml file and gets another xml file as input?

    Hi,
    I want to create a web service which gets an xml document as input then returns again an xml document.How can I create this kind of web service?
    Is this kind of implementation is possible?
    public Document mywebservice(Document input){
    Document d;
    return d;
    or do I have to use serialization processes which I don't know very much.
    I am waiting for your help.Thank you...

    If you want to deal directly with the Document and not want the SOAP engine to serialize/deserialize the XML into Java objects, then you can easliy implement this using Axis. Look at the Axis documentation (http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage) under the heading "Message Services". One of the provided API methods that Axis provides is in the form you want: public Document method(Document body). Hope that helps. As for how to implement the service using Axis, that is beyond the scope of this forum. Check the Axis docs for more help on that.

  • Email Notification 11g - Event Metadata xml issue

    Hi,
    I am creating Email Notification for 11g .. For that I have created Event Metadata xml, one java class and pluggin.xml.
    the problem I am facing, I am not able to upload the Event Metadata xml (ISUDnotsigned.xml) using weblogicImportMetadata.sh
    My Event Metadata xml is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <Events xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../metadata/NotificationEvent.xsd">
    <EventType name="ISUD Not Signed">
    <StaticData>
    <Attribute DataType="X2-Entity" EntityName="User" Name="User Login"/>
    <Attribute DataType="91-Entity" EntityName="User Group" Name="User Grp"/>
    </StaticData>
    <Resolver class="com.hssa.oim.emailNotification.ISUDNotSignedNotificationEventResolver">
    <Param DataType="X2-Entity" EntityName="User" Name="usr_login"/>
    </Resolver>
    </EventType>
    </Events>
    the weblogic properties file is as below:
    application_name=OIMMetadata
    metadata_from_loc=/iam/email
    metadata_to_loc=
    metadata_files=/metadata/ISUDnotsigned.xml
    when I am running the weblogicImportMetadata.sh it is saying Transfer complete. but its not reflecting in OIM admin console.. Kindly suggest
    Edited by: boyinabox on Feb 28, 2013 4:50 AM

    it doesn't work because notifications are set from user1 account so USER# is still 1 even when I removed record first.
    This is my aproach based on Ask Tom: On Becoming Others, Limits, and Restoration
    >sqlplus user1
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    SQL> grant execute on sys.dbms_aq to user1;
    Grant succeeded.
    SQL> alter user user3 grant connect through user1;
    User altered.
    SQL> connect user1[user3]
    Enter password:
    Connected.
    SQL> create or replace procedure sched_not_add_q as
      2    reginfo1    sys.aq$_reg_info;
      3    reginfolist sys.aq$_reg_info_list;
      4  begin
      5    reginfo1    := sys.aq$_reg_info('SYS.SCHEDULER$_EVENT_QUEUE:SCHED$_AGT2$_3',
      6                                    1,
      7                                    'plsql://SYS.SCHEDULER$_JOB_EVENT_HANDLER',
      8                                    null);
      9    reginfolist := sys.aq$_reg_info_list(reginfo1);
    10    dbms_aq.register(reginfolist, 1);
    11  end;
    12  /
    Procedure created.
    SQL> exec sched_not_add_q;
    PL/SQL procedure successfully completed.
    SQL> drop procedure sched_not_add_q;
    Procedure dropped.
    SQL> connect user1
    Connected.
    SQL> revoke execute on sys.dbms_aq from user3;
    Revoke succeeded.
    SQL> alter user user3 revoke connect through user1;
    User altered.
    SQL> exit;
    >
    So it works now.

  • Using Oracle Transport Agent to get the XML File

    Hi,
    This is Vishal and I have setup XML Gateway to make my Supplier's specific site XML Enabled. When I am approving the PO, the PO Communication method is XML and once the PO is approved, through "Workflow administrator Web Application" responsibility, I am able to view my XML File.
    Our requirement is: we are currently using NuBridges and I want to transfer this XML file to the pre-defined location. But as per Oracle User guide, I understood that this is Blob message and I can't download it. To download it, I need to configure Transport Agent.
    Can anyone throw more light on this? I am new to Transport Agenet configuration. Please guide me, how to get the XML file generated?

    Hi Siva
    Just to clarify, rather than the short name of the conc program there is a shipped data definition that just uses the product short name? What is the data def so I can check it.
    Regards, Tim

Maybe you are looking for

  • Calculating Life to date values

    Hi there, the users are looking to get life to data values for service order. We can do this in the query (on the front end) but the performance takes a big hit due to the volume of records that are retrieved. So we are looking to build this calculat

  • Javascript to Java using APPLET TAG

    Can I call an applet method using Javascript? The applet is exposed through the <APPLET> tag. I can easily do it using MS JVM but Sun JVM doesn't let me do it. I look at the plug-in documentation and it only mention using <OBJECT> when doing Javasrip

  • Re-upgrade from 10.5.6 to 10.8.5?

    I have a 2007 Mac and its original discs. It was running the latest OS (10.8.5) but the hard disc became corrupted (believe me, nothing worked - reloading system software gave me an error, I couldn't repair the disc with disc utility, rebuilding from

  • Wish new backlight option

    I mainly use my iPod (4th gen 20Go) in my car with the Dension car adapter. It would be very helpful to have an other option for activating the backlight. I would like to have the backlight turned on everytime a new song start. This way, I would be a

  • Urgent~~ really helpless~~

    'Not a valid month' error. (ORA01843) how can I amend the SQL below to solve the problem. SELECT SUM(TRANSACTION.DISCOUNT_PRICE) as sales, TO_CHAR(TRANSACTION.SHOW_DATE, 'DD-MON-YYYY HH24:MI') as timeslot, TRANSACTION.SHOW_DATE FROM TRANSACTION WHERE