Cannot invoke Call with null namespace URI for method null

R

raviupasi

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-Arte...rtemis/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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top