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 Anne Thomas Manes <at...@gmail.com> on 2006/08/17 00:58:59 UTC

Re: how to call php soap service in java soap client with axis?

You need to set some attributes in the call object. Take a look at the
Axis "getting started"  documentation
(http://ws.apache.org/axis/java/user-guide.html#BasicsGettingStarted).

At a minimum, you must set the target URL and the operation name, eg:

         call.setTargetEndpointAddress( new java.net.URL(url) );
         call.setOperationName(new QName("qualifying-namespace",
"operationName"));

Do you have a WSDL for the service? That will tell you the appropriate
values to specify. If not, then do you have a sample message that
worked from the perl client? You can find the qualified name of the
operation from it -- it's the name of child element of the
<soap:Body>.

Anne

On 8/16/06, Larry Lemons <ll...@imcwv.com> wrote:
>
>
> So, I'm guessing nobody has any ideas on this one?  Or is more information
> needed to get an answer?  I really do need some help.  We are at at stand
> still and have no other ideas.
>
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
>  ________________________________
>  From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Wednesday, August 16, 2006 10:58 AM
>
> To: axis-user@ws.apache.org
> Subject: RE: how to call php soap service in java soap client with axis?
>
>
>
> You need to make sure you have all the required jar files in your classpath,
> i.e. all the jar files that came with AXIS.  As for needing to install
> Tomcat, unless it is the soap client is running as a servlet or jsp, you
> shouldn't need Tomcat. The client will connect to the php soap service.
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
>  ________________________________
>  From: j g [mailto:jg111gj@yahoo.com]
> Sent: Wednesday, August 16, 2006 10:10 AM
> To: axis-user@ws.apache.org
> Subject: how to call php soap service in java soap client with axis?
>
>
>
> Hi,
> I am new for the Axis.
> I had a php soap service to query our mssql database, I also have a perl
> soap client to call the service by providing parameters like username,
> password etc. They both work fine.
>
> Now, I need to write a java soap client to call the php soap service instead
> of the soap client written in perl. Since the service is writen with php, I
> did not install tomcat at my client computer(do I need it?)
>
> Here is my java code.. When I compile the code, there are errors like:
> package org.apache.axis does not exist
>
> package mysrc.testjavasoap;
> import java.util.*;
> import org.apache.axis.AxisEngine;
> import org.apache.axis.client.Call;
> import org.apache.axis.soap.SOAPConstants;
> public class javasoap {
>
>     public void main () throws Exception{
>         String url =
> "http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php";
>  String query="select top 10 * from DocText";
>         Call call = new Call(url);
>         Object[] params = new Object[] {"db3", "bionlp","username",
> "password", query};
>         String result = (String)call.invoke("",  params);
>     }
> }
>
> Hope somebody can help me!
> Thanks
> --jg
>
>
>  ________________________________
>  Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> countries) for 2¢/min or less.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: how to call php soap service in java soap client with axis?

Posted by Larry Lemons <ll...@imcwv.com>.
We know the perl soap client is fine, which is why we want to see a sample of the XML that it is generating so that we can see the parameters that are being sent by the perl soap client so that we can compare it to what you are using in the call in the java soap client.  What you have looks correct, for the parameters that are being passed, but if you are missing a parameter, then it won't work.  We can't tell whether or not a parameter is missing without either a.) seeing the WSDL or b.) the xml that is being sent from a successful soap client.
 

Thank you,

Larry M. Lemons

(304) 726-4809 Ext. 4505

 

 

________________________________

From: j g [mailto:jg111gj@yahoo.com] 
Sent: Thursday, August 17, 2006 5:01 PM
To: axis-user@ws.apache.org
Subject: Re: how to call php soap service in java soap client with axis?


The perl soap client works fine. What I need to do is to write a java soap client instead of the perl soap client.
--jg

