You need to sign in to do that
Don't have an account?
No operation available for request {http://soap.sforce.com/2006/04/metadata} ...
I am trying to get the sample code here working.
The section in the source code that says...
/* Once the client application has logged in successfully, we use * the results of the login call to reset the endpoint of the service * to the virtual server instance that is servicing your organization. * To do this, the client application sets the ENDPOINT_ADDRESS_PROPERTY * of the binding object using the URL returned from the LoginResult. We * use the metadata binding from this point forward as we are invoking * calls in the metadata WSDL. */ metadataConnection = new MetadataConnection(config); /* metadataConnection._setProperty(MetadataBindingStub.ENDPOINT_ADDRESS_PROPERTY, loginResult.getMetadataServerUrl()); */
Doesn't seem to be correct. From the error "No operation available for request {http://soap.sforce.com/2006/04/metadata} retrieve" I've found that none of the operations associated with a MetadataConnection work. And I found that because the bottom part of the code above is commented out, the ServiceEndpoint for the MetadataConnection is the same as the ServiceEndpoint of the Connection (used for synchronous stuff). I'm guessing this is incorrect. It seems that the two endpoints should be different, but according to the sample code listed on salesforce's website, they are the same.
If I try to uncomment the above code, it throws errors because MetadataBindingStub is not found (presumably it should be in the jars generated from the WSDLs for which I used WSC). Other articles talk about setting the metadata service endpoint from a field on the LoginResult of the same name, but perhaps that is from older versions of the API, or another jar from WSDL generator? Would using the JAX-WS instead of WSC solve this? I'm lost here.
What is an example of the ServiceEndpoint value of a MetadataConnection?
Hmmm, yeah, that's a weird mix of wsc & axis, I'll log a bug to get that fixed.
Here's working sample that does login & then describeMetadata