function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
venkatSanthanamvenkatSanthanam 

No operation available for request

Hello,

I get the following error. 

 

I do the following.

1. I write a Apex class called TAAFetchObjectsController with a method in it called getObjectMap

2. The method getObjectMap is made available for webservice and the class and method is set to global

3. I generate a WSDL from this class

4. Import the WSDL into my java environment.

5. Establish connection using Partner API Session URL.

6. Call the method using the stub generated by the WSDL.

 

I get the following error. Any thoughts?

 

I have got this error in the past because of using Enterprise End point URL to a Partner API, but this time, I do not understand what the error is due to. Help is much appreciated.

 

Thanks

Venkat

 

 

 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode: 
 faultString: No operation available for request {https://soap.sforce.com/schemas/class/TAAFetchObjectsController}getObjectMap
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:No operation available for request {https://soap.sforce.com/schemas/class/TAAFetchObjectsController}getObjectMap
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.sforce.soap.schemas._class.TAAFetchObjectsController.TAAFetchObjectsControllerBindingStub.getObjectMap(TAAFetchObjectsControllerBindingStub.java:170)
   

SuperfellSuperfell
What URL is the request going to ?
venkatSanthanamvenkatSanthanam

_call.setOperationName(new javax.xml.namespace.QName("https://soap.sforce.com/schemas/class/TAAFetchObjectsController", "getObjectMap"));

 

The above is the line from BindingStub class. So, my understanding is, the request goes to  https://soap.sforce.com/schemas/class/TAAFetchObjectsController

 

Also, the error from the log also shows the same url.

 

The partner API that I am using is https://cs3.salesforce.com/services/Soap/u/15.0/00DQ00000008sVI

 

Thanks

Venkat

SuperfellSuperfell

That's the xml namespace, not the url of the service.

 

Can you post your code? 

venkatSanthanamvenkatSanthanam

inputs:

sfdcSessionURL = https://cs3.salesforce.com/services/Soap/u/15.0/00DQ00000008sVI

sfdcSessionID = a valid Session ID.

 

 

TAAFetchObjectsConnector connectorFetch = new TAAFetchObjectsConnector(sfdcSessionId,sfdcSessionURL);
         Result thisResult = connectorFetch.getServiceStub().getObjectMap(accountID, oppAccountID, oppId, primaryContactID, sfdcUserInfoResult.getUserId());
        

 

public TAAFetchObjectsConnector(String sfdcSessionId, String sfdcSessionURL) throws ServiceException, RemoteException {
            this.SESSION_ID = sfdcSessionId;
            this.SESSION_URL = sfdcSessionURL;
            init();
        }

 

private void init() throws ServiceException, RemoteException {
            LOGGER.info("Connecting to {" + SESSION_URL  + "} with Sessiion ID {" + SESSION_ID + "}");
            initSOAPServiceStub();
            initSOAPSessionHeader();
        }

 

/**
         * Initializes the Service Stub
         * @throws ServiceException
         * @throws RemoteException
         */
        private void initSOAPServiceStub() throws ServiceException, RemoteException {
            TAAFetchObjectsControllerServiceLocator sLocator = new TAAFetchObjectsControllerServiceLocator();
            sLocator.setTAAFetchObjectsControllerEndpointAddress(this.SESSION_URL);
           
            this.serviceStub = (TAAFetchObjectsControllerBindingStub) sLocator.getPort(TAAFetchObjectsControllerPortType.class);
            this.serviceLocator = sLocator;
           
        }
        /**
         * Initializes the Session Header and links with the Service Stub.
         */
        private void initSOAPSessionHeader() {
            this.sessionHeader = new SessionHeader();
            this.sessionHeader.setSessionId(this.SESSION_ID);
           
            this.serviceStub._setProperty(TAAFetchObjectsControllerBindingStub.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
            this.serviceStub.setHeader(this.serviceLocator.getServiceName()
                    .getNamespaceURI(), "SessionHeader", this.sessionHeader);   
            this.serviceStub._setProperty(TAAFetchObjectsControllerBindingStub.ENDPOINT_ADDRESS_PROPERTY, this.SESSION_URL);
           
        }
        public TAAFetchObjectsControllerBindingStub getServiceStub() {
            return this.serviceStub;
        }
        public SessionHeader getSessionHeader() {
            return this.sessionHeader;
        }

 

 

 

 

SuperfellSuperfell

Don't do this, you're changing the URL that you're sending your apex request to the partner API.

 

his.serviceStub._setProperty(TAAFetchObjectsControllerBindingStub.ENDPOINT_ADDRESS_PROPERTY, this.SESSION_URL);