SOLVED

How to use Java SOAP client

Go to solution
Anonymous
Not applicable

How to use Java SOAP client

Hi All,

I am relatively new to Java and SOAP. and I am supposed to integrate our java application with Marketo for sending welcome registration emails. I went through the SOAP API documentation and identified the Marketo API calls to fulfill our objective.

However I do not know , how to call these API from my java code.  Up on reading i found that I will need a SOAP client to make those calls. I also went through the Sample Java SOAP client . But I don't know how to use it ?
Do we have a jar or something that I can add to my class path OR I can copy this client in to my workspace and modify it as per my SOAP API settings ?

Can somebody provide me a step by step guide for using the sample Java SOAP Client provided by marketo OR if anyone has written their own SOAP client and don't mind sharing ?

Thanks,
Neha

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: How to use Java SOAP client

4 REPLIES 4
Anonymous
Not applicable

Re: How to use Java SOAP client

There is a very good example attached to article "SOAP API Java Example"
 
 
There are also good examples in PHP, very quick and easy to port to Java or any similar language.
 
The term "client" slightly ambiguous since we are not installing anything to interact with SOAP API.
"Sample libraries" would be a better fit.
 
Anonymous
Not applicable

Re: How to use Java SOAP client

Thanks bgomes , for the answer. But I already had a look at the sample JAVA client provided on Marketo site , and I do not know How I can use it ?

Should I pack it as a jar and use it as a 3rd party lib ? Then I can just instantiate the MktowsClient with my SOAP API parameter. Is this the right way to use it ?
Anonymous
Not applicable

Re: How to use Java SOAP client

Neha,
Please see the README at https://github.com/Marketo/SOAP-API-Java-Client

Raj
Anonymous
Not applicable

Re: How to use Java SOAP client

Hi Raj,

I used the SOAP-API-JAVA client  as described in this site -  https://github.com/Marketo/SOAP-API-Java-Client.

However I do have a question on it's usage and expecting that you may be able to answer it.

In marketo client code I see these lines-


QNameserviceName=newQName("http://www.marketo.com/mktows/","MktMktowsApiService");MktMktowsApiServiceservice=newMktMktowsApiService(marketoSoapEndPoint,serviceName);MktowsPortport=service.getMktowsApiSoapPort();


I wanted to know if service.getMktowsApiSoapPort(); is thread safe or not.  
In our application we will be calling multiple instances of marketo connection to send emails on every 
registration.

if it is , then resources we need to release once we have acquired a connection and done with processing.

Thanks, 
Neha