You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Willie Slepecki <ws...@irsystems.org> on 2003/01/21 16:56:03 UTC
Call with null namespace URI for method null
i am trying to get a service going, and when i try to run the thing, i
get this:
[...]
AxisFault
faultCode: {http://xml.apache.org/axis/}Call.invoke
faultString: Cannot invoke Call with null namespace URI for method null
faultActor: null
faultDetail:
stackTrace: AxisFault
faultCode: {http://xml.apache.org/axis/}Call.invoke
faultString: Cannot invoke Call with null namespace URI for method null
faultActor: null
faultDetail:
Cannot invoke Call with null namespace URI for method null
[...]
here is the XML i am trying to send via SOAP Messaging:
<wfeca xmlns:wfeca="http://www.360-degree.com/ns/wfeca">
<Person xmlns:person="http://www.360-degree.com/ns/person">
<FName>Willie</FName>
<LName>Slepecki</LName>
<MidInit>P</MidInit>
<DOB>09051976</DOB>
<SSN>123121234</SSN>
<HomePhone>4124124125</HomePhone>
</Person>
<Address xmlns:address="http://www.360-degree.com/ns/address">
<AddressLine>The Skateboard Warehouse</AddressLine>
<City>Boston</City>
<State>MA</State>
<Zip>01775</Zip>
</Address>
</wfeca>
and here is the code that fails:
package test.eca;
import java.io.InputStream;
import java.io.StringWriter;
import org.apache.axis.encoding.SerializationContextImpl;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.message.SOAPBodyElement;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
public class ECASubmissionClient
{
/**
* Target service URL
*/
String url;
/**
* Create a client with a target URL
*/
public ECASubmissionClient(String url) {
this.url = url;
}
public String invoke(InputStream po) throws Exception {
// Send the message
Call client = new Call(url);
client.setRequestMessage(new Message(po, true));
client.getMessageContext();
//.setTargetService("http://www.360-degree.com/ns/wfeca");
client.setSOAPActionURI("http://www.360-degree.com/ns/wfeca");
client.invoke();
// Retrieve the response body
MessageContext ctx = client.getMessageContext();
Message outMsg = ctx.getResponseMessage();
SOAPEnvelope envelope = outMsg.getSOAPEnvelope();
SOAPBodyElement body = envelope.getFirstBody();
// Get the XML from the body
StringWriter w = new StringWriter();
SerializationContextImpl sc = new SerializationContextImpl(w, ctx);
body.output(sc);
return w.toString();
//return "test message";
}
}
i have a simple little JSP file that executes this class. i know it can execute
it fine because if i comment out the client.invoke() and everything after, it
runs just fine. i have been struggling with this for 2 weeks now, im out of
ideas, any help please?
thanks
willie