You need to sign in to do that
Don't have an account?
pfarrell
Salesforce SOA output element
I wanted to verify that my findings are accurate. Can I have multiple sequence elements in the object output by my WSDL when generating APEX code? I am working with an existing WSDL and would like to utilize it within Apex. I get the following error when autogenerating Apex code from the WSDL
I tweaked the WSDL until I got it working and found that this error related to the number of elements contained in the sequence of the object type being returned by my WSDL.
Here is the solution I came up with for fixing the WSDL, but the problem remains that SOA appears to have a restriction on how my WSDL can be constructed. I wanted to verify if my findings are accurate.
Unsupported WSDL. Operation '[operation name]' has more than one output element.
I tweaked the WSDL until I got it working and found that this error related to the number of elements contained in the sequence of the object type being returned by my WSDL.
Here is the solution I came up with for fixing the WSDL, but the problem remains that SOA appears to have a restriction on how my WSDL can be constructed. I wanted to verify if my findings are accurate.
BTW, WS-I BP1.1 says that you can only have a single part for doc-lit, but i'm not sure that's what you're saying.
Our WSDL has a multi object output. There is a result object, status, and requestId that are passed back as part of the output. Here are the pertinent parts of the WSDL. Let me know if you need to see the whole WSDL.
The problem element (CreateResponse) contains a sequence of three objects. If I delete the RequestID and OverallStatus elements, from the WSDL, I can autogenerate Apex from the WSDL. However, we have production code dependent on this WSDL, so we can't alter.
Code:
Your Create method returns 3 elements and hence the error. You can wrap
the three elements into a complex type and return it. In this case your WSDL
will look like:
Code:
HTHs,
I was hoping to be able to use my company's WSDL without alteration, but your method is not too bad and I have confirmed that your change allows Apex code generator to work correctly. I'm just going to have to do some testing now :).