+ Start a Discussion
Daniel BallingerDaniel Ballinger 

Salesforce generated WSDL for Apex webservice missing address complex type

The WSDL generated for an Apex Class method using the webservice keyword may be missing required complex types.

Take the example:
global class RetrieveOpportunity {
  webservice static Opportunity retrieveOpportunity(Id opportunityId) {
    return new Opportunity();
  }
}

This will generate a WSDL with elements like:
 
<xsd:element name="BillingAddress" minOccurs="0" type="tns:address" nillable="true"/>

The issue is that there is no address complex type in the WSDL tns namespace (http://soap.sforce.com/schemas/class/DFB/RetrieveOpportunity in this case).

This results in errors like:
Error: type 'address@http://soap.sforce.com/schemas/class/RetrieveOpportunity' not found.
Source - WSDL generated from apex can't import to SoapUI (http://salesforce.stackexchange.com/q/56005/102)
and
Error 1 Unable to import binding 'getLeadInfoBinding' from namespace 'http://soap.sforce.com/schemas/class/getLeadInfo'. App_WebReferences/WebReference/

Source - Issue with Adding reference Webservice WSDL to VS2010 (http://salesforce.stackexchange.com/q/53329/102)

The currently solution is to manually add the missing complex types to the xsd:schema with the required targetNamespace.
 
<!-- Compound datatype: Address -->
        <complexType name="address">
            <complexContent>
                <extension base="tns:location">
                    <sequence>
                        <element name="city" type="xsd:string"  nillable="true" />
                        <element name="country" type="xsd:string"  nillable="true" />
                        <element name="countryCode" type="xsd:string"  nillable="true" />
                        <element name="postalCode" type="xsd:string"  nillable="true" />
                        <element name="state" type="xsd:string"  nillable="true" />
                        <element name="stateCode" type="xsd:string"  nillable="true" />
                        <element name="street" type="xsd:string"  nillable="true" />
                    </sequence>
                </extension>
            </complexContent>
        </complexType>

<!-- Compound datatype: Location -->
        <complexType name="location">
            <sequence>
                <element name="latitude" type="xsd:double"  nillable="true" />
                <element name="longitude" type="xsd:double"  nillable="true" />
            </sequence>
        </complexType>

Can this be raised as an Apex API bug?
Best Answer chosen by Daniel Ballinger
ShashankShashank (Salesforce Developers) 
Hi Daniel,

This has already been published as a known issue and can be tracked here: https://success.salesforce.com/issues_view?id=a1p300000008XKUAA2

All Answers

ShashankShashank (Salesforce Developers) 
Hi Daniel,

This has already been published as a known issue and can be tracked here: https://success.salesforce.com/issues_view?id=a1p300000008XKUAA2
This was selected as the best answer
rima khanrima khan

Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”. On right hand side, you will find button named as “Generate from WSDL”. This button will generate equivalent Apex class to support Webservice call. In some Programming languages, these classes are known as Proxy classes or Stubs.
 
rima khanrima khan

Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”. On right hand side, you will find button named as “Generate from WSDL”. This button will generate equivalent Apex class to support Webservice call. In some Programming languages, these classes are known as Proxy classes or Stubs.


my issue has been solved!!!

_______________________
CCleaner (https://downloader.vip/ccleaner/) Happy Wheels (https://www.happywheels.vip/) VLC (https://vlc.onl/)

james litejames lite
Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”. On right hand side, you will find button named as “Generate from WSDL”. This button will generate equivalent Apex class to support Webservice call. In some Programming languages, these classes are known as Proxy classes or Stubs.
walmartone login (https://www.tutorialsweb.org/2019/02/walmart-one-login.html" target="_blank)
Tunis TechTunis Tech
Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”. On right hand side, you will find button named as “Generate from WSDL”. This button will generate equivalent Apex class to support Webservice call. In some Programming languages, these classes are known as Proxy classes or Stubs.
international schools in lagos- https://www.greenspringsschool.com winning eleven 2012 warkop android- https://www.techrabytes.com/konami-winning-eleven-2012-warkop-android-game-full-version-apk-install/ (https://www.techrabytes.com/konami-winning-eleven-2012-warkop-android-game-full-version-apk-install/)special schools in lagos state- https://anthoshouse.org/
Maryr WilsonMaryr Wilson
Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”.
https://mobdroapp.rocks/
Ray DonovanRay Donovan
Thanks for sharing this fix, I'm glad that my issue is resolved because of you. I run a construction and remodeling company in Irvine and we provide variety of services like Hardwood flooring (http://construlux.com/hardwood-flooring/), remodeling and construction etc. Do check our website and share it with your friend circle, they might be looking for something like this
John constantineJohn constantine
I was searching for this WSDL fix from a very long time, thanks for shating it. Hey i have wrote an blog post about How to refinance you car (https://www.carpaymenthelper.com/how-to-refinance-your-car/) please do check it out and share it with others maybe it will be helpful for someone in need
Flipkart OffersFlipkart Offers
<a href=https://www.flipkart.com/?affid=crishkuma1">
Flipkart SBI Offer 2019: 10% Instant Cashback.</A><a href-"https://www.flipkart.com/?affid=crishkuma1">flipkart offers</a>
<a href="https://flipkart-cashback-offers-today.blogspot.com">
flipkart axis offers
flipkart sbi offer</a>
Tunis TechTunis Tech
Once, WSDL is downloaded and saved on local drive. We have to go to Salesforce and navigate to “Setup | Develop | Apex Classes”.

camera (http://http://www.finessestudios.com.ng/photographers-in-lagos-nigeria/)
teachers education (https://greenspringstrainingcollege.com/)
jhon mathewjhon mathew
Thanks for providing this useful information Salesforce generated WSDL for Apex web service missing address complex type.

I also work on Airtel Customer Care Number. (https://www.sarkarilover.com/2019/09/airtel-customer-care-number.html)
David DubeDavid Dube
Tata Consultancy Service Limited is a multinational Information Technology organization headquartered in Mumbai, India.webmail TCS (https://webmail-tcs.com/) is one of the group companies of Tata Group owned by TATA sons. It has expanded more than forty-six countries.TCS also into manpower recruitment of both IT and ITES.
John Eric 7John Eric 7
That's quite something special which we got today. Lottery sambad (https://lotterysambadresult.in/) always provide you daily updates which you get easily on a single click.
sumit chowdharysumit chowdhary
Its great to get to read some articles like ,hey i am get digital developer(httwe are developer knock if u want any kind of website,design,logo (https://getdigitaldeveloper.ueniweb.com)ps://getdigitaldeveloper.ueniweb.com)
This is our client blog on gbwhatsapp so gothrough https://gbmoddownload.in u can check it sports ndtv news (https://www.sportsndtv.in) these are some 
Suraj AroraSuraj Arora
Thank you for helping in fixing this issue.
Airtel Prepaid Customer Care Numbers (https://airtelcustomercarenumbers.in/airtel-prepaid-customer-care-numbers/)
ATTA MUHAMMADATTA MUHAMMAD
That's quite interesting and special. Peoples are proudly share their ideas and tips how to win lottery sambad night https://lotterysambadtodays.in and all the games how we win easily
maria lovelymaria lovely
Are You Lokking For A website Where You Can Check All the Lottery Result By Just Win Click Just Visit THis Wbsite And Enjoy https://dailystatelotteries.in/
Pinoy Ako TvsPinoy Ako Tvs
Thanks For Sharing Keep It Up.

Pinoy Lambingan
Pinoy Replay FlixPinoy Replay Flix
Are You Lokking For A website Where You Can Watch Latest Pinoy Flix, Pinoy Tambayan, Pinoy Channel, Pinoy Tv ,Pinoy Lambingan Replay, Pinoy Teleserye Replay, Pinoy Tv Series And Pinoy Ako Online.
pankaj kumar 460pankaj kumar 460
I feel completely satisfied after reading your post,Your posts makes me internally happy and gives me lots of the pleasure.
http://www.ultraomegaburnstore.com/
bioleptin @ http://bioleptinstore.com/
grs ultra @ http://grsultrastore.com/
panalean @ http://panaleanstore.com/
hydralyft @ http://hydralyft.info/





 
nick son 1nick son 1
Nice information and thanks for that. Get more about online surveys here. https://tellthebell.ninja
Subhradip RoySubhradip Roy
Finally I fixed my application Sikkim Lottery Result (https://play.google.com/store/apps/details?id=com.sikkimlottery.result) itz make hetach while
Subhradip RoySubhradip Roy
Also Thanks For Sharing this Information Lottery Sambad (https://www.lotterysambadtoday.site)
ADESANMI FranklynADESANMI Franklyn
This is an exceptional article. I love it to the marrow. 
Appvalley (https://appvalley.net)
Survey Clue (https://surveyclue.com)
Tiktok App (https://tiktok.zone)
ExpressVPN free trial (https://vpntrialcode.com/express-vpn-free-trial-30-days/)