Anne Thomas Manes <at...@gmail.com> wrote:

	Can you capture a sample SOAP message generated by the Perl client?
	
	On 8/17/06, j g wrote:
	>
	> Hi Anne,
	> Thanks for your reply.
	> I donot have WSDL for the service. Could you please tell me what should be
	> the qualifying-namespace and operationName in my case.
	>
	> Here is my perl soap client:
	> #!/usr/bin/perl -w
	> use SOAP::Lite;
	> my $client = SOAP::Lite->new();
	> $client->proxy('http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php');
	> my $query = "select top 10 * from DocText ;
	> my $som = $client->dbquery("server", "database","username", "password",
	> "$query") || die "Query failed $!"; # parameters (server, database, user,
	> password, query)
	>
	>
	> Looking forward to hearing from you
	>
	>
	>
	> Anne Thomas Manes wrote:
	>
	> You need to set some attributes in the call object. Take a look at the
	> Axis "getting started" documentation
	> (http://ws.apache.org/axis/java/user-guide.html#BasicsGettingStarted).
	>
	> At a minimum, you must set the target URL and the operation name, eg:
	>
	> call.setTargetEndpointAddress( new java.net.URL(url) );
	> call.setOperationName(new QName("qualifying-namespace",
	> "operationName"));
	>
	> Do you have a WSDL for the service? That will tell you the appropriate
	> values to specify. If not, then do you have a sample message that
	> worked from the perl client? You can find the qualified name of the
	> operation from it -- it's the name of child element of the
	> .
	>
	> Anne
	>
	>
	> On 8/16/06, Larry Lemons wrote:
	> >
	> >
	> > So, I'm guessing nobody has any ideas on this one? Or is more information
	> > needed to get an answer? I really do need some help. We are at at stand
	> > still and have no other ideas.
	> >
	> >
	> >
	> >
	> > Thank you,
	> >
	> > Larry M. Lemons
	> >
	> > (304) 726-4809 Ext. 4505
	> >
	> >
	> >
	> >
	> > ________________________________
	> > From: Larry Lemons [mailto:llemons@imcwv.com]
	> > Sent: Wednesday, August 16, 2006 10:58 AM
	> >
	> > To: axis-user@ws.apache.org
	> > Subject: RE: how to call php soap service in java soap client with axis?
	> >
	> >
	> >
	> > You need to make sure you have all the required jar files in your
	> classpath,
	> > i.e. all the jar files that came with AXIS. As for needing to install
	> > Tomcat, unless it is the soap client is running as a servlet or jsp, you
	> > shouldn't need Tomcat. The client will connect to the php soap service.
	> >
	> >
	> >
	> > Thank you,
	> >
	> > Larry M. Lemons
	> >
	> > (304) 726-4809 Ext. 4505
	> >
	> >
	> >
	> >
	> > ________________________________
	> > From: j g [mailto:jg111gj@yahoo.com]
	> > Sent: Wednesday, August 16, 2006 10:10 AM
	> > To: axis-user@ws.apache.org
	> > Subject: how to call php soap service in java soap client with axis?
	> >
	> >
	> >
	> > Hi,
	> > I am new for the Axis.
	> > I had a php soap service to query our mssql database, I also have a perl
	> > soap client to call the service by providing parameters like username,
	> > password etc. They both work fine.
	> >
	> > Now, I need to write a java soap client to call the php soap service
	> instead
	> > of the soap client written in perl. Since the service is writen with php,
	> I
	> > did not install tomcat at my client computer(do I need it?)
	> >
	> > Here is my java code.. When I compile the code, there are errors like:
	> > package org.apache.axis does not exist
	> >
	> > package mysrc.testjavasoap;
	> > import java.util.*;
	> > import org.apache.axis.AxisEngine;
	> > import org.apache.axis.client.Call;
	> > import org.apache.axis.soap.SOAPConstants;
	> > public class javasoap {
	> >
	> > public void main () throws Exception{
	> > String url =
	> >
	> "http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php";
	> > String query="select top 10 * from DocText";
	> > Call call = new Call(url);
	> > Object[] params = new Object[] {"db3", "bionlp","username",
	> > "password", query};
	> > String result = (String)call.invoke("", params);
	> > }
	> > }
	> >
	> > Hope somebody can help me!
	> > Thanks
	> > --jg
	> >
	> >
	> > ________________________________
	> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
	> > countries) for 2¢/min or less.
	> >
	> >
	>
	> ---------------------------------------------------------------------
	> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	> For additional commands, e-mail: axis-user-help@ws.apache.org
	>
	>
	>
	>
	>
	> __________________________________________________
	> Do You Yahoo!?
	> Tired of spam? Yahoo! Mail has the best spam protection around
	> http://mail.yahoo.com
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	For additional commands, e-mail: axis-user-help@ws.apache.org
	
	


