Find your content:

Search form

You are here

WSDL not generated, displays blank page. Any ideas?

 
Share

i have created a webservice with two inputs Customer and Product DTOs. I click WSDL link in the Apex Classes page and it does not generates WSDL instead displays blank page. Here is my class,Please note i am using free developer edition.

global class TestWebService {
  webService static String getFirstSOBrief(List<CustomerDTO> c, List<ProductDTO> p)  
    {  
            System.debug('>>>>>>>>>>>>>>>>>>Customer List'+c);
            System.debug('&&&&&&&&&&&&&&&&&&Product List'+p);
            return 'Success';  
    } 

    global class CustomerDTO {
      public String CustomerNumber {get;set;}
      public String Email {get;set;}
      public String FirstName {get;set;}
      public String LastName {get;set;}

      public CustomerDTO(String CustomerNumber,String FirstName, String LastName, String Email) {
        this.CustomerNumber = CustomerNumber;
        this.FirstName = FirstName;
        this.LastName = LastName;
        this.Email = Email;
      }
    }

    global class ProductDTO {
      public String MaterialNumber {get;set;}
      public String ProductName {get;set;}

      public ProductDTO(String MaterialNumber,String ProductName) {
        this.MaterialNumber = MaterialNumber;
        this.ProductName = ProductName;
      }
    }

}

Any idea of why this is happening. Please suggest.

Thanks, Baskaran


Attribution to: Bforce

Possible Suggestion/Solution #1

Should not be a problem.. Maybe it's a browser issue? Try to 'save as' the blank page and open the saved file in a text editor.

For the record: here's the generated APEX in my own sandbox org:

<?xml version="1.0" encoding="UTF-8"?>
<!--
 Web Services API : TestWebService
-->
<definitions targetNamespace="http://soap.sforce.com/schemas/class/TestWebService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.sforce.com/schemas/class/TestWebService">
 <types>
  <xsd:schema elementFormDefault="qualified" targetNamespace="http://soap.sforce.com/schemas/class/TestWebService">
   <xsd:element name="DebuggingInfo">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="debugLog" type="xsd:string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:simpleType name="ID">
    <xsd:restriction base="xsd:string">
     <xsd:length value="18"/>
     <xsd:pattern value="[a-zA-Z0-9]{18}"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="LogCategory">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="Db"/>
     <xsd:enumeration value="Workflow"/>
     <xsd:enumeration value="Validation"/>
     <xsd:enumeration value="Callout"/>
     <xsd:enumeration value="Apex_code"/>
     <xsd:enumeration value="Apex_profiling"/>
     <xsd:enumeration value="Visualforce"/>
     <xsd:enumeration value="System"/>
     <xsd:enumeration value="All"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="LogCategoryLevel">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="Internal"/>
     <xsd:enumeration value="Finest"/>
     <xsd:enumeration value="Finer"/>
     <xsd:enumeration value="Fine"/>
     <xsd:enumeration value="Debug"/>
     <xsd:enumeration value="Info"/>
     <xsd:enumeration value="Warn"/>
     <xsd:enumeration value="Error"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:complexType name="LogInfo">
    <xsd:sequence>
     <xsd:element name="category" type="tns:LogCategory"/>
     <xsd:element name="level" type="tns:LogCategoryLevel"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:simpleType name="LogType">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="None"/>
     <xsd:enumeration value="Debugonly"/>
     <xsd:enumeration value="Db"/>
     <xsd:enumeration value="Profiling"/>
     <xsd:enumeration value="Callout"/>
     <xsd:enumeration value="Detail"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:element name="DebuggingHeader">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="categories" minOccurs="0" maxOccurs="unbounded" type="tns:LogInfo"/>
      <xsd:element name="debugLevel" type="tns:LogType"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:element name="CallOptions">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="client" type="xsd:string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:element name="SessionHeader">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="sessionId" type="xsd:string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:element name="AllowFieldTruncationHeader">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="allowFieldTruncation" type="xsd:boolean"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:complexType name="CustomerDTO">
    <xsd:sequence/>
   </xsd:complexType>
   <xsd:complexType name="ProductDTO">
    <xsd:sequence/>
   </xsd:complexType>
   <xsd:element name="getFirstSOBrief">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="c" minOccurs="0" maxOccurs="unbounded" type="tns:CustomerDTO" nillable="true"/>
      <xsd:element name="p" minOccurs="0" maxOccurs="unbounded" type="tns:ProductDTO" nillable="true"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:element name="getFirstSOBriefResponse">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="result" type="xsd:string" nillable="true"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
  </xsd:schema>
 </types>
 <!-- Message for the header parts -->
 <message name="Header">
  <part name="AllowFieldTruncationHeader" element="tns:AllowFieldTruncationHeader"/>
  <part name="CallOptions" element="tns:CallOptions"/>
  <part name="DebuggingHeader" element="tns:DebuggingHeader"/>
  <part name="DebuggingInfo" element="tns:DebuggingInfo"/>
  <part name="SessionHeader" element="tns:SessionHeader"/>
 </message>
 <!-- Operation Messages -->
 <message name="getFirstSOBriefRequest">
  <part element="tns:getFirstSOBrief" name="parameters"/>
 </message>
 <message name="getFirstSOBriefResponse">
  <part element="tns:getFirstSOBriefResponse" name="parameters"/>
 </message>
 <portType name="TestWebServicePortType">
  <operation name="getFirstSOBrief">
   <input message="tns:getFirstSOBriefRequest"/>
   <output message="tns:getFirstSOBriefResponse"/>
  </operation>
 </portType>
 <binding name="TestWebServiceBinding" type="tns:TestWebServicePortType">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="getFirstSOBrief">
   <soap:operation soapAction=""/>
   <input>
    <soap:header use="literal" part="SessionHeader" message="tns:Header"/>
    <soap:header use="literal" part="CallOptions" message="tns:Header"/>
    <soap:header use="literal" part="DebuggingHeader" message="tns:Header"/>
    <soap:header use="literal" part="AllowFieldTruncationHeader" message="tns:Header"/>
    <soap:body use="literal" parts="parameters"/>
   </input>
   <output>
    <soap:header use="literal" part="DebuggingInfo" message="tns:Header"/>
    <soap:body use="literal"/>
   </output>
  </operation>
 </binding>
 <service name="TestWebServiceService">
  <documentation/>
  <port binding="tns:TestWebServiceBinding" name="TestWebService">
   <soap:address location="https://cs14.salesforce.com/services/Soap/class/TestWebService"/>
  </port>
 </service>
</definitions>

Attribution to: Guy Clairbois
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30272

My Block Status

My Block Content