How to use HTTP / XML API

Hi,
I have to communicate with a product . The product has HTTP / XML API . The API has some functions. The examples in the product docs ,
If you send a HTTP request to URL of the product with function name and some input parameters , It returns XML response , this response corresponds to some DTD.
Now from java Application I have to send some HTTP requests and do some things according to obtained responses.Some times I have to parse the XML responses returned to show the user some results.
How can I do this in Java , I have not worked with this kind of requirements.
Thanks,
pandu

I wanted to do both , from the java Application to server.
1.Send HTTP (post) request
2.Parse the returned XML response from the server.

Similar Messages

  • HOW TO: Use the XML parser in Oracle 8.1.7

    I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.

    You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
    Both of these are included in XDK for Java at:
    http://otn.oracle.com/tech/xml/xdk_java
    The following document could also help:
    Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html

  • How to use Google weather API in flex?

    Hi there,
    I have 2 services.
    ServiceONE : http://api.locationservice.com/city/key=123abc
    ServiceTWO: http://www.google.co.in/ig/api?weather='anyCityName'
    I am using HTTPService for both. Firstly I fetch result which gives me city name, by sending ServiceONE. And then, I am assigning this city name to SericeTWO and sending it, which gives me weather details about that city.
    I am hosting my applicaition on some server, http://www.somethirdpartyserver.com/myaccount/myflexstuff/MyWeatherApplication.html
    Since it tries to access http://api.locationservice.com/city/key=123abc and http://www.google.co.in/ig/api?weather='anyCityName', I would need to have crossdomain.xml in them.
    Fortunately I could find http://api.locationservice.com/crossdomain.xml, which has:
    <?xml  version="1.0" ?>
    <!DOCTYPE  cross-domain-policy (View Source for full doctype...)>
    - <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all" />
    <allow-access-from domain="*" secure="true" />
    <allow-http-request-headers-from domain="*" headers="*" secure="true" />
    </cross-domain-policy>
    Which mean, any server can access it.
    But unfortunately, I couldnot find something similar in http://www.google.co.in/crossdomain.xml. Though xml is there, the code is different:
    <?xml  version="1.0" ?>
    <!DOCTYPE  cross-domain-policy (View Source for full doctype...)>
    - <cross-domain-policy>
    <site-control permitted-cross-domain-policies="by-content-type" />
    </cross-domain-policy>
    It doesn't allow any access to any domain.....
    I've already developed the weather gadget in flex but I cant host it for use anywhere, because of this security issue
    Can anyone kindly help me how can this be resolved?>?
    -Deepak

    @ PaulH
    Yes, after few more searches I came across php proxy solution. I should have checked about availablity of crossdomain file in the root of the api, which I didn't and started off with the development.
    For now I'll use this php proxy and use Google weather api. And yes, as you said, it's not official. Can get changed\removed, which will surely affect my code.
    Thanks for http://www.worldweatheronline.com/, may be I'll try to implement it with this api soon and make my app completely stable!
    Came across another great api for weather which too has crossdomain! http://www.wunderground.com
    I've uploaded the widget right here: http://deepflex.blogspot.com/2011/03/weather-widget.html
    @alexsliced
    Adobe Flex is a software development kit (SDK) released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flash Builder or by using the freely available Flex compiler from Adobe.
    You can find more about it here:
    http://flex.org/what-is-flex
    http://en.wikipedia.org/wiki/Adobe_Flex

  • Using AWM XML API

    We have the following questions related to cube creation in MOLP based on metadata and data in relational tables. Please help us.
    Is it optimal to use Oracle OLAP Analytic Workspace Java API for creation of the analytic workspace and the cube based on the metadata in the relational tables?
    Is there any PL-SQL equivalent for these APIs? Can we use CWM2 PL-SQL APIs for these? If we use the CWM2 APIs will we miss some of the optimizations on the storage space, aggregations, calculations etc, which are features of 10g?
    In order to fetch the data of the measures and dimensions one option is to create relational view on top of the data tables and create mapping. In this case what are the optimizations done by the maintenance task? . But if the user wants to create a new dimension or measure, it is not going to be easy. So we would like to know what is an alternative to this mapping? Can we programmatically load the data to the cube?

    Hi Vinod -
    I recommend that you use the OLAP AW Java API for the creation of AWs. You can find the API documentation here: http://www.oracle.com/technology/products/bi/olap/OLAP_AW_API_10.2.0.2_Beta.zip.
    The API provides everything required to:
    1. create dimensions, hierarchies, levels, measures, calculations, folders, etc. - including specifying detail storage parameters for objects (like compression, partitioning, etc.)
    2. map these objects to their sources (e.g. columns in lookup tables, fact tables or transaction tables)
    3. maintain the AW (e.g. load data from the tables - incremental or full, aggregate the data, run forecasts, run allocations, etc.)
    The API documentation does point to examples which show how to perform each of these steps.
    The definition of everything described above - including the processes - can be saved as a XML definition. These XML definitions can be leveraged as part of a PL/SQL process for performing these tasks. There is no equivalent PL/SQL API to the Java API aside from leveraging the XML definitions.
    I'm not sure I quite understand your final questions. Once the data has been loaded into the AW, the data is stored in an optimal way for OLAP analyses. The speed in which the loading process takes place may well depend on how quickly the source data can be queried - but this should only effect the loading of the leaf node data and the hierarchies. It will not impact the data aggregation stage of the build process.

  • How to use external Java API in Java Embedd inside BPEL

    How to use external classes inside the BPEL in Java Embed Activity ? Any sample code availble ? Like i want to use log4j API inside BPEL.

    No you dont have to change your startManagedServer.cmd/.sh everytime you need to have a Java Embedding activity. You only need it in case of using Log4J. As log4j requires a configuration xml viz log4j.debug.xml and log4j.dtd you need to let the soa managed server know about it. The best way to load this configuration files is using the JAVA_OPTIONS command during server startup.
    Hope the explanation helps.

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Web Service using HTTP-XML Protocol

    Can anyone provide an example of a web service in WebLogic 8.1 using the http-xml protocol (i.e., not using SOAP)? I am trying to understand how to gain access to the xml within the http post using WebLogic's web service paradigm within WebLogic Workshop.

    Hi Ananth,
    thank you, but this document does not help at all.
    We are using Crystal Reports 2008 SP2.
    We want to use the Web Service Connector.
    What I need is more informationen about the Web service connect. For example - the connection in Microsoft InfoPath is much easier - there I don't have to enter a port and can choose the methods from a list.
    Is it possible to use the Crystal web service connector for MS SharePoint Webservices?
    Or must I use the Crystal SDK to carry out a connection?
    Best regards,
    Sebastian

  • HOW TO USE JAVA OWB API

    I'm sorry for my English.
    I try to use java owb api to execute process flow of my owb project from my web application. I use oracle 11g.
    I have found only this thread about use of owb api (https://kr.forums.oracle.com/forums/thread.jspa?threadID=248256&tstart=0).
    I can establish a connection, obtain the project, process flow or mapping object but i can't understand how to run it.
    Help me please
    Stefano

    > JMX and instrumentation are quite different things.
    Not that I know a great deal about either, but this is from the API:
    "Provides services that allow Java programming language agents to instrument programs running on the JVM."
    And this is from the overview I linked:
    "The Java virtual machine (JVM) is instrumented for monitoring and management, providing built-in ("out-of-the-box") management capabilities for for both remote and local access."
    That sounds at least superficially similar to me. I'll do more research when I have the time/need. Thanks for pointing it out, though.
    ~

  • How to use WebCenter REST API to like or comment a activity

    Hi all
    I want to know how to realize like or comment function with REST APIs.
    I execute a REST call with following url, but the 'like' counter is not be increased.
    http://cdcjp77vm3.cn.oracle.com:8888/rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/(s2518c69b_1989_4a63_8886_c32075c76b9c)/likes?&utoken=FDNA-Z7ekZuPnVSNoPWOqTJ2IzAE_w**
    Is there anything i missed?
    Can anyone give me an example about how to use this API to like or comment a activity?
    Thanks
    Qian

    So Qian;
    looking through the code this is how you can
    Post a comment (POST)
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    {key:val}
    {text:'this is my comment)
    Edit a comment (PUT)
    So I haven't tried it but it should do the trick.. although I don't see update under capabilities so you may get blocked.
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
        id: {commentId},
        text: 'changed my comment.. magic'
    Delete a comment (DELETE)
    /rest/api/activities/services/{serviceId}/objectTypes/groupSpace/objects/({objectId})/comments/{commentId}?utoken=blah
    Like POST
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/likes?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    I passed it an empty object {} seemed to work for me.
    Unlike (DELETE)
    /rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/({objectId})/likes/({likeId})?utoken=blah
    Let me know if this works for you

  • How to use the UME api in order to search the LDAP?

    Hello,
    I have an application which connects to the LDAP the portal is connecting to and search users according to a certain search criteria.
    Here is the relevant piece of code:
    Hashtable env = new Hashtable();
    DirContext ctx = new InitialDirContext(env);
    SearchControls controls = new SearchControls();
    String filter = "firstName=..."
    NamingEnumeration results = ctx.search("OU=OUs", filter, controls);
    I would like to do this same search using the UME API.
    Can someone please show me the equivalent code to it using the UME API?

    Hi Roy,
    you find the Configuration File you are using in your portal via System Administration -> System Configuration -> UM Configuration -> Data Sources
    or in sapume.properties where you can find
    ##xml file that configures the persistence except roles
    ume.persistence.data_source_configuration=YOUR_DATASOURCE_CONFIG_FILE.xml
    In this xml file, there is the entry
    <principal type="user">:
    <principal type="user">
         <nameSpaces>
         <nameSpace name="com.sap.security.core.usermanagement">     
    <attributes>                               
    <attribute name="firstname" populateInitially="true"/><attribute name="displayname" populateInitially="true"/>               <attribute name="lastname" populateInitially="true"/>                    <attribute name="fax"/>                         <attribute name="email"/>                    <attribute name="title"/>               <attribute name="department"/>                    <attribute name="extensionAttribute2"/>               <attribute name="mobile"/>          <attribute name="telephone"/>                    <attribute name="streetaddress"/>               <attribute name="pobox"/>                    <attribute name="location"/>               <attribute name="telephoneShort"/>               </attributes>
         </nameSpace>
         <nameSpace name="com.sap.security.core.usermanagement.relation">
         <attributes>
         <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE"/>
         </attributes>
         </nameSpace>
        </nameSpaces>
    </principal>
    According to your company LDAP attributes, you will have to extend the above attributes, telephoneShort for example is an attribute within our company.
    The UME API does the rest.
    All you have to do, is request the right attribute (in my above example it was the last name).
    (Sorry for the format, but it is quite cumbersome to format it properly with the available editor   )
    Kind regards,
    Rebecca

  • [SOLVED] makepkg git clone fails (firewalled), how to use https

    At my new employer git(hub) traffic has been blocked so I am unable to clone a repo with "git clone git://someurl/..." but I can clone via https "git clone https://someurl/..."
    However, makepkg uses the former and fails with the following error:
    Cloning into bare repository '/tmp/cower-git/cower' ...
    fatal: unable to connect to github.com:
    github.com[0: 192.30.252.130]: errno=Connection refused
    Can I configure makepkg to use https cloning?  I can edit makepkg itself, but this seems far from ideal.
    For the time being, I just cd'ed into 'src' and manually cloned via https, then backed out and used 'makepkg -ei'.  So I now have cower up and running, but this is a bit tedius to do for all git packages.

    Change it how?  I tried changing it to "https://github..." but then makepkg didn't treat it as a git repo and just downloaded the webpage.
    EDIT: nevermind, I'm an idiot:
    source=("git+https://github/...")
    I know I had done this before, but I wasn't finding it when I needed it.  Thanks.
      - Trilby: Moderator and Noob!

  • How to use HTTPS for my Webservices

    Hello,
    I'm devoloping one SIte of a Webservice-based Interface.
    - My Webservices have to to consumed using HTTPS
    - My Invoker(Oracle 10g PL/SQL-Procedure) has to invoke a Webservice over HTTPS
    So i have seen how to create Secure-SOAP-Webservices, but I don't find a tutorial, which shows the whole Process: Create the Webserver-Certificate (SAP WAS 6.40), tell the Webservice to use this certificates, etc...)
    It would also be graet, to get a link to tutorial..
    Greetings,
    Chris

    I don't use Oracle PL/SQL, but I can give you an idea how it can be done via eg PHP (pear soap in this case) consumer.
    I presume that you you have on the WAS already an FM which is webservice enabled.
    First you need to set up an array with all credentials
    $proxy = array('user'=>'someuser', 'pass'=>'somepass','proxy_user'=>'someuser', 'proxy_pass'=>'somepass');
    Then you set up the client with the wsdl and this proxy info
    $wsdl=new SOAP_WSDL("https://someuser:somepass@someurl",$proxy);
    $wsdl->proxy=$proxy
    $client->$wsdl->getProxy();
    $result=$client->someFMonWAS();
    It's that easy.

  • How to use HTTPS to retrieve a set of files from a distant server?

    Hi !
    i am interested in some samples or links showing how is it possible to use HTTPS in a java code in a standalone application ( could be swing based or whatever) that allows an HTTPS connection to a distant server ( specefic file repository) so that downloading some data files could be possible.i am also interested to know what conditions should be available to make such connection possible ( specefic port number? specefic authentication? login? password? and does the Operating system on the distant server interfere with that ? etc...)
    thanks!

    in fact i tried to test a sample code by i got this exception :
    Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
         at HTTPSConnector.main(HTTPSConnector.java:30)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:285)
         at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:191)
         at sun.security.validator.Validator.validate(Validator.java:218)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:954)
         ... 12 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
         at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
         at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:280)
         ... 18 moreand here si the sample code:
    package foo;
    import java.net.URL;
    import java.io.*;
    import javax.net.ssl.HttpsURLConnection;
    public class Test
    public static void main(String[] args)
    throws Exception
    String httpsURL = "https://your.https.url.here/";
    URL myurl = new URL(httpsURL);
    HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
    InputStream ins = con.getInputStream();
    InputStreamReader isr=new InputStreamReader(ins);
    BufferedReader in =new BufferedReader(isr);
    String inputLine;
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    in.close();
    }so what this error is due to? and how to fix it ?.
    thanks!

  • How to use the windows API GetCaretPos with FireFox? It works with IE

    I want to get caret position from a windows desktop application using the Windows API GetCaretPos. It works in any windows Application and in IE. It worked also in FireFox for some minutes in version 3.6.8 but than it stopped working. Can anyone tell me how to make it work?
    == This happened ==
    Every time Firefox opened

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Did this fix your problems? Please report back to us!

  • How to use Http test Client  for Java Client Proxy Scenario

    Hi,
    I build a scenario using Java Client Proxy where JSP as my FrontHand.
    Can I know that whether i can use Http Test Client in place of JSP for sending data and getting response back. If yes than how can i implement this ?
    Regards,
    Abhi

    Hi,
    with Http Test Client you post your messages
    directly to the Integration Engine (not using adapter framework)
    so you can use Http Test Client to simulate any message
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for