cancel
Showing results for 
Search instead for 
Did you mean: 

Problems getting started with Java Web Services using CIM (can't connect to web service)

Using Java, NetBeans IDE.

 

I have created a test account, and am just getting started trying to create a Java application using the Soap based Web Service calls to the CIM API.

I was able to create a web service client using the WSDL address in the Merchant Web Services API manual for CIM and SOAP, but this is about as far as I have been able to get.

 

I am having issues connecting to the web service.

My first attempt was to try and use the isAlive() function, since it has no parameters, just to see if I can ping the web service.  Here is the source code for my simple test application:

 

import https.api_authorize_net.soap.v1.ANetApiResponseType;
import https.api_authorize_net.soap.v1.CreateCustomerProfileResponseType;

/**
 *
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try
        {
            ANetApiResponseType anrt = isAlive();
        }
        catch (Exception e )
        {
            System.out.println( "Exception = "+e );
        }
    }

    private static ANetApiResponseType isAlive() {
        https.api_authorize_net.soap.v1.Service service = new https.api_authorize_net.soap.v1.Service();
        https.api_authorize_net.soap.v1.ServiceSoap port = service.getServiceSoap12();
        System.out.println( "isAlive = "+port.isAlive() );
        return port.isAlive();
    }
}

 When I attempt to run this, I get the vollowing exception:

javax.xml.ws.WebServiceException: Cannot find 'https://api.authorize.net/soap/v1/Service.asmx?WSDL' wsdl. Place the resource correctly in the classpath.

 

Which really does not make sense, since I used the WSDL address when I created the web service client and the WSDL was also included in my project when the WS client was created.

 

Can anyone give me a clue as to what I need to do in order to get started?

 

Thanks.

 

 

burferd
Member
1 REPLY 1

Hey there,

Sorry for the delay. It doesn't look like anyone has responded yet, but someone still may have feedback on what you're looking for. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any comments. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.

Thanks,

Michelle
Developer Community Manager

Michelle
All Star