You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Tiago Fernandes Thomaz <ti...@optimus.pt> on 2002/09/16 13:51:01 UTC

URGENT: BadTargetObjectURI

Hi SOAP gurus!

I'm facing a quite anoying problem. 
I'm using Apache SOAP 2.2 and JBoss2.4.7-Tomcat4.0.4. The problem is due to the fact that I'm requesting a service urn:SOAP
which has a mapping to a java class provider (com.mypackage.SOAPClass).
This version of JBoss creates all web contexts in a temporary folder like /tmp/soap.war/web1001/WEB-INF/classes/org/apache/soap/... .
When JBoss starts up it deploys all the content contained in /deploy directory which has soap.war file with com.mypackage.SOAPClass, DeployedServices.ds and DeploymentDescriptor.xml files. since the only service that I want is urn:SOAP which consists on mapping to the java class provider I previously added those 3 files to soap.war file.
So, when the soap context is generated at JBoss runtime, it has also com.mypackage.SOAPClass.

My java SOAP client code is:

SOAP.java:

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class SOAP
{
  public static void main (String[] args) throws Exception
  {
    URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    String sXML = null;

    for (int i = 0; i < 1; i++)
    {

      sXML = "Hello Tiago!";

      Call call = new Call();
      call.setTargetObjectURI("urn:SOAP");
      call.setMethodName("method01");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
      Vector params = new Vector();
      params.addElement(new org.apache.soap.rpc.Parameter("sXML", String.class, sXML, null));

      call.setParams(params);

      (new TestThread(call, url)).start();
    }
  }
}


TestThread.java:

import java.net.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class TestThread extends Thread
{
  Call testCall = null;
  URL  url = null;
  ObjectRequest objR = new ObjectRequest();

  public TestThread(Call testCall, URL url)
  {
    this.testCall = testCall;
    this.url = url;
  }

  public void run()
  {
    try {
      org.apache.soap.rpc.Response resp = testCall.invoke(url, "");

      if (resp.generatedFault())
      {
        Fault fault = resp.getFault();
        System.out.println(this.getName() + " - Fault Code   = " + fault.getFaultCode());
        System.out.println(this.getName() + " - Fault String = " + fault.getFaultString());
        System.out.println(this.getName() + " - Fault ActorURI = " + fault.getFaultActorURI());
        System.out.println(this.getName() + " - Fault DetailEntries = " + fault.getDetailEntries());
      }
      else
      {
        org.apache.soap.rpc.Parameter result = resp.getReturnValue();
        String res = result.toString();
        Object obj = result.getValue();
        String resp2 = obj.toString();
        System.out.println(this.getName()+" - Result: "+resp2);
      }
    }
    catch (Exception e)
    {
      System.out.println(this.getName() + " :Error! - " + e.getMessage());
    }
  }
}

I keep getting the following error:

SOAP Server: BadTargetObjectURI
Unable to resolve target: com.mypackage.SOAPClass
Fault ActorURI: /soap/servlet/rpcrouter

The question is that if I set the SOAP Service with the wrong name, for instance:

 call.setTargetObjectURI("urn:SOA");

I get another error: 

SOAP Server: service "urn:SOA" unknown
Fault ActorURI: /soap/servlet/rpcrouter

which means, I presume, that the servlet rpcrouter couldn't find that service in DeployedServices.ds, which is different from the first error.
I believe that in the first case, the SOAP request is catched by rpcrouter but it cannot be mapped to the java class provider.
Am I wrong? 
What do you think might be the problem?
I would appreciate a lot any help provided.

My best,

Tiago Fernandes Thomaz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: URGENT: BadTargetObjectURI

Posted by Scott Nichol <sn...@scottnichol.com>.
The simple things to check:

Is your class in soap.war as WEB-INF/classes/com/mypackage/SOAPClass.class?
Is "package com.mypackage" specified in SOAPClass.java?

Scott Nichol

