This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SOAP - Unable to resolve target object:  RSS feed

 
Jan Schneider
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i am beginner in SOAP an
I tried to run the following code for testing:
try {
Call rpc = new Call ();
rpc.setTargetObjectURI
("buch:Ein_Beispiel_Dienst");
rpc.setMethodName("methode_1");
rpc.setEncodingStyleURI
(Constants.NS_URI_SOAP_ENC );
Vector methoden_parameter = new Vector();
methoden_parameter.addElement(
new Parameter (
"parameter_1",
String.class,
"<Dies ist der �bergebene Wert>",
null
)
);
rpc.setParams( methoden_parameter );
// RPC durchf�hren:
Response antwort = rpc.invoke(
new URL ("
http://localhost:8080/soap/servlet/rpcrouter" ) , ""
);
System.out.println(antwort);
Parameter returnValue =
antwort.getReturnValue();
System.out.println( returnValue.getType() );
} catch (Exception e) {
e.printStackTrace();
}
I got the following error:
java.lang.NullPointerException
at buch.kapitel7.soap.Teste_RPC_1.main(Teste_RPC_1.java:53)
[Header=null] [methodName=null] [targetObjectURI=null] [encodingStyleURI=null] [SOAPContext=[Parts={[cid:null type: text/xml; charset=utf-8 enc: null]}]] [fault=[Attributes={}] [faultCode=SOAP-ENV:Server.BadTargetObjectURI] [faultString=Unable to resolve target object: BeispielServer_1] [faultActorURI=/soap/servlet/rpcrouter] [DetailEntries=] [FaultEntries=]] [Params={}]
What is the reason? I think I have token the correct classpaths. But why SOAP cannot resolve the target obect
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Did you register the method with a deployment descriptor?
2. Did you put the class in the WEB-INF/classes directory where rpcrouter can see it?
Bill
 
Jan Schneider
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William!
Your second tip was right.
Jan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!