________________________________

Stay in the know. Pulse on the new Yahoo.com. Check it out. <http://us.rd.yahoo.com/evt=42974/*http://www.yahoo.com/preview>  

Re: how to call php soap service in java soap client with axis?

Posted by j g <jg...@yahoo.com>.
The perl soap client works fine. What I need to do is to write a java soap client instead of the perl soap client.
  --jg

Anne Thomas Manes <at...@gmail.com> wrote:
  Can you capture a sample SOAP message generated by the Perl client?

On 8/17/06, j g wrote:
>
> Hi Anne,
> Thanks for your reply.
> I donot have WSDL for the service. Could you please tell me what should be
> the qualifying-namespace and operationName in my case.
>
> Here is my perl soap client:
> #!/usr/bin/perl -w
> use SOAP::Lite;
> my $client = SOAP::Lite->new();
> $client->proxy('http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php');
> my $query = "select top 10 * from DocText ;
> my $som = $client->dbquery("server", "database","username", "password",
> "$query") || die "Query failed $!"; # parameters (server, database, user,
> password, query)
>
>
> Looking forward to hearing from you
>
>
>
> Anne Thomas Manes wrote:
>
> You need to set some attributes in the call object. Take a look at the
> Axis "getting started" documentation
> (http://ws.apache.org/axis/java/user-guide.html#BasicsGettingStarted).
>
> At a minimum, you must set the target URL and the operation name, eg:
>
> call.setTargetEndpointAddress( new java.net.URL(url) );
> call.setOperationName(new QName("qualifying-namespace",
> "operationName"));
>
> Do you have a WSDL for the service? That will tell you the appropriate
> values to specify. If not, then do you have a sample message that
> worked from the perl client? You can find the qualified name of the
> operation from it -- it's the name of child element of the
> .
>
> Anne
>
>
> On 8/16/06, Larry Lemons wrote:
> >
> >
> > So, I'm guessing nobody has any ideas on this one? Or is more information
> > needed to get an answer? I really do need some help. We are at at stand
> > still and have no other ideas.
> >
> >
> >
> >
> > Thank you,
> >
> > Larry M. Lemons
> >
> > (304) 726-4809 Ext. 4505
> >
> >
> >
> >
> > ________________________________
> > From: Larry Lemons [mailto:llemons@imcwv.com]
> > Sent: Wednesday, August 16, 2006 10:58 AM
> >
> > To: axis-user@ws.apache.org
> > Subject: RE: how to call php soap service in java soap client with axis?
> >
> >
> >
> > You need to make sure you have all the required jar files in your
> classpath,
> > i.e. all the jar files that came with AXIS. As for needing to install
> > Tomcat, unless it is the soap client is running as a servlet or jsp, you
> > shouldn't need Tomcat. The client will connect to the php soap service.
> >
> >
> >
> > Thank you,
> >
> > Larry M. Lemons
> >
> > (304) 726-4809 Ext. 4505
> >
> >
> >
> >
> > ________________________________
> > From: j g [mailto:jg111gj@yahoo.com]
> > Sent: Wednesday, August 16, 2006 10:10 AM
> > To: axis-user@ws.apache.org
> > Subject: how to call php soap service in java soap client with axis?
> >
> >
> >
> > Hi,
> > I am new for the Axis.
> > I had a php soap service to query our mssql database, I also have a perl
> > soap client to call the service by providing parameters like username,
> > password etc. They both work fine.
> >
> > Now, I need to write a java soap client to call the php soap service
> instead
> > of the soap client written in perl. Since the service is writen with php,
> I
> > did not install tomcat at my client computer(do I need it?)
> >
> > Here is my java code.. When I compile the code, there are errors like:
> > package org.apache.axis does not exist
> >
> > package mysrc.testjavasoap;
> > import java.util.*;
> > import org.apache.axis.AxisEngine;
> > import org.apache.axis.client.Call;
> > import org.apache.axis.soap.SOAPConstants;
> > public class javasoap {
> >
> > public void main () throws Exception{
> > String url =
> >
> "http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php";
> > String query="select top 10 * from DocText";
> > Call call = new Call(url);
> > Object[] params = new Object[] {"db3", "bionlp","username",
> > "password", query};
> > String result = (String)call.invoke("", params);
> > }
> > }
> >
> > Hope somebody can help me!
> > Thanks
> > --jg
> >
> >
> > ________________________________
> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> > countries) for 2¢/min or less.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