----- Original Message -----
From: "Tiago Fernandes Thomaz" <ti...@optimus.pt>
To: <so...@xml.apache.org>
Sent: Monday, September 16, 2002 7:51 AM
Subject: URGENT: BadTargetObjectURI


Hi SOAP gurus!

I'm facing a quite anoying problem.
I'm using Apache SOAP 2.2 and JBoss2.4.7-Tomcat4.0.4. The problem is due to
the fact that I'm requesting a service urn:SOAP
which has a mapping to a java class provider (com.mypackage.SOAPClass).
This version of JBoss creates all web contexts in a temporary folder like
/tmp/soap.war/web1001/WEB-INF/classes/org/apache/soap/... .
When JBoss starts up it deploys all the content contained in /deploy
directory which has soap.war file with com.mypackage.SOAPClass,
DeployedServices.ds and DeploymentDescriptor.xml files. since the only
service that I want is urn:SOAP which consists on mapping to the java class
provider I previously added those 3 files to soap.war file.
So, when the soap context is generated at JBoss runtime, it has also
com.mypackage.SOAPClass.

My java SOAP client code is:

SOAP.java:

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class SOAP
{
  public static void main (String[] args) throws Exception
  {
    URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    String sXML = null;

    for (int i = 0; i < 1; i++)
    {

      sXML = "Hello Tiago!";

      Call call = new Call();
      call.setTargetObjectURI("urn:SOAP");
      call.setMethodName("method01");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
      Vector params = new Vector();
      params.addElement(new org.apache.soap.rpc.Parameter("sXML",
String.class, sXML, null));

      call.setParams(params);

      (new TestThread(call, url)).start();
    }
  }
}


TestThread.java:

import java.net.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class TestThread extends Thread
{
  Call testCall = null;
  URL  url = null;
  ObjectRequest objR = new ObjectRequest();

  public TestThread(Call testCall, URL url)
  {
    this.testCall = testCall;
    this.url = url;
  }

  public void run()
  {
    try {
      org.apache.soap.rpc.Response resp = testCall.invoke(url, "");

      if (resp.generatedFault())
      {
        Fault fault = resp.getFault();
        System.out.println(this.getName() + " - Fault Code   = " +
fault.getFaultCode());
        System.out.println(this.getName() + " - Fault String = " +
fault.getFaultString());
        System.out.println(this.getName() + " - Fault ActorURI = " +
fault.getFaultActorURI());
        System.out.println(this.getName() + " - Fault DetailEntries = " +
fault.getDetailEntries());
      }
      else
      {
        org.apache.soap.rpc.Parameter result = resp.getReturnValue();
        String res = result.toString();
        Object obj = result.getValue();
        String resp2 = obj.toString();
        System.out.println(this.getName()+" - Result: "+resp2);
      }
    }
    catch (Exception e)
    {
      System.out.println(this.getName() + " :Error! - " + e.getMessage());
    }
  }
}

I keep getting the following error:

SOAP Server: BadTargetObjectURI
Unable to resolve target: com.mypackage.SOAPClass
Fault ActorURI: /soap/servlet/rpcrouter

The question is that if I set the SOAP Service with the wrong name, for
instance:

 call.setTargetObjectURI("urn:SOA");

I get another error:

SOAP Server: service "urn:SOA" unknown
Fault ActorURI: /soap/servlet/rpcrouter

which means, I presume, that the servlet rpcrouter couldn't find that
service in DeployedServices.ds, which is different from the first error.
I believe that in the first case, the SOAP request is catched by rpcrouter
but it cannot be mapped to the java class provider.
Am I wrong?
What do you think might be the problem?
I would appreciate a lot any help provided.

My best,

Tiago Fernandes Thomaz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: URGENT: BadTargetObjectURI

Posted by Scott Nichol <sn...@scottnichol.com>.
The simple things to check:

Is your class in soap.war as WEB-INF/classes/com/mypackage/SOAPClass.class?
Is "package com.mypackage" specified in SOAPClass.java?

Scott Nichol

