Web service and java Axis

Hi everybody
I'm trying to query a web service like that on http://www.webservicex.net/stockquote.asmx
and I'm using axis-1_4 API but without success!
I wrote a class with this code:
     Call call = (Call)service.createCall();
     call.setTargetEndpointAddress(new URL("http://www.webservicex.net/stockquote.asmx"));
     call.setUseSOAPAction(true);
     call.setSOAPActionURI("http://www.webserviceX.NET");
     call.setOperationName( "GetQuote");
     String ret = (String)call.invoke(new Object[]{ "FORD" });
     System.out.println("output returned: " + ret);
The response is:
RemoteException System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://www.webserviceX.NET.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://www.webserviceX.NET.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
Have I forget to set some other property to the object Call or other reason?
If anybody have had the some problem can help me?
Thanks in advance
Gianni

I have found that the older Axis 1.x has some issues talking to anything .NET. My first suggestion would be to go to the latest, which I believe is Axis 2.0. I have some clients that consume my webservices with .NET, and I remember I had to change the messaging type to get it to work...big pain in the rear.

Similar Messages

  • Need advice about web services and Java beans

    Hi
    I am very new to web services and to Java beans as well.
    I am trying to understand if and how a web service can use functionality I have in a Java bean. I couldn't find any documentation I can use.
    For example:
    InitialContext ic = new InitialContext();
    Adder adder = (Adder) ic.lookup("ejb/AdderJNDI");In a EJB client project (I'm working with Eclipse) if I add the EJB project to the build path, the Adder interface is recognized.
    Theoritacally I thought I can do the same in a web service server project, but the Adder interface is not recognized.
    Is there something I can read to understand how I need to use the EJB or implement the web service?
    Many thanks
    Sigal

    Okay....I think I made some errors with the original scenario:
    It basically comes down to this....I think. OCS Calendar has a set of Java classes and methods that provide an abstraction for their web services interface. I know how to create something to use these classes using an IDE like JDeveloper, but I'm not sure how that would work with HTML DB.
    I've noticed that the SQL Workshop has a place for Java sources and classes, and I've heard mentions of PL/SQL wrapping. Is there a way to import classes into an HTML DB workspace, wrap 'em up, and access them via PL/SQL?
    Thanks again,
    Jonathan

  • Web Service and Java

    Hi everybody!
    A simple question from a beginner
    I would like to use the query_view_data Web Service provided by SAP.
    Do I basically need a J2EE installation for that?
    I tried to test it in WSADMIN and the wsnavigator-service obviously needs Java.
    Best regards,
    Philipp

    I have found that the older Axis 1.x has some issues talking to anything .NET. My first suggestion would be to go to the latest, which I believe is Axis 2.0. I have some clients that consume my webservices with .NET, and I remember I had to change the messaging type to get it to work...big pain in the rear.

  • Web Service and Java Classes

    Hello,
    I have list of java classes. I have one java class which calls only the required functions from the list of java classes. When I try to create a VI on that java class I see all the functions needed but all of them are grayed.
    Can anybody please help?
    Best regards,
    Dharmi

    Has anyone else solved this problem? We too are experiencing the same problem.
    We are trying to build a .JWS file from within an ANT build script. The build script compiles the site into a single EAR file that should contain a deployable and usable JWS component, however it obviously does not.
    If anyone has a solution, please let us know. We're facing a code freeze on this project by this Friday and really need some help.

  • Web service calling java Caps

    Hi,
    I have developed a web service application in java caps 5.1.3 and can able to call that from the client successfully.
    But I dont want to create web service in java caps 5.1.3, the web service should run in weblogic server and the business logic it used should run in java caps.
    How should be the communication between web service and java caps
    please suggest

    Could you please paste your WSDL?

  • Java web service and pocket pc

    Hi all. I am looking for some advice on how best to go about the following. I have looked on the internet and found info on relevent parts, but not sure how to interact them all together.
    I want to develop an application for a pocket pc (probably windows mobile 5.0) that will interact with a web service(in java). The pocket pc will send some sort of authentication to the service, which will then query a database and send the relevent information back to pocket pc.
    I have read things on SOAP, WSDL and AJAX etc... but am unsure how to put them all together.
    If anyone has any advice, good tutorials or links then they are greatly appreciated.
    Regards

    Hi all. I am looking for some advice on how best to
    go about the following. I have looked on the
    internet and found info on relevent parts, but not
    sure how to interact them all together.Join the crowd :-) For most of this stuff, it seems we're ALL finding our way around.
    I have read things on SOAP, WSDL and AJAX etc... but
    am unsure how to put them all together.That's kind of like asking "how long is a piece of rope?" It depends on what you need it for.
    Try w3schools.org for some great tutorials on some of the underlying technologies that power the above.
    SOAP is nice and all if you want to use third-party libraries and you need industry-standard interactivity (for example with vendors or customers), but if you're doing everything in-house (i.e. your own application will consume the web service you wrote) then I'd seriously consider REST-based webservices. They're easier to write because you're free from the limitations of SOAP, and your apps can be smaller and with fewer parts.
    Screw WSDL. Use it only if you are forced to. Axis has a great WSDL generator and if you can deploy everything in Axis, then you're good to go. I started writing my webservices using Axis and WSDL->Java generators and I was all cool and stuff because I was doing what everyone said was the best way to write these new applications. It took me a while to realize that most of that advice was coming from the people that were writing the software the real applications were based on, not using the stuff they had written to build real apps with. The perspective is completely different.
    Then I had to maintain that mess and it wasn't worth it because all of my uses for webservices are internal. I write the server and client portions both. There's no need to complicate the issue with technologies that are meant for interacting with other systems which you have no control over, nor any knowledge of how they're consuming the information you're providing.
    As to specific documentation, that's a little harder to come by. Your best bet is to first and foremost: read the specs on w3.org. No other pieces of documentation will be as in-depth and informative as the spec. If you're using spec-compliant implementations, then you've already got all your documentation. They're dense, I agree. They take forever, I agree. But I have yet to find anything that can rival the depth of understanding I gain from the specifications. Read the specs. All of them. Download them, print them out, stuff them in a fat folder (mine's in a 3-inch binder) and keep them handy. It seems like enterprise-level webservice-enabled apps will require lots of third-party support libraries, use lots of different technologies, and the documentation required to help the developer actually use all of this stuff will become critical. That's why I say print stuff out and keep it in one spot.
    If you can get any good out of these third-party libraries for generating clients, then more power to ya. I think they're a waste of time, myself, because I can write a client quicker and make it far more easy to maintain if I just do it from scratch. I'm only interested in using these technologies to make it quicker, more effiicient, easier to maintain, etc... be careful you don't get carried away with the vastly divergent advice you'll get on how to build your app and end up making it much more complicated and harder to maintain than it would have been had you not used industry-standard methodologies. Think small and simple.
    To get started, I would get a really good XML IDE. I use oxygen (http://www.oxygenxml.com). Version 7 is out, which has XQuery debugging and lots of other stuff. Have your company buy it. It's worth it. (has eclipse integration too). Then download Sarissa: http://sourceforge.net/projects/sarissa it's a great cross-browser javascript library for doing AJAX stuff. We use it for our AJAX applications and it's great. Fairly well documented too. Then use as much client-side processing as you can get away with because with webservices, your XML processing will hammer the server. Our IBM dual 3GHz/8GB RAM machine is chugging constantly. We process around 300,000 pages of XML in a normal business day, and it's intensive processing (lots of SQL serialization and transforms). We're trying to offload as much work to the client as we can. We're using Mozilla now, so that's making life much easier for us. Even the embedded mozillas have fantastic support for AJAX-friendly technologies.
    As for putting everything together, well, you're pretty much on your own there. In our environment, we have a custom XML-based intranet portal, which I had to write myself because there's nothing out there that does what we need it to, we use Postgres as our enterprise database, JBoss as our application server, Apache as our front-end, and oh yeah, we have an AS-400 on which resides all the "real" data. Just try and find documentation on serving data via an AJAX-enabled enterprise app from data that resides on DB2/400 and generating the interface on the client using XSLT. Or how about getting data from the postgres server into an RPG program using a webservices client on the 400. I don't even think I'm supposed to be doing stuff like that, let alone be able to find documentation on a solution that someone has come up with.
    Now if someone would just make a good JavaScript IDE, AJAX would take off like a bat out of hell. How long has JavaScript been around now? 10 years-ish? And how many good IDE's are there for JavaScript? Zero. Really irritates me sometimes... A good Mozilla-based AJAX-friendly JavaScript IDE would be a HUGE and I mean HUGE benefit to the webservices community.

  • JAVA WEB SERVICE AND ORACLE DATABASE

    Hi,
    I working with Oracle database 10g, Oracle Bpel 10.1.2.0 and JDeveloper 10g on windows xp home.
    I have created a java class with incapsulated sql statement (jdbc protocol).
    All it's ok when the class runs from command line (JCreator).
    After that i created the web service from java classes (with JDeveloper) and I connected (with success) database to OC4J and run the web service, i have this xml message like result:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>java.lang.NullPointerException</faultstring>
    <faultactor>/DipendentiWebService/DipendentiWebService</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Which's my error?
    Thanks

    Hi Frank,
    thank you for the reply, but i don't undertsand what do you mean "add print statement to java class".
    follows the java class code that loads a mail address from database oracle:
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.SQLException;
    import java.util.*;
    import java.sql.*;
    import utility.*;
    import java.lang.*;
    import java.io.*;
    public class DipendentiWS{
    protected static String matricola = null;
    protected static String email = null;
    private static DBConnectionManager connMgr;
    private static Connection conn = null;
    private static Statement st = null;
    private static PreparedStatement pstmt;
    private static ResultSet rs = null;
    private static final String FIND_BY_MATRICOLA = "SELECT Email FROM ARDIP.DIPENDENTI " +
                                                           "WHERE Matricola = ?";
    // metodo ausiliario per il rilascio delle risorse
    * @webmethod
         public static String leggiMail(String matricola)throws SQLException{
         // Caricamento dati Dipendente da DB
         try {
    connMgr = DBConnectionManager.getInstance();
         Connection conn = connMgr.getConnection("access");
    if (conn != null) {
         conn.setAutoCommit(false);
    st = conn.createStatement();
    pstmt = conn.prepareStatement(FIND_BY_MATRICOLA);
                   pstmt.setString(1, matricola);
                   rs = pstmt.executeQuery();
    if (rs.next()) {
    email =rs.getString(1);
    conn.commit();
    // conn.setAutoCommit(true);
    catch(SQLException e){
         e.printStackTrace();
         System.err.println("ATTENZIONE!!!!");
              finally {
         try {st.close();}
         catch(SQLException ex){ ex.printStackTrace();}
              return email;      
         }

  • Java app with web service and servlets

    Hi. I intend to make a java application which exposes some methods as a web service and as jsp/servlets. It's core functionality is not really web centric, but its more a java app with a web tier. I am not sure about how the architecture of such a system would look like using the java platform. I currently see three options:
    1. Run everything in a servlet container like tomcat. I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web services. However, it would be really easy just to put everything into tomcat and use ServletContext to maintain some global objects.
    2. Use a Java EE to seperate application/business logic and data access into session beans and entity beans. I hesitate to this because it seem a bit overkill because the system isn't very big or complex right now. It also means that I would have to learn to use EJB's instead of just using some POJOs.
    3. Run the web tier in a servlet container and the main app in a separate JVM, and then connect the tier by sending serialized objects over TCP sockets. I don't like writing network code but at least there is some separation of the tiers.
    What would you do? Maybe I have overlooked a much better solution to the problem?
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) instead of the something quick and dirty that is hard to defend.

    jschell wrote:
    Run everything in a servlet container like tomcatTomcat is a JEE container.Now I am confused. Maybe you mean Glassfish? Tomcat is definitely a web container(?).
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) That pretty much makes it impossible then.
    1. A "Right" solution is generally only proven by time.
    2. It requires a great deal of knowledge about the business domain.Yeah, you are right. Let be try to rephrase it. What solution (pattern) would be considered the most common or appropriate when you have a Java App and want to expose a few methods as a website and web service?
    I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web servicesHuh? Do you already have an exposed web service? If you already have a server which other clients communicate then where does this functionality that you don't want to be tomcat running now? Or where do you think that you want to run it? And if you are or do run it somewhere else then tomcat could access it the same way any other client accesses that server.Sorry, that sentence was written badly. I don't have anything right now. What I meant to write was that I will have a lot of application scope data, objects that are kept in memory as long as the server is running, shared by multiple servlet instances.

  • Deploying a VB dll using some web service and accessing it through java

    I'm new to Web Services Based Programming. I would like to know whether this is possible and if so has anyone tried it. I want to create a vb dll that contains the remote methods that the client will access from a java program. After going thru a lot of articles, I'm still unsure on how to do this. I found one method was to Create a VB program/dll, deploy it in a web service and create the java program that accesses by another web service.
    I'm doing this as part of my lab syllabus. The thing is My lab exercises do not state anything about the technologies that I can use to do this.
    This is all that is stated there:-
    Creation Of DLL Using VB And Deploy it in Java
    I just cant get any ideas other than deploying both the parts as web services. If anyone has Better ideas for this, I would really appreciate it.
    I dont know anything about CORBA for languages other than Java and I'm already using the servlets and EJB's in my normal life. I'm also learning the ORB based programming in java. Therefore your help will probably help me learn something new then what I know.

    Sorry I wasn't too specific in my last question.
    This is my java class calling the native method print
    //HeyWorld.java
    class HeyWorld {
    private native void print();
    public static void main(String[] args) {
    new HeyWorld().print();
    static {
    System.loadLibrary("HeyWorld");
    In this case, my C method for calling a C++ method: HelloWorld.cpp
    #include "jni.h"
    #include "stdio.h"
    #include "stdafx.h"
    #Include "HeyWorld.h" //this is where i get my function prototype
    #include "Test.h" //this is the C++ header where the print method and the Test class is
    JNIEXPORT void JNICALL
    Java_HeyWorld_print(JNIEnv *env, jobject obj)
    CTest a; //CTest is the print class I created
    a.print();
    //This is the header for Test.h
    class CTest: public CWinApp
    public:
         CTest(); //constructor
         void print(); //our method
    //And this is the implementation of the class Test.cpp
    void CTest::print()
         printf("Hey World!\n");
         return ;
    I could compile the Test.cpp, HeyWorld.cpp successfully. However when I tried to compile HeyWorld.cpp using
    cl -I<path of jdk include> -I<path of jdk include win32> -LD HeyWorld.cpp -FeHeyWorld.dll,
    the VC++ 6.0 compiler gave me this error:
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::CTest(void)"
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::print(void)"
    Thanks for the help.

  • Create a web service from java bean and map exceptions to SOAP faults

    Hi,
    We have to expose our Session stateless EJB3 as web services. I've tried to use annotations and jdev wizard "java bean to web service" and it works fine.
    Our problem now is that our methods can throw a business exception that contains a list of error message strings to be presented on the client.
    I did not find any way to use annotations to make it build a wsdl with soap fault mapped to our exception class. Neither I could to make the wizard to create wsdl with faults.
    As we are exposing already designed and implemented classes as web services, I think the bottom-top (java->wsdl) approach is better that top->botton (wsdl->java). Therefore, I'm looking for a possibility to generate the web services from the java beans and have the exception be mapped to a soap fault message.
    We are using jdev 10.1.3.1 and OAS 10.1.3.1., is there a way to map exceptions to soap faults using bottom->top approach?
    thank you

    A couple of links that may be of help:
    http://www.netbeans.org/servlets/ReadMsg?listName=nbj2ee&msgNo=1218
    My last question concerning web services:
    I have already written a session bean and I'd like to add some methods
    as a web service to it, how do I do that?
    Or I can only create another bean for a webservice and cannot modify the
    original one?You might create web service with existing sources and select you bean. New web services with appropriate lookup method will be generated.
    All web service method, that will be exposed in web service, you
    should add itself (Pop-up menu Web Service -> Add operation)
    http://usersguide.netbeans.org/files/documents/40/73/Chapter9-WebServices.pdf

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • ABAP calling web service provided by AXIS -error

    Hello expert,
    I am calling web service provided by AXIS in ABAP but error occur when processing response part.
    The web service is used to create material master in JAVA AXIS system.
    After setting up the LP in soamanager then make a call, we got an error saying
    "GENERAL_ERROR Error duing proxy processing (PART
    UNKNOWN (NULL) ) "
    I looked at the full trace in soamanger, the call is executed successful, and the data are inserted in the remote system.
    response payload can be seen in the trace
    Request payload
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><n0:TraceLevel>Full</n0:TraceLevel><n0:TraceContext><TRC_PATTERN>WSTEST</TRC_PATTERN><TRC_KEY>E08673F6795E2EF1A482D48564570FA4</TRC_KEY><TRC_SSID>ED1_00</TRC_SSID><TRC_USER>CAILIN</TRC_USER><TRC_TS>20110525020904</TRC_TS><TRC_COUNTER>98</TRC_COUNTER><TRC_EXTERN></TRC_EXTERN></n0:TraceContext></n0:Trace><n1:MessageID xmlns:n1="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:e08673f6-795e-30f1-a482-d48564570fa4</n1:MessageID><n2:Action soap-env:mustUnderstand="1" xmlns:n2="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope">http://eam.envisioncn.com:8180/msgagent/services/SAPService/CreateITEM</n2:Action><n3:To soap-env:mustUnderstand="1" xmlns:n3="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope">http://eam.envisioncn.com:8180/msgagent/services/SAPService</n3:To><wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From><wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:ReplyTo><wsa:FaultTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:FaultTo></soap-env:Header><soap-env:Body><n0:CreateITEM xmlns:n0="http://sap.env" xmlns:prx="urn:sap.com:proxy:ED1:/1SAI/TXS40FB8A9F499B60E81B2F:700:2010/10/07" xmlns:n1="http://eam.envisioncn.com:8180/msgagent/services/SAPService"><n1:itemnum>123</n1:itemnum><n1:description>u6D4Bu8BD5u7269u6599</n1:description><n1:issueunit>EA</n1:issueunit><n1:env_model>u89C4u683C1</n1:env_model><n1:env_ordernum>1</n1:env_ordernum><n1:istool>Y</n1:istool></n0:CreateITEM></soap-env:Body></soap-env:Envelope>
    Response Payload
    <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><CreateITEMResponse xmlns="http://sap.env"><CreateITEMReturn>S</CreateITEMReturn></CreateITEMResponse></soapenv:Body></soapenv:Envelope>
    For me it looks it is an issue in the response payload that ABAP proxy can not process it.
    such as, the response payload NS prefix is soapenv, other than soap-env in request payload...
    but i am not sure, whether this is the root cause.
    Could you help me to find out what is going wrong here?
    Regards,
    Cai Lin
    Edited by: charlie cai on May 25, 2011 5:20 AM
    Edited by: charlie cai on May 25, 2011 5:20 AM

    the response payload NS prefix is soapenv, other than soap-env in request payload
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" is equivalent to xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" . Namespace defined correctly.
    I can also see that response is correct (assuming "S" denote success):
    <CreateITEMReturn>S</CreateITEMReturn>
    Also check type of WSDL style usually this error occurs if you are using RPC/Encoded style WSDL, modify wsdl for Document/Literal style (as RPC style WSDL not supported by ABAP proxy), see this discussion here: Cleint Proxy error
    Refer to note:  1358647
    Regards,
    Gourav

  • Anybody has experience calling ID API web service in Java

    Hello,
    as you know we can programmatically update ID objects by call ID APIs (web service). To do that you need to import the wsdl into a java project, generate web service client and call the client to update ID objects.
    I've tried this in NWDS CE version. However I got error when generating web service client from the wsdl of the ID web service. Only the BusinessComponentService passed the ws client genertion, the rest web services do not work.
    The error I got:
    IWAB0399E Error in generating Java from WSDL:  java.lang.NullPointerException
        java.lang.NullPointerException
        at org.apache.axis.wsdl.toJava.JavaInterfaceWriter.writeOperation(JavaInterfaceWriter.java:126)
    Anybody has experience with ID API?
    Thanks
    Jayson

    HI Jayson,
    you can also request the web service directly.
    For example, you could create a local xml file with the values you want to pass to the web service and configure a file 2 soap scenario within XI itself.
    You can create interfaces for each available web service.
    You could call this scenario "ID objects generator" or something and save the .tpz for the repository objects of this scenario, since you could reuse it in other projects.
    Other than that, in Teched '08, Bill Li showed a lot of proxies developed over Java to consume the ID API web services, and they all seemed to work ok. However I do think he used NW Developers Studio 7.0 (2004s), not CE.
    I'd raise an OSS msg with SAP in order to check the problem you're getting.
    Regards,
    Henrique.

  • Web Services using Java 6

    Hi,
    Well, I've been very enthusiastic in implementing a new application that's taking advantage of the newly introduced technology that Java 6 has to offer, instant web services that is. I've implemented the web services and was also able to launch the internal server that comes with the JDK. I must admit that life became really easy due to those introduced technologies, it saved me a lot of time. Furthermore, now I've reached a point where an application I'm integrating with needs to call my server by invoking a simple http request, however, since my server only provides web services I'm kind of stuck and can't think of an easy (fast) solution... I wouldn't like returning to the frustrating old days where I had to use Tomcat and also Axis in order to support both of these functionalities... the question is whether there is a simple way to also expose a simple servlet by using the internal Java 6 server or maybe there is a way to expose a webservice that is actually a servlet...
    your answers are very appreciated :)
    thanks,
    Gil.
    Edited by: GilBa on Apr 15, 2009 2:05 PM

    Hi,
    well, I've taken your advice seriously and immediately turned into embedding Jetty into my application...
    However, due to the fact that I'm a newbie to both Jetty and Web Services I have gotten to a point where I no longer manage to continue :-(
    In order to enable web services I've followed this guideline ([http://gorik.wordpress.com/2008/03/15/jax-ws-and-jetty/]), however, it seems to mislead in some points or at least lacks some vital information I suppose...
    I could not successfully access my webservice even after doing the following actions:
    1 - Writing web service source code and using webservice annotations.
    2 - Successfully generating wsdl and xsd files
    3 - Successfully running Jetty server
    4 - created folders under jetty\webapps\ : myApplication\WEB-INF, myApplication\wsdl
    5 - copied jar file holding the webservice into WEB-INF lib, copied the wsdl under the wsdl lib
    6 - created a web.xml file under myApplication with the following content:
    <web-app version="2.4? mlns="http://java.sun.com/xml/ns/j2ee" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee [http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd]">
    <description>fromwsdl</description>
    <display-name>fromwsdl</display-name></web-app>
    <listener>
    <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class></listener> <servlet>
    <description>JAX-WS endpoint - fromwsdl</description>
    <display-name>fromwsdl</display-name>
    <servlet-name>WebServices</servlet-name>
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>WebServices</servlet-name>
    <url-pattern>/NadlanWebServices</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>60</session-timeout>
    </session-config>
    {code}
    and what happens when I launch Jetty server is that it claims that it cannot find index.jsp file which is the file that's configured in jetty/etc/webdefault.xml,
    though clearly, it should have not looked for this file due to the servlet mapping I've configured in the web.xml that appears above...
    please help ....
    thanks,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Which is best web service framework for developing web services in Java?

    Hi Friends,
    I want to develop web services using Java 1.5.
    But I am in confusion with different frameworks provides to develop WS.
    Like
    1) Apache axis
    2) Java Web Service dev. Pack
    3) JSON-RPC-Java
    4) Web Ser. Invocation Pack
    5) XFire
    Can some one guide which framework should I use?
    OR where will i get useful comparison between this frameworks?

    Hi,
    Personally I have used:
    1. XFire
    2. Apache Axis
    3. Java Web Service Pack
    My personal opinion / .02 cents?
    1. XFire is awesome and very easy to set up and get running. They also have a great community / mailing lists. We use it in some production systems and it runs great.
    2. Apache AXIS 1/2 made me want to dive out the window and go splat just short of the double yellow line on the road. Pain in the butt to set up and get running. Way too complex. Really bad docs / tutorials / support.
    3. Java Web Service Pack - I really prefer NetBeans 5.5 and the JWSP. Easy to build services, cohesive enviroment. You can get the job done.
    That's my two cents.
    M Goodell

Maybe you are looking for