You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Martin Gainty <mg...@hotmail.com> on 2006/05/14 13:56:18 UTC
Re: soap with proxy
Good Morning All-
What is the best way to debug and see whats happening on the Server side of
a Soap service?
BTW If I go to the provided endPoint listed as
http://localhost:8080/axis/services/MessageWebServiceWS I am displayed
MessageWebServiceWS
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...
//If I setup a call something like
java.util.List list=null;
Object results=null;
Service service = new Service();
try
{
Call call = (Call) service.createCall();
System.out.println("Just before call.setTargetEndpointAddress(new
java.net.URL(endPoint))");
call.setTargetEndpointAddress(new java.net.URL(endPoint));
//OperationName
call.setOperationName(method);
String[] tokens = word.split(",");
list = java.util.Arrays.asList(tokens);
if(call.isParameterAndReturnSpecRequired(new QName(method)))
{
for (int x=0; x<list.size(); x++)
{
tokens = list.get(x).toString().split("=");
String Fieldname = new String(tokens[0]);
String Fieldname_value = new String(tokens[1]);
determineFieldname(Fieldname,Fieldname_value);
// QName qNameType = new QName("MessageWebServiceWS","string");
QName qNameType = new QName("string");
QName QualifiedFieldname = new QName("MessageWebServiceWS",
Fieldname);
call.addParameter(QualifiedFieldname, qNameType,
java.lang.String.class, ParameterMode.IN);
} //end for
// call.setReturnType(XMLType.SOAP_ARRAY);
} //end isParameterAndReturnSpecRequired(QName operationName) returns
true
Object parameters[] = new Object[]{"String1","String2"};
for (int x=0; x<list.size(); x++)
{
System.out.println("parameter:"+x+" is =
"+parameters[x].toString());
}
//results =
call.invokeOneWay(parameters);
} //end try...
catch(javax.xml.rpc.JAXRPCException jax_rpc)
{
System.out.println("Indide MessageWebServiceClient
JAXRPCException has been thrown message = "+jax_rpc.getMessage());
}
It seems the server side is not operational??
Thanks,
Martin --
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@ws.apache.org>
Sent: Sunday, October 02, 2005 10:49 PM
Subject: Re: soap with proxy
The scope attribute in the deployment descriptor specifies whether the scope
is request, session or application. For request scope, a separate instance
of the service class is created for each request, so there is no
synchronization issue for instance methods, but there can be for class
(static) methods.
There is also session scope, in which one instance of the service class is
created per session, and application scope, in which one instance of the
service class is created to handle all requests. The latter is most common.
In that case, one must be very conscious of synchronization. Most SOAP
calls are implemented in a stateless manner, and synchronization is not
required, but if you have instance variables, etc., that are accessed by
multiple threads concurrently, you must be worried about synchronization.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Bogdan Mihaila" <bm...@yahoo.com>
To: <so...@ws.apache.org>
Sent: Sunday, October 02, 2005 1:02 PM
Subject: Re: soap with proxy
> I solved the problem... I was trying to connect to localhost through proxy
> and it did not work; it returned an http error ("Invalid URL"). But when I
> tried to connect to another host in the local network, it worked. The
> proxy didn't need any authentication.
>
> But I have another question: When multiple clients try to access the same
> file on the server, do I need to need the keyword "syncronize" next to the
> method who is accesing it, in order to syncronize access? Who is
> responsible for the resource sharing (the client or the server)?
>
> Thank you very much for answering.
>
> Scott Nichol <sn...@scottnichol.com> wrote:
> Does your proxy require authentication? If so, you must provide username
> and password as well.
>
> Your best clue would be to capture the network traffic (Network Monitor or
> tcpdump depending on the client platform) to see what the HTML response
> says.
>
> Scott Nichol
>
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> ----- Original Message -----
> From: "Bogdan Mihaila"
> To:
> Sent: Saturday, September 24, 2005 5:14 AM
> Subject: soap with proxy
>
>
> > Hi!
> >
> > I'm a newbie in using Apache SOAP, and I have the following scenario:
> >
> > I have a SOAP client and a server, and I need the client to connect to
> > the server through a proxy. Without proxy, it works fine. I set the
> > proxy parameters (hostname and port) but I get the following error:
> > Unsupported response content type "text/html", must be: "text/xml".
> > The proxy is running Apache, not Tomcat.
> >
> > Any help would be greatly appreciated.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
>
>
> ---------------------------------
> Yahoo! for Good
> Click here to donate to the Hurricane Katrina relief effort.