5

Was somebody able to access the new tooling API via the force.com Webservice Connector (WSC) or Axis? The code generation seemed to work fine for both of these stacks and I was also able to login and get a session. However when I try to call describeGlobal an INVALID SESSION ID exception is being thrown (same behavior both stacks). I activated the WSC's tracing and noticed that the session header is obviously missing in describeGlobal call and also the auto-generated classes indicate that the session header is not being added to the soap messages. So I would assume that either I made a stupid mistake or there's a bug in the tooling API wsdl which seems unlikely. Any ideas?

5

There appears to be some bugs in the Tooling API WSDL.

The main one being that some of the operations described within it are missing the necessary declarations to tell such tools to pass the SessionHeader (containing the session id).

I used the JAX-WS tool in my Maven project to get things generated, the steps are described here. You can also find the WSDL I edited here as well, compare it with the one downloaded from Salesforce first though. You should be able to use this with your tools and get the correct code generated.

For example, "create" is fine...

<operation name="create">
    <soap:operation soapAction=""/>
    <input>
       <soap:header use="literal" part="SessionHeader" message="tns:Header"/>
       <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
       <soap:body use="literal"/>
    </output>
</operation>

However 'describeGlobal' is not...

<operation name="describeGlobal">
    <soap:operation soapAction=""/>
    <input>
        <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
        <soap:body use="literal"/>
    </output>
</operation>

I had to fix this manually (see above WSDL in my Tooling API project). I did report this at the time during the pilot, I'll raise a support case now it seems to still be the case.

  • great answer thanks! i will try this, i already suspected something like this. not exactly what i would expect from an api that's generally available... – h9nry Apr 3 '13 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.