Cannot invoke Call with null namespace URI for method null

Discussion in 'Java' started by raviupasi@gmail.com, May 12, 2006.

  1. Guest

    HI Axis Users..

    I am using axis to call my Webservice which is running on the Weblogic
    server.
    I am getting the below error from past 2 to 3 days.. I am trying to
    write a standalone java program to access the webservice using Axis. I
    am using xml-axis-beta1.
    I am getting the bellow error.
    Cannot invoke Call with null namespace URI for method null
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at MyTest.main(MyTest.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
    :25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
    Process finished with exit code 0


    Here is my code to call the webservice:............................

    Service service = new Service();

    Call call = (Call)service.createCall();

    String endpoint =
    "http://localhost:7001/Business-Artemis-WebServices/membership/artemis/web_services/WorkflowWS.jws
    ";
    call.setTargetEndpointAddress(new URL(endpoint));
    call.setOperationName("enrollCustomer");

    call.setUseSOAPAction(true);
    call.setSOAPActionURI("http://www.openuri.org/enrollCustomer");
    call.setOperationStyle("document");
    call.setPortTypeName(new
    QName("http://localhost:7001/Business-Artemis-WebServices/membership/artemis/web_services/WorkflowWS/enrollCustomer
    "));

    try{

    String xml =
    ((EnrollCustomerRequestDocument)it.next()).xmlText();
    SOAPEnvelope enrollrequest = new SOAPEnvelope();
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance ();
    DocumentBuilder docBuilder = factory.newDocumentBuilder();
    enrollrequest.setNamespaceURI("urn:enrollCustomer");
    String str = enrollrequest.getNamespaceURI();
    File xmlfile = new File("C:\\Progeny
    Docs\\Donnelley\\temp.xml");
    Document doc = docBuilder.parse(xmlfile);
    Element xmlElement = doc.getDocumentElement();
    SOAPBodyElement messageElement = new
    SOAPBodyElement(xmlElement);
    enrollrequest.addBodyElement (messageElement);

    // now call the Web Service and display the reply
    System.out.println("SOAP ENVELOPE
    :"+enrollrequest.toString());

    System.out.println("Hello dude!!!!!!!!!!!!!");

    SOAPEnvelope reply = call.invoke(enrollrequest);
    SOAPBodyElement body = reply.getFirstBody();
    }



    I am not sure how to set the namespaceURI and method name?

    Could any one suggest some solution for this issue!!

    Waiting for replies///

    Regards

    Ravi
     
    , May 12, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Harris
    Replies:
    0
    Views:
    6,489
    Simon Harris
    May 10, 2005
  2. Stanimir Stamenkov
    Replies:
    1
    Views:
    2,537
    Stanimir Stamenkov
    Aug 17, 2005
  3. Pavel
    Replies:
    2
    Views:
    1,732
    Peter Flynn
    Aug 4, 2004
  4. etheriau
    Replies:
    1
    Views:
    701
    Pavel
    Aug 23, 2004
  5. Joe Curry

    Invalid URI: The format of the URI could not be determined.

    Joe Curry, Oct 8, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    391
    Joe Curry
    Oct 8, 2003
Loading...

Share This Page