----- Original Message -----
From: "Tiago Fernandes Thomaz" <ti...@optimus.pt>
To: <so...@xml.apache.org>
Sent: Monday, September 16, 2002 7:51 AM
Subject: URGENT: BadTargetObjectURI


Hi SOAP gurus!

I'm facing a quite anoying problem.
I'm using Apache SOAP 2.2 and JBoss2.4.7-Tomcat4.0.4. The problem is due to
the fact that I'm requesting a service urn:SOAP
which has a mapping to a java class provider (com.mypackage.SOAPClass).
This version of JBoss creates all web contexts in a temporary folder like
/tmp/soap.war/web1001/WEB-INF/classes/org/apache/soap/... .
When JBoss starts up it deploys all the content contained in /deploy
directory which has soap.war file with com.mypackage.SOAPClass,
DeployedServices.ds and DeploymentDescriptor.xml files. since the only
service that I want is urn:SOAP which consists on mapping to the java class
provider I previously added those 3 files to soap.war file.
So, when the soap context is generated at JBoss runtime, it has also
com.mypackage.SOAPClass.

My java SOAP client code is:

SOAP.java:

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class SOAP
{
  public static void main (String[] args) throws Exception
  {
    URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    String sXML = null;

    for (int i = 0; i < 1; i++)
    {

      sXML = "Hello Tiago!";

      Call call = new Call();
      call.setTargetObjectURI("urn:SOAP");
      call.setMethodName("method01");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
      Vector params = new Vector();
      params.addElement(new org.apache.soap.rpc.Parameter("sXML",
String.class, sXML, null));

      call.setParams(params);

      (new TestThread(call, url)).start();
    }
  }
}


TestThread.java:

import java.net.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class TestThread extends Thread
{
  Call testCall = null;
  URL  url = null;
  ObjectRequest objR = new ObjectRequest();

  public TestThread(Call testCall, URL url)
  {
    this.testCall = testCall;
    this.url = url;
  }

  public void run()
  {
    try {
      org.apache.soap.rpc.Response resp = testCall.invoke(url, "");

      if (resp.generatedFault())
      {
        Fault fault = resp.getFault();
        System.out.println(this.getName() + " - Fault Code   = " +
fault.getFaultCode());
        System.out.println(this.getName() + " - Fault String = " +
fault.getFaultString());
        System.out.println(this.getName() + " - Fault ActorURI = " +
fault.getFaultActorURI());
        System.out.println(this.getName() + " - Fault DetailEntries = " +
fault.getDetailEntries());
      }
      else
      {
        org.apache.soap.rpc.Parameter result = resp.getReturnValue();
        String res = result.toString();
        Object obj = result.getValue();
        String resp2 = obj.toString();
        System.out.println(this.getName()+" - Result: "+resp2);
      }
    }
    catch (Exception e)
    {
      System.out.println(this.getName() + " :Error! - " + e.getMessage());
    }
  }
}

I keep getting the following error:

SOAP Server: BadTargetObjectURI
Unable to resolve target: com.mypackage.SOAPClass
Fault ActorURI: /soap/servlet/rpcrouter

The question is that if I set the SOAP Service with the wrong name, for
instance:

 call.setTargetObjectURI("urn:SOA");

I get another error:

SOAP Server: service "urn:SOA" unknown
Fault ActorURI: /soap/servlet/rpcrouter

which means, I presume, that the servlet rpcrouter couldn't find that
service in DeployedServices.ds, which is different from the first error.
I believe that in the first case, the SOAP request is catched by rpcrouter
but it cannot be mapped to the java class provider.
Am I wrong?
What do you think might be the problem?
I would appreciate a lot any help provided.

My best,

Tiago Fernandes Thomaz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




RE: URGENT: BadTargetObjectURI

Posted by Henk Schipper <he...@software684.com>.
Hi Tiago,

Have you tried the communication with samples provided with SOAP 2.2?
If those work, at least you have apache configured well. If not, i can
always help you with apache config.
Are you also sure about http://localhost:8080/soap/servlet/rpcrouter ?
Or do you have to go to an other url?

