+ Start a Discussion
aksmaksm 

Apex generation from WSDL failed for Fedex shipping WSDL

Hi,
 
I am a new bee to Apex development.
I am trying to generate Apex class from Fedex shipping WSDL file.
 
After parsing the file, I tried to generate the Apex class but I was getting the following error,
 
Apex generation failed.
Error message:
Error: Unsupported WSDL. Operation 'deleteShipment' has more than one output element.
 
How do I generate the Apex class?
 
please throw some light on it.
 
thanks
sk
Ron WildRon Wild
I'm having the same problem with more than one FedEx WSDL file:

Error: Unsupported WSDL. Operation 'track' has more than one output element.

Here's the offending portion of the WSDL.   Can this be modified to work with the Salesforce WSDL parser?

Code:
 <portType name="TrackPortType">
  <documentation>This element describes the web service, the operations performed and the messages involved in the operation.</documentation>
  <operation name="track" parameterOrder="TrackRequest">
   <input message="ns:TrackRequest"/>
   <output message="ns:TrackReply"/>
  </operation>
  <operation name="getTrackNotification" parameterOrder="TrackNotificationRequest">
   <input message="ns:TrackNotificationRequest"/>
   <output message="ns:TrackNotificationReply"/>
  </operation>
  <operation name="getSignatureProofOfDelivery" parameterOrder="SignatureProofOfDeliveryRequest">
   <input message="ns:SignatureProofOfDeliveryRequest"/>
   <output message="ns:SignatureProofOfDeliveryReply"/>
  </operation>
 </portType>
 <binding name="TrackServiceSoapBinding" type="ns:TrackPortType">
  <s1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="track">
   <s1:operation soapAction="track" style="document"/>
   <input>
    <s1:body use="literal"/>
   </input>
   <output>
    <s1:body use="literal"/>
   </output>
  </operation>
  <operation name="getTrackNotification">
   <s1:operation soapAction="getTrackNotification" style="document"/>
   <input>
    <s1:body use="literal"/>
   </input>
   <output>
    <s1:body use="literal"/>
   </output>
  </operation>
  <operation name="getSignatureProofOfDelivery">
   <s1:operation soapAction="getSignatureProofOfDelivery" style="document"/>
   <input>
    <s1:body use="literal"/>
   </input>
   <output>
    <s1:body use="literal"/>
   </output>
  </operation>
 </binding>

 

James_AdapxJames_Adapx
Did you guys get these issues solved? I am having an issue generating the rate wsdl for FEDEX. It gives me this error:


Error: Unsupported schema type: {http://www.w3.org/2001/XMLSchema}nonNegativeInteger


Message Edited by James_Adapx on 01-20-2009 04:10 PM
Ron WildRon Wild
No, no luck yet.  It would be nice if Salesforce could provide a feature to assist in adapting unparseable WSDLs for import ... possibly suggesting modifications that might still work with the webservice, or allowing the developer to decide whether or not to skip methods and data elements that might not be required for an implementation.
James_AdapxJames_Adapx
Yeah that would be good. The only work around I found is creating a simple webservice that we host and import into salesforce that communicates to the webservice we cant import.
jwolfjwolf
I'm having the exact same problem with a similar WSDL file. Did you ever get this figured out? Thanks.
James_AdapxJames_Adapx
Only by using a proxy webservice... Salesforce has limitations on webservices like not supporting multiple ports. Most of these commercial webservices have multiple ports. 
paul-lmipaul-lmi
doesn't seem like Salesforce supports parsing a WSDL from any IIS powered/generated webservice.  I've tried 3 different ones, and hit the same roadblocks on all of them.
James_AdapxJames_Adapx
Try making a simple webservice in visual studio, by default it will put in two ports and two bindings. Remove one of each, i removed soap12... It should work then.
paul-lmipaul-lmi

Yeah, I caught that part, but then I get stuck again with outputs.

 

https://beta.logmeinrescue.com/api/api.asmx?wsdl

osamanosaman

Can you give me the link for Fedex WSDL? Icouldnt find it.

 

Thanks

 

SimbaSimba

Can you please explain this in more detail. I am not so much familiar with the Visual Studio or working around with WSDL. Also, what do you mean by remove one of each?

 

Thanks

 

 

TheCustomCloudTheCustomCloud

I am having this same issue.  Has anyone found resolution to this?

 

SFDC support can you please give your 2 cents?

osamanosaman

go to My Blog and there you can find another way to integrate web service in APEX. I was facing many issued using WSDL. I found a new way which is mentioned on the link.

 

Thanks

James_AdapxJames_Adapx

 

Add ?WSDL in the browser at the end of the url so you can see the code.http://localhost:59634/WebSite4/Service.asmx?WSDL copy the code to a text editor, note pad is fine. The remove the binding and port for Soap12 which is in blue below. Then save the file as a .WSDL and import it into salesforce. I remove some of the code just to get it to fit the 20,000 character limit here but it wasnt important.. - <wsdl:portType name="ServiceSoap">- <wsdl:operation name="HelloWorld"> <wsdl:input message="tns:HelloWorldSoapIn" /> <wsdl:output message="tns:HelloWorldSoapOut" /> </wsdl:operation> </wsdl:portType>- <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />- <wsdl:operation name="HelloWorld"> <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />- <wsdl:input> <soap:body use="literal" /> </wsdl:input>- <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>- <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />- <wsdl:operation name="HelloWorld"> <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />- <wsdl:input> <soap12:body use="literal" /> </wsdl:input>- <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>- <wsdl:service name="Service">- <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> <soap:address location="http://localhost:59634/WebSite4/Service.asmx" /> </wsdl:port>- <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> <soap12:address location="http://localhost:59634/WebSite4/Service.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>

 


 

James_AdapxJames_Adapx

 Sorry, the code insert messed things up abit. Havent been here in awhile, here are the instructions.

 

Add ?WSDL in the browser at the end of the url so you can see the code.

http://localhost:59634/WebSite4/Service.asmx?WSDL

copy the code to a text editor, note pad is fine.

Then remove the binding and port for Soap12 which is in blue below. Then save the file as a .WSDL and import it into salesforce. I remove some of the code just to get it to fit the 20,000 character limit here but it wasnt important..

 

<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="HelloWorld">
  <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="HelloWorld">
  <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="Service">
- <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
  <soap:address location="http://localhost:59634/WebSite4/Service.asmx" />
  </wsdl:port>
- <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
  <soap12:address location="http://localhost:59634/WebSite4/Service.asmx" />
  </wsdl:port>
  </wsdl:service>

  </wsdl:definitions> 

 


Ron WildRon Wild
Again, that's the solution to the multiple ports problem, but does not address the multiple outputs problem.
James_AdapxJames_Adapx
It was the answer to the question I was responding to...
WilmerWilmer

Hi everyone,

 

I'm experiencing the same issue, does someone have the solution to this problem?

 

I found this blog (seems like this guy found the real problem):

http://patf.net/blogs/index.php?blog=2&title=salesforcesoa_operation_create_has_more_&more=1&c=1&tb=1&pb=1

 

Regards,

 

Wilmer

WilmerWilmer
PrasenPrasen

Hi,

 

I want to generate a webservice that can be consumed by Apps generated by the same salesforce instance and I will be able to transfer data from the main instance to the apps installed. Can somebody please help me how can it be done?

 

Regards

 

Prasenjit