Transferring files through java web service(for VB Client)

Hi,
I have a VBA client that needs to access a file on a server through a web service ? how do I go about this ? Use SAAJ ? Can I create a VBA client for SAAJ ?

I don't anderstand your problem,
With wich client-application do you acces to Web Service,
Do you program the Server side of the web service ????
Cl�ment

Similar Messages

  • Reading XML file from java web service

    Hi
    I am developing web service using Netbeans and the application server is glassfish.
    but I am facing a problem
    I have folder called "config" which will include the xml files. What I need to do setting path into that folder
    but it will read from another location when I am deploying it
    How to set our own path ?
    Error
    DPL5306:Servlet Web Service Endpoint [NewWebService] listening at address [http://kapila.epic.lk:8080/WebApplication2/NewWebServiceService]
    deployed with moduleid = WebApplication2
    java.io.FileNotFoundException: /root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    My "conifg" folder, i have put in to working directory but it will read from "/root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xm"
    below method is used for getting its contain value
    public String getMainCofig() {
                String v ="";
            try{
              DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
                        .newInstance();
              DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
              Document doc = docBuilder.parse(new File("OSconfig/MConfig.xml"));
              doc.getDocumentElement().normalize();
              NodeList listOfSPRMs = doc.getElementsByTagName("MainConfig");
              Node firstSPRMNode = listOfSPRMs.item(0);
              if (firstSPRMNode.getNodeType() == Node.ELEMENT_NODE) {
                   Element firstSPRAMElement = (Element) firstSPRMNode;
                   // Getting platform
                   NodeList server_port = firstSPRAMElement
                             .getElementsByTagName("RunningPlatform");
                   Element server_port_el = (Element) server_port.item(0);
                   NodeList server_port_List = server_port_el.getChildNodes();
                    v= ((Node) server_port_List.item(0))
                             .getNodeValue().trim();
            }catch (Exception e){
            e.printStackTrace();
                    return v;
    Regards
       

    I didn't quite get what the problem is but if the the desired file is in custom directory why don't you just use absolute path to reference it?
    Like: "/home/my/OSconfig/MConfig.xml"

  • Unable to create web service for axis2 client

    Hi,
    Iam very new about using axis2. What i want to do is to generate a webservice for my client. Client should be able to send data to server using those services. My xml pattern is given below.
    <test1>
    <test2>
    <test3>
    <test4></test4>
    <test5></test5>
    </test3>
    <test3>
    <test4></test4>
    <test5></test5>
    </test3>
    </test2>
    </test1>
    I used inner class to generate suck kind of xml, but due to lack of knowledge, i was unable to do that. Below is my test class.
    public class EchoService{
    public MyInnerClass retMyInnerClass(MyInnerClass test1) {
    return test1;
    public class MyInnerClass {
    private String test2;
    public MyInnerClass() { }
    public void setTest2(String test2) {
    this.test2 = test2;
    public String getTest2() {
    return this.test2;
    Please help me to find my mistake.
    Thanks
    Projjwal

    Hi there.
    I don't know what the problem is with NetBeans, but if you see the local copy of the WSDL in the firstcup-war project, you will find that the name of your computer should be there as part of the URL. Change it to 'localhost' or to '127.0.0.1' and it should work.
    Example:
    <xsd:schema>
          <xsd:import namespace="http://webservice.firstcup.sun.com/" schemaLocation="http://localhost:8080/DukesAgeService/DukesAgeService/__container$publishing$subctx/WEB-INF/wsdl/DukesAgeService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
    </xsd:schema>And...
    <port name="DukesAgePort" binding="tns:DukesAgePortBinding">
          <soap:address location="http://localhost:8080/DukesAgeService/DukesAgeService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
    </port>

  • Java Web Services wrapper and connection management.

    We are currently evaluating the use of the SES Java web-services for a custom front end. I've downloaded the sample code and have read through the documentation but I'm confused on a few points.
    We will be OSSO protecting the app, so the flow I think I need to use is (on the OracleSearchService object):
    *setSoapURL
    *proxyLogin
    *setSearchUser
    *doOracleSearch
    (do whatever with results)
    From what I can tell each one of these does a separate call into the actual web service. Does this keep a connection open between these calls and if so how do we need to manage our connections in this case. Is there an explicit close method we should be calling? I see that we can get an OracleSoapHTTPConnection from the undocumented getConnection method on OracleSearchService but I'm unsure if we are supposed to interact with it directly.
    In a related vein how should we managing our OracleSearchService objects? Should we save an instance for each user in our httpSession, or just create a new instance on each call?
    Any insights appreciated,
    Jason

    No Problem at all
    Nomally the Web Service is big different between Web application. or you can build your Web service structure like web application structure. It depends on the web server:
    If the Web Server of hosting company has WEB Service framework, you just need know how to deploy your Web service to Web Service framework and How to deploy to Web Server. In this case, you need deploy it two time, one is for Web Server framework and one is for Web Service framework
    If the Web Server of hosting company doesn't has WEB Service framework, you need build your own Web Service framework into a web application, then you just need know how to deploy your web application with Web service into Web Server framework

  • Handling Java Web Service Exception in ABAP

    Hi
    I have created a web service in Java using NWDS.
    Which has a businessMethod which throws a Exception based on certain business logic.
    I have consumed this  Web Service Method using .NET Client.
    i am able to catch the Exception and get the Exceltion Message.
    But when i try to consume the same web service Method in ABAP,
    i am not getting the Exception Message .
    The Method call works fine.
    What am i missing here ?
    regards
    Rajendra

    Hi,
    Upon further investigation and comparison of the custom exception object (generated during consumer proxy creation for a CUSTOM web service) with a standard exception object(generated during consumer proxy creation for a STANDARD web service) I found that the sub-elements of the exception structure errorPart are not available in the custom exception object (and one of these sub-elements is the message text).
    Call Stack,ExceptionName and MessageText Elements are missing in the errorPart node of Exception
    Node. as seen in the ABAP Exception structure generated.
    Queries:
    1.       Are there any standards which need to be followed when coding exceptions in the Java web service for consumption in ABAP such that all sub-elements of the exception object are also created in ABAP during the proxy creation?
    2.       Can we get the Java code for a standard web service available in SAP Netweaver? Asking the same as the exception object created for the standard web service RoomABAPWS contains the sub-elements. Getting the Java code of the same will be very helpful in resolving the issue.
    Regards
    Rajendra

  • Java Web services book

    hello everyone!
    i d like your opinion about a java web services book.
    i am intermediate in java with no experience on web services and XML.
    i d like a book with code explanation and real-world examples.
    Because i like deitel java books (how to program and advanced java) that i have read,
    i am thinking to buy Java Web Services For Experienced Programmers (Deitel Developers Series) book.
    But it is quite old (2002) and i am noy sure.
    Any help would be appreciated! Thanks.

    hi,
    I wonder if I can get help on this, I want to do an automated search from my java code ,but I dont know exactly how to start on this, if anybody could explain or lead e to any website that has examples on this .
    thank you

  • The Best Java Web Services Technology for Developing Web Services

    Hi,
    I am new to Web services world.
    I read the java web services page . there are more than 6 technologies.
    JAX-WS,
    JAX-RPC,
    JAXB,
    SAAJ,
    JAXP,
    WSIT,
    XWS-Security
    I went through several documents on web services.
    I could not get a clear idea of which technolgy to use.
    Which Java web service technology will be the best to develop web services independant of language, platform.
    or is there any 3rd party implemetations available ? for rapid development of web services.
    Could anyone help me !.
    Thanks in advance.
    Message was edited by:
    Siva.Prakash

    Which Java web service technology will be the best
    to develop web services independant of language,
    platform.
    Java by nature is a cross-platform language, so if your focus is on the need for portability, the choisce of WS should not be a problem. However, each WS is best suited for paricular uses.
    SAAJ, a low-level level API, offers much simplicity, but is not the first choice for programmers, as SOAP (Simple Object Access Protocol)messages need to be constructed piece by piece, making it a quite arduous code to program.
    If you are not familiar with XML, your best bet would be to use JAX-RPC (Java API for XML-Remote Procedure Calls), as it hides the underlying detail from the programmer, in terms of SOAP and XML. The shortcoming with RPC-based WS is that it is "restricted to the local programming experience". Another failing is that assumes there is a network path- a reliability concern.
    If your program will be contacting other services during downtimes, unlike JAX-RPC, JAXM is quite useful. However, your listing did not mention it, so I wont cover it.
    JAXR is a client-side only API that acts as an interface between registries (not referring to JAXP)
    I am not famiiar with JAXB, JAXP, WSIT or XWS-Security..
    or is there any 3rd party implemetations available ?It depends on what platform you are used to. Assuming you are familiarized with the J2EE platform (now changed to Java EE SDK), the NetBeans IDE (either 5.5, 5.5.1 or the latest editiion) is quite useful. I am using 5.5.1, but have found that it is quite buggy, especially when adding WS operations, a core requirement of a WS. if you will be using to devlop a service for an immediate need, you may find the learning curve to be a bit high, in terms of getting to grips with how to use it. (Download link:
    http://www.netbeans.info/downloads/index.php)
    The IBM Autonomic IDE (or AIDE), based on the WSDM standard, includes 3 sub-tools, icluding the IBM Manageability Endpoint Builder which, according to their website, allows individuals to build endpoints to allow manageability interface exposure; Manageable Resource Browser and the IBM Manageability Endpoint Simulator. However, I'm not familiar with this IDE. (Download link: http://www.alphaworks.ibm.com/tech/aide/download)
    The .NET Framework uses the Visual Studio IDE. For an unbiased comparison of J2EE and the .NET Framework in terms of WS, see http://www.webservicesarchitect.com/content/articles/hanson01.asp.
    Apache Axis2, Geronimo and JiBX allows fast development of WS, or so the creators profess.
    The PHP environment- you could try NuSPHERE PHPed. According to one website, with it you can develop a web service in under an hour.
    I hope this was useful to you.
    [Based partly on Topley, K. (2003) [i]Java TM Web Services in a Nutshell: A desktop Quick Reference. 1st ed. California: O�Reilly & Associates, Inc]

  • Converting a java file to a web service

    How can i convert a java file to a web service,And then invoke that service by making my other java file.

    You can convert your java file into a WSDL with the WSDL2Java utility in Axis. This will create a definition that will be accessible by potential clients.
    To deploy your java class, you can use Axis in a Web Server of your choice (Tomcat, Apache). All you need to do is run the Axis Admin Client for a deploy.wsdd file and point your client to the IP:PORT.
    Very straightforward.
    http://ws.apache.org/axis/java/user-guide.html
    Hope it helps.
    SBO

  • Files generated by Web Service Proxy give errors for complex input types

    Hi ,
    I generated a Java Web Service Proxy using a WSDL file.
    The input params are of this fashion -
    1) Object 1 have 3 attributes
    2) Object 2 having nested Object 2 (yes , again) which has a nested attribute which needs to be passed say Param 1.
    When I generate the proxy classes ... Param 1 is referred to as private Object2.Object2 param1 which gives error for the data types.
    How can we resolve this .. what should be the correct data type representation for param 1 ?
    Thanks

    Issue was resolved . Details here - 11g PS2 - WebServiceProxy Class give errors for complex input types

  • How to write a web service for uploading a file

    Hi all,
    I want to write a web service for uploading a file to some specified folder under application server, how to do that? Thanks

    I believe the "difference" that you're seeing is that one web service is "RPC" style (The Hello World example) and one web service is "Document" style (The WSDL you have downloaded).
    Document-style web service methods always have one element as a parameter, and this parameter manifests itself as a SOAPElement in the service interface.
    RPC-style web services are true "remote procedure calls", and are more functional in nature, in that they accept multiple parameters. JAX-RPC will bind these parameters to generated Java types.

  • Best Practice/Standard for Securing and Attaching Files in a Web Service

    Thanks in advance.
    Being new to Web Services as well as most of my team. I would like to know what is the best practice for transporting files via a Web Service. I know of several methods and one that seems to be the standard, but you can't really tell in this ever changing world of Web Services. Below are the options that I have found.
    1. MIME encoded the file and embed in the payload of the SOAP message
    2. SwA (SOAP with Attachments) which applies MIME attachments to SOAP. I think this is similiar to the way emails are handled.
    3. DIME (Direct Internet Message Encapsulation) similiar to MIME encoding but is more efficient
    4. MTOM (Message Transmission Optimization Mechanism) I really not understand this method, but it seems that this is the NEW standard. I just don't understand why.
    5. Utilize HTTPS and download the file from an accessible file server w/ a login id and password.
    Is there someone out there that understands this problem and can assist me in understanding the pros and cons of these methods? Or maybe there is a method that I'm overlooking altogether.
    Thanks

    JWSDP supports securing of attachments [1]and will soon support securing MTOM attachments too. [1]http://java.sun.com/webservices/docs/2.0/xws-security/ReleaseNotes.html

  • Looking for More Info on Java Web Service

    Hi Everyone,
    Where can i find More info on Java web Service in BPEL? Is there any link or documentation for this? I looked at the tutorial and the only info available is:
    B.2.7 Java Web Service
    This service enables you to publish a Web service from a Java class. A wizard creates the WSDL document and deployment files needed to publish your code as a Web service. After you select the class and methods you want to publish, the wizard generates deployment descriptors, a JAX-RPC mapping file, and a WSDL document that can be deployed to an application server.
    Thank You,

    Sure,
    one way would be to upload the files to XE using the WebDav feature of the XML DB. You find more information here: http://daust.blogspot.com/2006/03/where-are-images-of-application.html
    Another option would be to configure a standalone Apache as a proxy server to XE. This way you can configure the Apache any way you like.
    HTTPS with Oracle XE ?
    Re: Existing http server
    For correctly logging the remote IP you will need the following workaround:
    Re: How to get X-Forwarded-For value?
    Regards,
    ~Dietmar.

  • How to create web service for a Java class in SAP NetWeaver Studio

    hi all,
    i am using SAP Netweaver Developer Studio.have created a normal java project and i want to create web service for one of the classes in this project. i used the  Web Service Creation Wizard to create a web service for this class. but it says there's no methods available for VI. all my methods in this class are public, what should i do?

    Hi,
    I guess there are other ways. But this is an easy way, if you find the right wizards.
    Besides this it is good practise to define interface methods so that session bean implement these interface methods, and thus seperate the interface from the implementation.
    In this approach you will need 3 projects:
    An enterprise application project (will contain EJB Module)
    An EJB Module project (will contain session bean)
    A Java project (contains code that implements the session bean methods)
    In my previous post I suggested to use a J2EE web mudule project. This was a mistake, it should be EJB module.
    But it should be possible to do it in another way. It is up to you.
    Good luck, Roelof

  • Problem with file receiving through abap web service

    Hi experts,
    I need to created web service for import file from .NET application into SAP.
    ABAP function expect hexadecimal string (same as GUI_UPLOAD / GUI_DOWNLOAD) but hexadecimal string from C# is too long (double longer), and I have no idea how to convert it. Also there is a problem with code page...
    Is there some better way to do this? Any idea is welcome!

    Hi Nemanja,
    Please bear in mind that your SAP system is based on UTF-8 encoding. Since you have the xstring length doubled, most probably your sender system uses UTF-16 encoding. So what you need to do is change the encoding used by your .NET application when sending the data to SAP.
    Alternatively, you can try using XSL Transformations in ABAP to have the input data converted from UTF-16-encoded xstring to ABAP structures. You can find a little example in this thread: ABAP data to XML conv with UTF-8 encoding and custom namespace. The point is to start your XSLT with the following: <?xml version="1.0" encoding="utf-16"?>.
    Hope this helps,
    Greg

  • Help on Sun Certified Developer for Java Web Services (CX-310-220) exam

    Hi,
    I am planing for Sun Certified Developer for Java Web Services (CX-310-220) certification. Can anyone provide me the links for resouces? can anyone provide me books/publications/author best preparation material to score good marks in exam? can anyone provide me the download resources available over internet?
    thanks in advance..!!!
    regards
    gaveesha

    yes, that's the only decent book covering most of the exam curiculum (but NOT all of it, check the exam specs versus the book content to know what you are missing).
    I'm working on the same material, and boy is it a lot...
    Dry, boring stuff most of it.

Maybe you are looking for

  • Job Name of a Program scheduled as a Background Job

    Hi, In our production system. We have a program which is scheduled to run in the background by various job names. At runtime, I need the program to figure out under which Job Name is it running. I dont think there is any system field which stores the

  • Net amount field for invoices which got cleared

    Hey All: Can someone tell me what could be the field for net amount for invoice documents. Thanks Sudhir

  • IOS 4.3 fixes

    Does the new iOS 4.3 fix the problems with the Camera Connection Kit? I've had problems with this with 4.2 saying usb requires more power.. did 4.3 fix that problem? is the CCK working fine with the os4.3?

  • White space on side of image with Flash content

    this is what my screen looks like..too much white on each side mar

  • Switch Step Scan List

    I am using the 2530B with dual 64x1 topology. In TestStand, I want to set up the IVI Switch Step to where it connects a channel off of each bank and then uses the DMM to record. In LabWindows I can use: "ch0->com0 & ch64->com4"; How would I do that u