regards,

Henk.

-----Original Message-----
From: Tiago Fernandes Thomaz [mailto:tiago.thomaz@optimus.pt]
Sent: Monday, 16 September, 2002 1:51 PM
To: soap-dev@xml.apache.org
Subject: URGENT: BadTargetObjectURI


Hi SOAP gurus!

I'm facing a quite anoying problem.
I'm using Apache SOAP 2.2 and JBoss2.4.7-Tomcat4.0.4. The problem is due to
the fact that I'm requesting a service urn:SOAP
which has a mapping to a java class provider (com.mypackage.SOAPClass).
This version of JBoss creates all web contexts in a temporary folder like
/tmp/soap.war/web1001/WEB-INF/classes/org/apache/soap/... .
When JBoss starts up it deploys all the content contained in /deploy
directory which has soap.war file with com.mypackage.SOAPClass,
DeployedServices.ds and DeploymentDescriptor.xml files. since the only
service that I want is urn:SOAP which consists on mapping to the java class
provider I previously added those 3 files to soap.war file.
So, when the soap context is generated at JBoss runtime, it has also
com.mypackage.SOAPClass.

My java SOAP client code is:

SOAP.java:

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class SOAP
{
  public static void main (String[] args) throws Exception
  {
    URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    String sXML = null;

    for (int i = 0; i < 1; i++)
    {

      sXML = "Hello Tiago!";

      Call call = new Call();
      call.setTargetObjectURI("urn:SOAP");
      call.setMethodName("method01");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
      Vector params = new Vector();
      params.addElement(new org.apache.soap.rpc.Parameter("sXML",
String.class, sXML, null));

      call.setParams(params);

      (new TestThread(call, url)).start();
    }
  }
}


TestThread.java:

import java.net.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class TestThread extends Thread
{
  Call testCall = null;
  URL  url = null;
  ObjectRequest objR = new ObjectRequest();

  public TestThread(Call testCall, URL url)
  {
    this.testCall = testCall;
    this.url = url;
  }

  public void run()
  {
    try {
      org.apache.soap.rpc.Response resp = testCall.invoke(url, "");

      if (resp.generatedFault())
      {
        Fault fault = resp.getFault();
        System.out.println(this.getName() + " - Fault Code   = " +
fault.getFaultCode());
        System.out.println(this.getName() + " - Fault String = " +
fault.getFaultString());
        System.out.println(this.getName() + " - Fault ActorURI = " +
fault.getFaultActorURI());
        System.out.println(this.getName() + " - Fault DetailEntries = " +
fault.getDetailEntries());
      }
      else
      {
        org.apache.soap.rpc.Parameter result = resp.getReturnValue();
        String res = result.toString();
        Object obj = result.getValue();
        String resp2 = obj.toString();
        System.out.println(this.getName()+" - Result: "+resp2);
      }
    }
    catch (Exception e)
    {
      System.out.println(this.getName() + " :Error! - " + e.getMessage());
    }
  }
}

I keep getting the following error:

SOAP Server: BadTargetObjectURI
Unable to resolve target: com.mypackage.SOAPClass
Fault ActorURI: /soap/servlet/rpcrouter

The question is that if I set the SOAP Service with the wrong name, for
instance:

 call.setTargetObjectURI("urn:SOA");

I get another error:

SOAP Server: service "urn:SOA" unknown
Fault ActorURI: /soap/servlet/rpcrouter

which means, I presume, that the servlet rpcrouter couldn't find that
service in DeployedServices.ds, which is different from the first error.
I believe that in the first case, the SOAP request is catched by rpcrouter
but it cannot be mapped to the java class provider.
Am I wrong?
What do you think might be the problem?
I would appreciate a lot any help provided.

My best,

Tiago Fernandes Thomaz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>



RE: URGENT: BadTargetObjectURI

Posted by Henk Schipper <he...@software684.com>.
Hi Tiago,

