You need to sign in to do that
Don't have an account?
Please help me!!wsdl2apex -- Unable to find schema for element
I am getting this error while creating apex from WSDL.
Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string
this is my wsdl(from axis2 web service), someone help me?
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/isms/" targetNamespace="http://www.example.org/isms/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema targetNamespace="http://www.example.org/isms/">
<s:element name="isms">
<s:complexType>
<s:sequence>
<s:element name="in" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ismsResponse" type="s:string" />
<s:element name="ismsRequest" type="s:string" />
</s:schema>
</wsdl:types>
<wsdl:message name="ismsRequest">
<wsdl:part name="parameters" element="tns:ismsRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ismsResponse">
<wsdl:part name="parameters" element="tns:ismsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="isms">
<wsdl:operation name="isms">
<wsdl:input message="tns:ismsRequest">
</wsdl:input>
<wsdl:output message="tns:ismsResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ismsSOAP" type="tns:isms">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="isms">
<soap:operation soapAction="http://www.example.org/isms/isms"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="isms">
<wsdl:port name="ismsSOAP" binding="tns:ismsSOAP">
<soap:address location="http://172.168.2.235:8080/axis2/services/isms/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
China.Leaf,
I just went down this journey recently, and yes there are lots of "clean up" items.
I have done a large post on the subject. Please review and comment on as appropriate.
1. WSDL - I would highly suggest using a WSDL/XML tool like Atlova XMLSpy (free trial) to examine the Types that are imported. It will allow you to trim down, and integrate the imported (manually - wish they had a merge - going to post that feature request at Atlova) xsd types, etc. I normally work with Visual Studio or Eclipse and they just couldn't get there. It will show you what is in the namespace and what is imported in the WDSL tab visually by color coding.
a. WSDL Apex Class creation Limitations
-No multipe bindings (which most do 1 and 12)
2. Be prepared to spend some time (read as parse, fix error, rise and repeat) many times
3. Best SF reference I found was Link:
4. In the end, you may find to get it working that the HTTP request and manual soap xml codeup to be the quickest solution to get it running, Twitter and Facebook integrations work this way. It was really faster in the end for me.
Best Regards,
Web: http://www.grigsbyconsultingllc.com
Hmm, I found your post and I got the same error. I think I found the reason, and I posted it to here:
http://community.salesforce.com/sforce/board/message?board.id=apex&thread.id=20892
You used <wsdl:input message="tns:ismsRequest"> and tns:ismsRequest is actually just a xsd:string.
It seems that the WSDL2APEX doesn't support simple type (?) request/response.
If you wrap it with complexType like your isms element, it will accept your WSDL.
Now I remember I had the same problem before, but that was my WSDL so I can change the option of Java2WSDL to wrap the request/response.
ThomasTT
// please help me , I am getting error of Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.myutiitsl.com/PAN_WebService/services/PANWebService_doc" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://www.myutiitsl.com/PAN_WebService/services/PANWebService_doc" xmlns:intf="http://www.myutiitsl.com/PAN_WebService/services/PANWebService_doc" xmlns:tns1="http://panws.utiitsl.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://panws.utiitsl.org" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="uname" type="xsd:string"/>
<element name="password" type="xsd:string"/>
<element name="pan" type="xsd:string"/>
</schema>
<schema elementFormDefault="qualified" targetNamespace="http://www.myutiitsl.com/PAN_WebService/services/PANWebService_doc" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getPanDetailsReturn" type="xsd:string"/>
</schema>
</wsdl:types>
<wsdl:message name="getPanDetailsRequest">
<wsdl:part element="tns1:uname" name="uname"/>
<wsdl:part element="tns1:password" name="password"/>
<wsdl:part element="tns1:pan" name="pan"/>
</wsdl:message>
<wsdl:message name="getPanDetailsResponse">
<wsdl:part element="impl:getPanDetailsReturn" name="getPanDetailsReturn"/>
</wsdl:message>
<wsdl:portType name="PANWebService">
<wsdl:operation name="getPanDetails" parameterOrder="uname password pan">
<wsdl:input message="impl:getPanDetailsRequest" name="getPanDetailsRequest"/>
<wsdl:output message="impl:getPanDetailsResponse" name="getPanDetailsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PANWebService_docSoapBinding" type="impl:PANWebService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getPanDetails">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getPanDetailsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getPanDetailsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PANWebServiceService">
<wsdl:port binding="impl:PANWebService_docSoapBinding" name="PANWebService_doc">
<wsdlsoap:address location="http://www.myutiitsl.com/PAN_WebService/services/PANWebService_doc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Hi,
can you please provide me the solution for this.
could any one of you help me to solve the same issue..
When I am trying to parse the WSDL that time giving error like..
Apex Generation Failed
Unable to find schema for element; {http://xml.apache.org/xml-soap}Document
Thanks In advance,
Ashish J
Error: Failed to parse wsdl: Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}schema
Unable to find element for {http://www.avectra.com/2005/}string
Here my code:
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.avectra.com/2005/"
targetNamespace="http://www.avectra.com/2005/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!-- Above, the schema targetNamespace maps to the Apex class name. -->
<!-- Below, the type definitions for the parameters are listed.
Each complexType and simpleType parameteris mapped to an Apex class inside the parent class for the WSDL. Then, each element in the complexType is mapped to a public field inside the class. -->
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://www.avectra.com/2005/">
<s:element name="Authenticate">
<s:complexType>
<s:sequence>
<s:element name="userName" type="s:string" maxOccurs="1" minOccurs="1" nillable="true"/>
<s:element name="password" type="s:string" maxOccurs="1" minOccurs="1" nillable="true"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthenticateResponse">
<s:complexType>
<s:sequence>
<s:element name="AuthenticateResult" type="s:string" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<!--The stub below defines operations. -->
<wsdl:message name="AuthenticateSoapIn">
<wsdl:part name="userName" type="s:string" />
<wsdl:part name="password" type="s:string" />
</wsdl:message>
<wsdl:message name="AuthenticateSoapOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:portType name="netForumXMLSoap">
<wsdl:operation name="Authenticate">
<wsdl:input message="tns:AuthenticateSoapIn" />
<wsdl:output message="tns:AuthenticateSoapOut" />
</wsdl:operation>
</wsdl:portType>
<!--The code below defines how the types map to SOAP. -->
<wsdl:binding name="netForumXMLSoap" type="tns:netForumXMLSoap">
<wsdl:operation name="Authenticate">
<soap:operation soapAction="http://www.avectra.com/2005/Authenticate" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!-- Finserally, the code below defines the endpoint, which maps to the endpoint in the class -->
<wsdl:service name="netForumXML">
<wsdl:port name="netForumXMLSoap" binding="tns:netForumXMLSoap">
<soap:address location="https://my.i-car.com/xWeb/secure/netForumXML.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>