Re: how to call php soap service in java soap client with axis?

Posted by Anne Thomas Manes <at...@gmail.com>.
Can you capture a sample SOAP message generated by the Perl client?

On 8/17/06, j g <jg...@yahoo.com> wrote:
>
> Hi Anne,
> Thanks for your reply.
> I donot have WSDL for the service. Could you please tell me what should be
> the qualifying-namespace and operationName in my  case.
>
> Here is my perl soap client:
> #!/usr/bin/perl -w
> use SOAP::Lite;
> my $client = SOAP::Lite->new();
> $client->proxy('http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php');
> my $query = "select top 10 * from DocText ;
> my $som = $client->dbquery("server", "database","username", "password",
> "$query") || die "Query failed $!"; # parameters (server, database, user,
> password, query)
>
>
> Looking forward to hearing from you
>
>
>
> Anne Thomas Manes <at...@gmail.com> wrote:
>
> You need to set some attributes in the call object. Take a look at the
> Axis "getting started" documentation
> (http://ws.apache.org/axis/java/user-guide.html#BasicsGettingStarted).
>
> At a minimum, you must set the target URL and the operation name, eg:
>
> call.setTargetEndpointAddress( new java.net.URL(url) );
> call.setOperationName(new QName("qualifying-namespace",
> "operationName"));
>
> Do you have a WSDL for the service? That will tell you the appropriate
> values to specify. If not, then do you have a sample message that
> worked from the perl client? You can find the qualified name of the
> operation from it -- it's the name of child element of the
> .
>
> Anne
>
>
> On 8/16/06, Larry Lemons wrote:
> >
> >
> > So, I'm guessing nobody has any ideas on this one? Or is more information
> > needed to get an answer? I really do need some help. We are at at stand
> > still and have no other ideas.
> >
> >
> >
> >
> > Thank you,
> >
> > Larry M. Lemons
> >
> > (304) 726-4809 Ext. 4505
> >
> >
> >
> >
> > ________________________________
> > From: Larry Lemons [mailto:llemons@imcwv.com]
> > Sent: Wednesday, August 16, 2006 10:58 AM
> >
> > To: axis-user@ws.apache.org
> > Subject: RE: how to call php soap service in java soap client with axis?
> >
> >
> >
> > You need to make sure you have all the required jar files in your
> classpath,
> > i.e. all the jar files that came with AXIS. As for needing to install
> > Tomcat, unless it is the soap client is running as a servlet or jsp, you
> > shouldn't need Tomcat. The client will connect to the php soap service.
> >
> >
> >
> > Thank you,
> >
> > Larry M. Lemons
> >
> > (304) 726-4809 Ext. 4505
> >
> >
> >
> >
> > ________________________________
> > From: j g [mailto:jg111gj@yahoo.com]
> > Sent: Wednesday, August 16, 2006 10:10 AM
> > To: axis-user@ws.apache.org
> > Subject: how to call php soap service in java soap client with axis?
> >
> >
> >
> > Hi,
> > I am new for the Axis.
> > I had a php soap service to query our mssql database, I also have a perl
> > soap client to call the service by providing parameters like username,
> > password etc. They both work fine.
> >
> > Now, I need to write a java soap client to call the php soap service
> instead
> > of the soap client written in perl. Since the service is writen with php,
> I
> > did not install tomcat at my client computer(do I need it?)
> >
> > Here is my java code.. When I compile the code, there are errors like:
> > package org.apache.axis does not exist
> >
> > package mysrc.testjavasoap;
> > import java.util.*;
> > import org.apache.axis.AxisEngine;
> > import org.apache.axis.client.Call;
> > import org.apache.axis.soap.SOAPConstants;
> > public class javasoap {
> >
> > public void main () throws Exception{
> > String url =
> >
> "http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php";
> > String query="select top 10 * from DocText";
> > Call call = new Call(url);
> > Object[] params = new Object[] {"db3", "bionlp","username",
> > "password", query};
> > String result = (String)call.invoke("", params);
> > }
> > }
> >
> > Hope somebody can help me!
> > Thanks
> > --jg
> >
> >
> > ________________________________
> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> > countries) for 2¢/min or less.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
>  __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