Have you tried the communication with samples provided with SOAP 2.2?
If those work, at least you have apache configured well. If not, i can
always help you with apache config.
Are you also sure about http://localhost:8080/soap/servlet/rpcrouter ?
Or do you have to go to an other url?

regards,

Henk.

-----Original Message-----
From: Tiago Fernandes Thomaz [mailto:tiago.thomaz@optimus.pt]
Sent: Monday, 16 September, 2002 1:51 PM
To: soap-dev@xml.apache.org
Subject: URGENT: BadTargetObjectURI


Hi SOAP gurus!

I'm facing a quite anoying problem.
I'm using Apache SOAP 2.2 and JBoss2.4.7-Tomcat4.0.4. The problem is due to
the fact that I'm requesting a service urn:SOAP
which has a mapping to a java class provider (com.mypackage.SOAPClass).
This version of JBoss creates all web contexts in a temporary folder like
/tmp/soap.war/web1001/WEB-INF/classes/org/apache/soap/... .
When JBoss starts up it deploys all the content contained in /deploy
directory which has soap.war file with com.mypackage.SOAPClass,
DeployedServices.ds and DeploymentDescriptor.xml files. since the only
service that I want is urn:SOAP which consists on mapping to the java class
provider I previously added those 3 files to soap.war file.
So, when the soap context is generated at JBoss runtime, it has also
com.mypackage.SOAPClass.

My java SOAP client code is:

SOAP.java:

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class SOAP
{
  public static void main (String[] args) throws Exception
  {
    URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    String sXML = null;

    for (int i = 0; i < 1; i++)
    {

      sXML = "Hello Tiago!";

      Call call = new Call();
      call.setTargetObjectURI("urn:SOAP");
      call.setMethodName("method01");
      call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
      Vector params = new Vector();
      params.addElement(new org.apache.soap.rpc.Parameter("sXML",
String.class, sXML, null));

      call.setParams(params);

      (new TestThread(call, url)).start();
    }
  }
}


TestThread.java:

import java.net.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;

public class TestThread extends Thread
{
  Call testCall = null;
  URL  url = null;
  ObjectRequest objR = new ObjectRequest();

  public TestThread(Call testCall, URL url)
  {
    this.testCall = testCall;
    this.url = url;
  }

  public void run()
  {
    try {
      org.apache.soap.rpc.Response resp = testCall.invoke(url, "");

      if (resp.generatedFault())
      {
        Fault fault = resp.getFault();
        System.out.println(this.getName() + " - Fault Code   = " +
fault.getFaultCode());
        System.out.println(this.getName() + " - Fault String = " +
fault.getFaultString());
        System.out.println(this.getName() + " - Fault ActorURI = " +
fault.getFaultActorURI());
        System.out.println(this.getName() + " - Fault DetailEntries = " +
fault.getDetailEntries());
      }
      else
      {
        org.apache.soap.rpc.Parameter result = resp.getReturnValue();
        String res = result.toString();
        Object obj = result.getValue();
        String resp2 = obj.toString();
        System.out.println(this.getName()+" - Result: "+resp2);
      }
    }
    catch (Exception e)
    {
      System.out.println(this.getName() + " :Error! - " + e.getMessage());
    }
  }
}

I keep getting the following error:

SOAP Server: BadTargetObjectURI
Unable to resolve target: com.mypackage.SOAPClass
Fault ActorURI: /soap/servlet/rpcrouter

The question is that if I set the SOAP Service with the wrong name, for
instance:

 call.setTargetObjectURI("urn:SOA");

I get another error:

SOAP Server: service "urn:SOA" unknown
Fault ActorURI: /soap/servlet/rpcrouter

which means, I presume, that the servlet rpcrouter couldn't find that
service in DeployedServices.ds, which is different from the first error.
I believe that in the first case, the SOAP request is catched by rpcrouter
but it cannot be mapped to the java class provider.
Am I wrong?
What do you think might be the problem?
I would appreciate a lot any help provided.

My best,

Tiago Fernandes Thomaz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>