How to invoke Web Service in JAVA from CRM 5.0

Hi.
I created a Web Service in JAVA. Now I want to invoke it from CRM 5.0
in ABAP. How to do it? Could someone give me detail step in step?
Thanks in advance!

check this weblog by Thomas Jung
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
Raja

Similar Messages

  • How to create web services in java?

    Hi,
    I am a newbie to java webservices. Can anybody tell me how to create web services in java?
    Any tutorial link or step by step doc would be useful.
    Appreciate your help in this regard.
    Thanks in advance.
    naymo01.

    Creating web services in Java appears to depend highly upon the server you intend to use.
    Here's a tutorial: http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

  • How to invoke web service in web Dynpro for java in CE environment.

    Hi all,
    Currently, I would like to invoke web service to retrieve data and display to the web dynpro. Do you have any sample code which I can reference?
    I am currently using CE7.1 SP3.
    Thank you.

    Hi,
    You need to use Adaptive Web Service Model for that.
    Check the tuorial in the link for accessing web services.
    https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#16
    Regards
    Pankaj

  • ! How to start Web Services in Java?

    Hi,
    I am just wondering if someone knows how I can start Web Services with Java?

    The best place to start is at the beginning of the tutorial. If you've downloaded and installed the jwsdp pack, then download the tutorial and read from the start.
    When you come to more specific problems then post again.

  • How to invoke web services in sequence in ESB?

    Is there any way to invoke multiple services (web, adapter) in a sequence using only the ESB? (I don't want to bring in BEPL).
    Something like this:
    Read File using File Adapter into schema
    |
    v
    Invoke database adapter to retrieve data and use it to enrich schema
    |
    v
    Invoke web service to retrieve more data and use it to enrich schema
    |
    v
    Send enriched schema to a final web service to perform some operation.
    Thanks in advance.

    From a technical standpoint, all I want to do is move data from point a to endpoints b, c, and d, and then move the reply or the fault from one of endpoints b, c, or d (whichever one the request went to) back to a.
    The "business logic" along the way is at 3 places:
    (1). To enrich the data that's being moved. The enriching data is in a database someplace. The logic that determines what that data is in the database is in the original data (message).
    Something like this:
    //Based on values in the original message, get some row
    If OriginalData.Body.field1 = X and OriginalData.SOAPHeader.field2 = y then retrieve Database.Row Z from the database
    then
    //Enrich the original message with the data from the retrieved row
    OriginalData.Body.field3 = Database.Row Z.field9
    (2). To decide where to move the data, i.e. b, c, or d. The decision to route the data dynamically retrieved from a web service.
    Something like this:
    Rule 1: If OriginalData.Body.field3 = A and OriginalData.SOAPHeader.field1= B then move data to endpoint b.
    Rule 2: Or If OriginalData.Body.field2 = C and OriginalData.SOAPHeader.field4= C then move data to endpoint c.
    Rule 3: Or If OriginalData.Body.field5 = C and OriginalData.SOAPHeader.field6= C then move data to endpoint d.
    ... and more combinations.
    So, send web service the enriched data and it applies rules Rule 1, and it sends back "b". Send web service the enriched data and it applies rules Rule 2, and it sends back "c". Send web service the enriched data and it applies rules Rule 3, and it sends back "d". In this way, adding new rules to the web service lets the customer dynamically "grow" new endpoints.
    (3). To transform the data from the format of point a to one of the formats of endpoints b, c, or d. The decision to transform the schema of the data is taken based on the outcome of the business logic applied in (2) above.
    This is a sample use case that my customer is using to compare Oracle's ESB capabilities with other vendors', and I have to work within specific boundaries.
    So, as I stated in my first post, I cannot use BPEL. All I have to establish is whether Oracle can do this using ESB.

  • How to invoke web services BPEL from ODI

    Hi All,
    I tried to invoke a BPEL Web service through OdiInvokeWebService tool, and throws me the following message:
    Request invalid. NullPointerException*
    This is the WSDL that I need to consume
    <?xml version="1.0" encoding="UTF-8"?>
    <WL5G3N0:definitions name="Contabilidad" targetNamespace="http://xmlns.oracle.com/Contabilidad" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:WL5G3N2="http://xmlns.oracle.com/Contabilidad" xmlns:WL5G3N3="xs" xmlns:WL5G3N4="r" xmlns:WL5G3N5="http://schemas.xmlsoap.org/wsdl/soap/">
    <WL5G3N0:import location="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?WSDL%2FpruebaOSB%2FRuntimeFault_Contabilidad" namespace="http://schemas.oracle.com/bpel/extension"/>
    <WL5G3N1:partnerLinkType name="Contabilidad">
    <WL5G3N1:role name="ContabilidadProvider">
    <WL5G3N1:portType name="WL5G3N2:Contabilidad"/>
    </WL5G3N1:role>
    </WL5G3N1:partnerLinkType>
    <WL5G3N0:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/Contabilidad" xmlns:ns1="http://schemas.oracle.com/bpel/extension" xmlns:ns2="xs" xmlns:ns3="r" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Contabilidad">
    <import namespace="xs" schemaLocation="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?SCHEMA%2FpruebaOSB%2FSeguridad.xsd"/>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/Contabilidad" xmlns:ns1="http://schemas.oracle.com/bpel/extension" xmlns:ns2="xs" xmlns:ns3="r" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Contabilidad">
    <import namespace="r" schemaLocation="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?SCHEMA%2FpruebaOSB%2FRespuesta.xsd"/>
    </schema>
    </WL5G3N0:types>
    <WL5G3N0:message name="ContabilidadRequestMessage">
    <WL5G3N0:part element="WL5G3N3:Root" name="root"/>
    </WL5G3N0:message>
    <WL5G3N0:message name="ContabilidadResponseMessage">
    <WL5G3N0:part element="WL5G3N4:Respuesta" name="respuesta"/>
    </WL5G3N0:message>
    <WL5G3N0:portType name="Contabilidad">
    <WL5G3N0:operation name="process">
    <WL5G3N0:input message="WL5G3N2:ContabilidadRequestMessage"/>
    <WL5G3N0:output message="WL5G3N2:ContabilidadResponseMessage"/>
    </WL5G3N0:operation>
    </WL5G3N0:portType>
    <WL5G3N0:binding name="ContabilidadBinding" type="WL5G3N2:Contabilidad">
    <WL5G3N5:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <WL5G3N0:operation name="process">
    <WL5G3N5:operation soapAction="process" style="document"/>
    <WL5G3N0:input>
    <WL5G3N5:body use="literal"/>
    </WL5G3N0:input>
    <WL5G3N0:output>
    <WL5G3N5:body use="literal"/>
    </WL5G3N0:output>
    </WL5G3N0:operation>
    </WL5G3N0:binding>
    <WL5G3N0:service name="Contabilidad">
    <WL5G3N0:port binding="WL5G3N2:ContabilidadBinding" name="ContabilidadPort">
    <WL5G3N5:address location="http://DSKTEAAGRE05.sigfe.local:7021/pruebaOSB/servicioProxyOSB_Contabilidad"/>
    </WL5G3N0:port>
    </WL5G3N0:service>
    </WL5G3N0:definitions>
    I want to know how to invoke this webservice.(BPEL)
    Edited by: user9012955 on 05-08-2011 11:23 AM

    Hi All,
    I tried to invoke a BPEL Web service through OdiInvokeWebService tool, and throws me the following message:
    Request invalid. NullPointerException*
    This is the WSDL that I need to consume
    <?xml version="1.0" encoding="UTF-8"?>
    <WL5G3N0:definitions name="Contabilidad" targetNamespace="http://xmlns.oracle.com/Contabilidad" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:WL5G3N2="http://xmlns.oracle.com/Contabilidad" xmlns:WL5G3N3="xs" xmlns:WL5G3N4="r" xmlns:WL5G3N5="http://schemas.xmlsoap.org/wsdl/soap/">
    <WL5G3N0:import location="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?WSDL%2FpruebaOSB%2FRuntimeFault_Contabilidad" namespace="http://schemas.oracle.com/bpel/extension"/>
    <WL5G3N1:partnerLinkType name="Contabilidad">
    <WL5G3N1:role name="ContabilidadProvider">
    <WL5G3N1:portType name="WL5G3N2:Contabilidad"/>
    </WL5G3N1:role>
    </WL5G3N1:partnerLinkType>
    <WL5G3N0:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/Contabilidad" xmlns:ns1="http://schemas.oracle.com/bpel/extension" xmlns:ns2="xs" xmlns:ns3="r" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Contabilidad">
    <import namespace="xs" schemaLocation="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?SCHEMA%2FpruebaOSB%2FSeguridad.xsd"/>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:client="http://xmlns.oracle.com/Contabilidad" xmlns:ns1="http://schemas.oracle.com/bpel/extension" xmlns:ns2="xs" xmlns:ns3="r" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Contabilidad">
    <import namespace="r" schemaLocation="http://10.10.10.207:7021/pruebaOSB/servicioProxyOSB_Contabilidad?SCHEMA%2FpruebaOSB%2FRespuesta.xsd"/>
    </schema>
    </WL5G3N0:types>
    <WL5G3N0:message name="ContabilidadRequestMessage">
    <WL5G3N0:part element="WL5G3N3:Root" name="root"/>
    </WL5G3N0:message>
    <WL5G3N0:message name="ContabilidadResponseMessage">
    <WL5G3N0:part element="WL5G3N4:Respuesta" name="respuesta"/>
    </WL5G3N0:message>
    <WL5G3N0:portType name="Contabilidad">
    <WL5G3N0:operation name="process">
    <WL5G3N0:input message="WL5G3N2:ContabilidadRequestMessage"/>
    <WL5G3N0:output message="WL5G3N2:ContabilidadResponseMessage"/>
    </WL5G3N0:operation>
    </WL5G3N0:portType>
    <WL5G3N0:binding name="ContabilidadBinding" type="WL5G3N2:Contabilidad">
    <WL5G3N5:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <WL5G3N0:operation name="process">
    <WL5G3N5:operation soapAction="process" style="document"/>
    <WL5G3N0:input>
    <WL5G3N5:body use="literal"/>
    </WL5G3N0:input>
    <WL5G3N0:output>
    <WL5G3N5:body use="literal"/>
    </WL5G3N0:output>
    </WL5G3N0:operation>
    </WL5G3N0:binding>
    <WL5G3N0:service name="Contabilidad">
    <WL5G3N0:port binding="WL5G3N2:ContabilidadBinding" name="ContabilidadPort">
    <WL5G3N5:address location="http://DSKTEAAGRE05.sigfe.local:7021/pruebaOSB/servicioProxyOSB_Contabilidad"/>
    </WL5G3N0:port>
    </WL5G3N0:service>
    </WL5G3N0:definitions>
    I want to know how to invoke this webservice.(BPEL)
    Edited by: user9012955 on 05-08-2011 11:23 AM

  • How to start Web Service Creation Tool in CRM 6.0 ?

    Hi,
    I am trying to create new web service in CRM 6.0. I have gone through the documentation and no where I see how to start this tool. Can anyone explain how to start this tool please.
    Thanks for reading this message. Your help will be appreciated.
    Regards,
    Phani.

    Hi,
    There are 2 ways how you could call up the WebService Tool. The first one is already described before, this is directly from the component workbench (see comment before) in the test mode.
    The second one is to integrate it into any role directly and start it directly from that role. Therefore you have to do the following:
    1. Go to the IMG - Customizing in SAP Gui (transaction SPRO)
    2. there in Customer Relationship Managment-> UI Framework-> Technical role definition enter "define navigation bar profile"
    3. There you will find an logical link (which is the basis for you beeing able to navigate to the WebService tool) named "WEB-SER".
    4. You have to assign this link in the next folder to a Work Center Link Group under "assigned links"
    5. Then you go to the next folder "Define Work Center" and there you assign your "work center link group" to a work center
    Now you have done the basics and now you have to decide in which Role you want to have it displayed. Therefore you go to "Define Profile" further down in the same Tree
    1. Select the role where you want to assign the Work Center to
    2. Go to assign WorkCenters and add it there
    3. Decide on the position number where the work center should appear in your role.
    If you have done this you should and you have not done it so far, go to "Business role" (you could do this in IMG or in the WebUI). As you are already in IMG lets assume you stay there:
    1. Go to "Define Business Role"
    2. Check at the details of the business role that your Navigation bar Profile used in "Define Profile" above is assigned to your business role
    3. Go to "Adjust Work Center" and make sure your work center is there and is not set to "invisible".
    4. In "Ajust Work Center Link Groups" decide if the your new entrie should be displayed in the 2nd Level Menue of your role via flagging "in menu" or if it just should be reachable via the work center (not flagging in menue) but have it visible.
    Via this the new entry should appear in the Work Center (when the user is pressing on the left side just the button of your Work Center or also in the second level menue when he uses the little arrow on the Menue itself.
    Hope this helps
    Florian

  • How to invoking secured service(HTTPS/SSL)from bpel Process

    Hi all,
    i am very new to fusion middle ware. i used jdeveloper 10.1.3.3 and soa-server 10.1.3.1.i need to pass secured wsdl(HTTPS/SSL) from one bpel Process to other. Let me know any certificates are required to do this?
    I am looking forward to getting any advice from our forum.
    thanks & Reagards,
    Hari.

    First of all make sure your jdeveloper and soa suite versions match otherwise you will get unpredictable results. I suggest that you upgrade SOA Suite to 10.1.3.4 as this is the latest version.
    That aside I'm assuming that the bpel process are on the same instance. If this is the case Yes you do need certificates as you need to implement SSL on your SOA Installation. If you use a common certificate such as verisign then the process is simpler as you don't need to worry about the public key as they are standard with Oracle as they are with your browser. If you want to sign your own certificate then you will need to add your public key.
    If your server is already SSL and it is verisign then you should have no issues you will be able to connect.
    cheers
    James

  • How to access/invoke Web Service from BPM Process

    The following steps required to attach and invoke web service method from process:
    1) Add a module in the catalog for ex WebServiceMO
    2) Add WebService Catalog component demoWebService in WebServiceMO
    3) Put ur WSDL address in WSDL address field like "http://localhost:8080/test/test?wsdl"
    4) Click next to introspect the web service it will import required files and setting from the url to your project
    5) Now for invoking webservice just call the method for ex.
    @return as String[]
    getTestStringList(TestInterfaceService, out @return : @return)
    logMessage "web service calll result >>"+length(@return)+">>>"+@return[0]
    Here @ return is the return from webservice call.
    this way u can access web service from BPM process.
    Edited by: Anurag Yadav on Jul 17, 2009 2:19 PM

    I have a web service which does not return any value but when I introspect the web service, I have an out parameter to it.. Not sure why?
    For e.g.
    TestServiceListener.addTestNotes(TestNotes : testNotes, out TestNoteResponse : testNoteResponse);
    So here I see an out parameter, but my web-service has no out parameter...
    Any idea why is this happening?

  • HOW TO CALL A WEB SERVICE OR EJB FROM BPEL

    HI
    i want to call java web service or ejb from my bpel process. how can i do this.
    i am using oracle soa10.1.3.1.0 and jdeveloper 10.1.3.1.0 and oracle database xe 10g.
    thanks in advance K ROY

    You could deploy your EJB or Java under a web service into your OC4J, after that, you invoke a partnerlink from BPEL to the destination of wsdl will do. Also don't forget to add in your XSD schema as well.
    Thanks,
    Jyno

  • How to create a generic method which invokes Web Service

    Hi I have a question how to create Web Service client. In design mode I can't specify static url ?WSDL and process.
    I found briliant method in apache cxf library.
    for example
    JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
    Client clientA = dcf.createClient("http://soabpm-vm:8001/soa-infra/services/default/MailSender/mailsender_client_ep?WSDL");
    Object[] resultA;
    try{
    resultA = clientA.invoke(new QName("http://xmlns.oracle.com/SynchDSBpel20/MailSender/MailSender", "process"), "@", "body", "topic");
    }catch (Exception e){}
    In my case I should create a method with params (urls ?WSDL, URI, operetion name, param1, praram2, param3)
    Is there anything like CXF in ADF library's?

    This can be very easily done using a web service proxy (Select web services from the categories and web service proxy from the items).
    In the "Create Web Service Proxy" wizard, make sure you select JAX-WS client style. JDeveloper will use the JAX-WS web service API and JAXB (Java Architecture for XML Binding) to generate all required classes and methods required to call a web services, binding Java method signatures to WSDL messages and operations.
    Regards
    Antonis

  • (261680070) Q SYNCH-11 How do my web service methods accees EJBs and java classes?

    A<SYNCH-11> How do my web service methods accees EJBs and java classes?
    A<SYNCH-11> It is simple to use java classes, just do it as you would ordinarily.
    The .jws file really contains a simple class so you can program with it in the same
    way that you would use a regular Java class.
    To use an EJB you can go and access it directly as you would with any EJB remote
    client (lookup home stub, create, etc) or if the EJB is deployed to WLS you can use
    a control to provide a very simple wrapper to the EJB. We will see this in detail
    on Thursday in the ADVC module.

    Futher information about the possibility of callback:
    It may be possible for a synchronous only web service (i.e. MS .net) to even paticipant
    in the callback functionality of asynchronous web services. If the client implements
    the appropriate methods for the callback but listens for them on a different port
    or binding than the SOAP request, then web service may be able to build a response
    if the client's "callback URL" is submitted as the beginning part of a conversation.
    Watch the BEA developer forum (http://dev2dev.bea.com) for more information about
    this approach and other tips and techniques for building web services.
    "Adam FitzGerald" <[email protected]> wrote:
    >
    Q<SYNCH-03> I heard that MS .net only implements synchrnonus method? If
    this is true.
    Does it means my async methods will only work with J2EE clients?
    A<SYNCH-03> I do not know the limitations of .net but let me point out that
    is very
    difficult to provide asynchronous web service method invocation (this is
    different
    from an asynchronous web service). HTTP as a general communication protocol
    is based
    on a request and response paradigm so your client libraries will mostly
    likely be
    expecting a response even if it is empty (check the asynchronous example
    from today
    to see that the start method still returns an empty response). You must
    distinguish
    this from the notion of an asynchronous web service which is a business
    operation
    that occurs on the server whose return value/result is not directly associated
    with
    building response to the client. An asynchronous web service can (and generally
    will)
    be started and stopped with web service operations that are invoked synchronously.
    Thus MS .net clients can still be client to WLS hosted web services.

  • How can I invoke web service in BPM Object's method?

    In ALBPM 5.7,AJaX can code by Call BPM Object's method.So I want to invoke web service via AJaX by BPM method.
    My sample code is:
    1: HelloWorldWebService ws = HelloWorldWebService();
    2: String param = "John";
    3: String retresult = "";
    4: ws.sayHello(name : parame; out result : retresult);
    and,I have import HelloWorldWebService by wsdl into catalog.
    In fact,at line 1 there is a error(fuego.connector.ConnectorRuntimeException: session is not started). Web service's instance is not created.
    Anybody can help me? thanks.

    Hi,
    I tried calling a simple webservice deployed in weblogic 8.1(see code) and it was working fine for me.
    Code for WS
    package service;
    import com.bea.control.JwsContext;
    import com.bea.jws.Protocol;
    import org.xmlsoap.schemas.soap.envelope.HeaderDocument;
    import com.bea.xml.XmlException;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class CheckCredit implements com.bea.jws.WebService
    * @common:context
    JwsContext context;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:protocol form-get="false" form-post="false"
    public boolean getCreditRating(String cardNumber)
    System.out.println("Card number is: " + cardNumber );
    boolean result = ((int)(Math.random() *100)) % 2 == 0?true:false;
    return result;
    Code from ALBPM Object method
    creditRatingResult as Bool
    getCreditRating CheckCreditService
    using cardNumber = "1234-5567-4667-4566"
    returning creditRatingResult = creditRatingResult
    logMessage "Result is: " + creditRatingResult
    What I suggest for you problem is:
    1. Check the server on which you have deployed the WS. Does it require any sort of authentication prior to connecting to the WS
    2. It seems you are using Java style in ALBPM. Try switching to PBL. I don't know how it makes a difference, but sometimes it helps
    Thanks and Regards
    Vivek Nandey
    BEA Certified Developer for Integration Solutions
    [email protected]

  • How to access .asmx Web Service using JAVA? Newbie

    Hello Experts,
    Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
    Java Project + C#.Net Web Service = Integration
    1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
    2. The .NET Web Service is available online. (It is made by other people).
    3. Based on the equation, what is the equivalent technology for the + sign?
    4. Can you site a concrete example for accessing a web service?
    5. I'm new here. Totally I have no idea where to start.
    6. Thank you experts.
    Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
    Edited by: Benedict.Aluan on 05 30, 08 1:39 PM

    Hello
    Thanks a lot for your help ...
    I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
    String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
         String namespace = "http://tempuri.org/";
         name = request.getParameter("txtName");
         try
              System.out.println("In Internet Service");
              ServiceFactory factory = ServiceFactory.newInstance();
              Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
              System.out.println("Got Service......");
              Call obj = (Call)serv.createCall();
              System.out.println("Got Call......");
              obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
              obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
              obj.setTargetEndpointAddress(url);
              obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
              obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
              obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
              obj.setReturnType(XMLType.XSD_STRING);
              System.out.println("Parameters Set.....");
              Object[] params = new Object[]{name};
              k = (String)obj.invoke(params);
              System.out.println("Result: "+k);
         catch(Exception e)
            System.out.println("Exception is : "+e);
        }But this code is throwing exception that
    Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
    Plz can u tell me how to access .asmx web service ?
    Waiting 4 reply.

  • Error invoking Web Service from Web application in BEA

    I have a web service wich run fine at bea weblogic.
    If i invoke it from webapp in sunappserver no problem , from plain client no problem , from oc4j no problem, but if a invoke from same webapp from weblogic i get this error:
    <b>java.rmi.RemoteException: Failed to invoke; nested exception is:
    javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException: failed to ser
    ialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup
    failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb.ds
    ic.pucv.cl/types/']:getMatriculaElement}
    at jrockit.reflect.NativeConstructorInvoker.newInstance([Ljava.lang.Object;)Ljava.lang.Object;(Unknown
    Source)
    at java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
            at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(StubImpl.java:269)
            at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:254)
            at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
            at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
            at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
            at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
            at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    Caused by: javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException:  failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping look
    up failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb
    .dsic.pucv.cl/types/']:getMatriculaElement}
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:334)
    at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:250)
    at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
    at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
    at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
    at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.jav
    a:3212)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)</b>
    the WSDL for this ws is:
    <b> <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="WSMatricula" targetNamespace="http://ejb.dsic.pucv.cl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="http://ejb.dsic.pucv.cl/types/" xmlns:s1="http://ejb.dsic.pucv.cl/" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    - <types>
    - <xsd:schema elementFormDefault="qualified" targetNamespace="http://ejb.dsic.pucv.cl/types/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://ejb.dsic.pucv.cl/types/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://ejb.dsic.pucv.cl/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <xsd:element name="getMatriculaElement" nillable="true" type="string" />
      <xsd:element name="getMatriculaResponseElement" nillable="true" type="string" />
      </xsd:schema>
      </types>
    - <message name="EJBConsultaWebService_getMatricula">
      <part element="s0:getMatriculaElement" name="parameters" />
      </message>
    - <message name="EJBConsultaWebService_getMatriculaResponse">
      <part element="s0:getMatriculaResponseElement" name="result" />
      </message>
    - <portType name="WSMatricula">
    - <operation name="getMatricula">
      <input message="s1:EJBConsultaWebService_getMatricula" />
      <output message="s1:EJBConsultaWebService_getMatriculaResponse" />
      </operation>
      </portType>
    - <binding name="WSMatriculaSoapHttp" type="s1:WSMatricula">
      <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getMatricula">
      <s2:operation soapAction="http://ejb.dsic.pucv.cl//getMatricula" />
    - <input>
      <s2:body parts="parameters" use="literal" />
      </input>
    - <output>
      <s2:body parts="result" use="literal" />
      </output>
      </operation>
      </binding>
    - <service name="WSMatricula">
    - <port binding="s1:WSMatriculaSoapHttp" name="WSMatriculaSoapHttpPort">
      <s2:address location="http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort" />
      </port>
      </service>
      </definitions></b>
    and the client is
    <b>
    package cl.pucv.dsic.ws.cliente;
    import com.ac.util.MyDOMParser;
    import java.util.Hashtable;
    import java.util.ArrayList;
    import com.ac.util.Config;
    import java.net.URL;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import java.io.*;
    public class ClienteWebService implements Serializable  {
    private String UrlString    = "";
    private String nameSpaceUri = "";
    private String serviceName  = "";
    private String portName     = "";
        public ClienteWebService() {
    public String getMatricula(String servicename, String param) throws Exception
    try
    Hashtable ht = (Hashtable)Config.getInstance().getHashtable("WS","Nombre",servicename);
    setUrlString((String)ht.get("EndPoint"));
    setNameSpaceUri((String)ht.get("URI"));
    setServiceName((String)ht.get("ServiceName"));
    setPortName((String)ht.get("PortName"));
    URL wsdlUrl = new URL(getUrlString() + "?WSDL");
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    Service helloService =
    serviceFactory.createService(wsdlUrl,
    new QName(getNameSpaceUri(), getServiceName()));
    WebServiceDSICIF myProxy =
    (WebServiceDSICIF) helloService.getPort(new QName(getNameSpaceUri(),
    getPortName()),
    WebServiceDSICIF.class);
    return myProxy.getMatricula(param);
    catch (Exception ex)
    ex.printStackTrace();
    return "<ERROR>"+ ex.getMessage()+"</ERROR>";
    public static void main(String[] args) {
    try {
    ClienteWebService clws = new ClienteWebService();
    ArrayList l = new ArrayList();
    String xml = "";
    if (args.length>0)
    xml = clws.getMatricula("WsSQL",args[0]);
    System.out.println("Rut : " + args[0] + " = " + xml);
    else
    DataInputStream input = new DataInputStream( System.in );
    String bufferIn;
    while((bufferIn = input.readLine()) != null){
    xml = clws.getMatricula("WsSQL",bufferIn);
    System.out.print("Rut : " + bufferIn + " = " + xml);
    } catch (Exception ex) {
    ex.printStackTrace();
    public String getUrlString() {
    return UrlString;
    public void setUrlString(String _UrlString) {
    this.UrlString = _UrlString;
    public String getNameSpaceUri() {
    return nameSpaceUri;
    public void setNameSpaceUri(String _nameSpaceUri) {
    this.nameSpaceUri = _nameSpaceUri;
    public String getServiceName() {
    return serviceName;
    public void setServiceName(String _serviceName) {
    this.serviceName = _serviceName;
    public String getPortName() {
    return portName;
    public void setPortName(String _portName) {
    this.portName = _portName;
    }</b>
    and the external config for this service is:
    <b><Webservices>
    <WS>
         <Nombre>WsSQL</Nombre>     
         <EndPoint>http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort</EndPoint>
         <URI>http://ejb.dsic.pucv.cl/</URI>
         <ServiceName>WSMatricula</ServiceName>
              <PortName>WSMatriculaSoapHttpPort</PortName>
    </WS>
    </Webservices></b>
    please helpme, four days in that :S

    Hi,
    Can you provide the pl/sql function or the web service wsdl generated from it, so that we can try to reproduce it.
    Also, in an earlier post, I saw a workaround of changing it so the function returned defined type as :
    type ListCursor is ref cursor return ListRecord
    You can also see if this works out if possible.
    Regards,
    Sunil..

Maybe you are looking for