how to call php soap service in java soap client with axis?

Posted by j g <jg...@yahoo.com>.
Hi Anne,
  Thanks for your reply.
  I donot have WSDL for the service. Could you please tell me what should be the qualifying-namespace and operationName in my  case. 
   
  Here is my perl soap client:
  #!/usr/bin/perl -w
use SOAP::Lite;
my $client = SOAP::Lite->new();
$client->proxy('http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php');
my $query = "select top 10 * from DocText ;
my $som = $client->dbquery("server", "database","username", "password", "$query") || die "Query failed $!"; # parameters (server, database, user, password, query)
   
  Looking forward to hearing from you

  

Anne Thomas Manes <at...@gmail.com> wrote:
  You need to set some attributes in the call object. Take a look at the
Axis "getting started" documentation
(http://ws.apache.org/axis/java/user-guide.html#BasicsGettingStarted).

At a minimum, you must set the target URL and the operation name, eg:

call.setTargetEndpointAddress( new java.net.URL(url) );
call.setOperationName(new QName("qualifying-namespace",
"operationName"));

Do you have a WSDL for the service? That will tell you the appropriate
values to specify. If not, then do you have a sample message that
worked from the perl client? You can find the qualified name of the
operation from it -- it's the name of child element of the
.

Anne

On 8/16/06, Larry Lemons wrote:
>
>
> So, I'm guessing nobody has any ideas on this one? Or is more information
> needed to get an answer? I really do need some help. We are at at stand
> still and have no other ideas.
>
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Wednesday, August 16, 2006 10:58 AM
>
> To: axis-user@ws.apache.org
> Subject: RE: how to call php soap service in java soap client with axis?
>
>
>
> You need to make sure you have all the required jar files in your classpath,
> i.e. all the jar files that came with AXIS. As for needing to install
> Tomcat, unless it is the soap client is running as a servlet or jsp, you
> shouldn't need Tomcat. The client will connect to the php soap service.
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: j g [mailto:jg111gj@yahoo.com]
> Sent: Wednesday, August 16, 2006 10:10 AM
> To: axis-user@ws.apache.org
> Subject: how to call php soap service in java soap client with axis?
>
>
>
> Hi,
> I am new for the Axis.
> I had a php soap service to query our mssql database, I also have a perl
> soap client to call the service by providing parameters like username,
> password etc. They both work fine.
>
> Now, I need to write a java soap client to call the php soap service instead
> of the soap client written in perl. Since the service is writen with php, I
> did not install tomcat at my client computer(do I need it?)
>
> Here is my java code.. When I compile the code, there are errors like:
> package org.apache.axis does not exist
>
> package mysrc.testjavasoap;
> import java.util.*;
> import org.apache.axis.AxisEngine;
> import org.apache.axis.client.Call;
> import org.apache.axis.soap.SOAPConstants;
> public class javasoap {
>
> public void main () throws Exception{
> String url =
> "http://www.bioinformatics.med.umich.edu/app/nlp/soap/dbquery.php";
> String query="select top 10 * from DocText";
> Call call = new Call(url);
> Object[] params = new Object[] {"db3", "bionlp","username",
> "password", query};
> String result = (String)call.invoke("", params);
> }
> }
>
> Hope somebody can help me!
> Thanks
> --jg
>
>
> ________________________________
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> countries) for 2¢/min or less.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com