Reply
Contributor
HarisK
Posts: 3
0

Getting "No operation available for request " on partner WS call

I was given 2 WSDL files (partner and Z3) in order to build WS consumer. I was told to login using partner service and use session id in Z3 calls. I built 2 jar files using wsdlc

I did this code:

ConnectorConfig partnerConfig = new ConnectorConfig();       
        partnerConfig.setUsername(USERNAME);
        partnerConfig.setPassword(PASSWORD);

PartnerConnection partnerConnection = com.sforce.soap.partner.Connector.newConnection(partnerConfig);

String sid=partnerConnection.getSessionHeader().getSessionId();
        String surl=partnerConnection.getConfig().getServiceEndpoint();
        System.out.println("Sessionid="+sid);
        System.out.println("ServerURL="+surl);

// This returns proper session id and new url

Sessionid=00DZ00000007L9X!AR0A..........0qEoSlSHaXilr1iMMmjdPgjP7G.ooeIMhPA.3PTDXJT8
ServerURL=https://cs11-api.salesforce.com/services/Soap/u/25.0/00DZ00000007P3X

 

Now I try to call other WS( the connector was built from provided wsdl using the tool) :

ConnectorConfig requestConfig = new ConnectorConfig();
        requestConfig.setSessionId(sid);
        requestConfig.setServiceEndpoint(surl);
        SoapConnection z3con=com.sforce.soap.WS_Z3Services.Connector.newConnection(requestConfig)

LegacyAccountInfoResult[] la=z3con.getLegacyAccount("001Z000000Cn26tIAB"); <-- fails right here
        System.out.println(la.length);

Throws exception:

com.sforce.ws.SoapFaultException: No operation available for request {http://soap.sforce.com/schemas/class/WS_Z3Services}getLegacyAccount

 

Am I doing something wrong or the service maybe dows not exist on SF side?

The project uses wsc-22.jar