Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Wtp-wst-dev] Using WSDL.validation programatically - Need help


Hi Keith,

Sorry for the delayed response to your question. I've updated the wiki entry you referred to [1] with more information that should answer your questions. Specifically, I added information as to why the validator always returns that your document is valid, why you're getting compilation errors and what properties can be set on the WSDLValidationConfiguration.

Let me know if you have any more questions.

[1] http://wiki.eclipse.org/index.php/Using_the_WSDL_Validator_Outside_of_Eclipse

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@xxxxxxxxxx



"keith chapman" <keith.chapman@xxxxxxxxxxxxx>
Sent by: wtp-wst-dev-bounces@xxxxxxxxxxx

09/04/2006 04:50 AM

Please respond to
"Web Standard Tools developer discussions." <wtp-wst-dev@xxxxxxxxxxx>

To
wtp-wst-dev@xxxxxxxxxxx
cc
Subject
[Wtp-wst-dev] Using WSDL.validation programatically - Need help





Hi,

What are the properties that can be set in WSDLValidationConfiguration. I want to use the org.eclipse.wst.wsdl.validation jar programatically.

Also I took a checkout of org.eclipse.wst.wsdl.validation from CVS. It does not compile. It cannot import org.eclipse.core.runtime.FileLocator. I checked the org.eclipse.core thats in my class path as well.

Any help will be most appretiated.

I tried using the WSDL.validation jar as the site
http://wiki.eclipse.org/index.php/Using_the_WSDL_Validator_Outside_of_Eclipse explains.

When i fed in the following valid WSDL as an argument it says that the WSDL is valid

<wsdl:definitions xmlns:axis2="
http://ws.apache.org/axis2 " xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                 xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/ " xmlns:ns0="http://axisversion.sample/xsd"
                 xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/ " xmlns:ns1="http://org.apache.axis2/xsd"
                 xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
                 xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace=" http://ws.apache.org/axis2">
   <wsdl:documentation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
       This service is to get the running Axis version
   </wsdl:documentation>
   <wsdl:types xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
       <xs:schema xmlns:stn_1="
http://axisversion.sample/xsd" xmlns:axis2="http://ws.apache.org/axis2"
                  xmlns:xs="
http://www.w3.org/2001/XMLSchema " xmlns:ns0="http://axisversion.sample/xsd"
                  xmlns:ns1="
http://org.apache.axis2/xsd" attributeFormDefault="qualified"
                  elementFormDefault="qualified" targetNamespace="
http://axisversion.sample/xsd">
           <xs:element name="getVersionResponse">
               <xs:complexType>
                   <xs:sequence>
                       <xs:element name="return" type="xs:string"/>
                   </xs:sequence>
               </xs:complexType>
           </xs:element>
       </xs:schema>
   </wsdl:types>
   <wsdl:message xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="getVersionMessage"/>
   <wsdl:message xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersionResponse">
       <wsdl:part xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="part1" element="ns0:getVersionResponse"/>
   </wsdl:message>
   <wsdl:portType xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionPortType">
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <wsdl:input xmlns:wsaw="
http://www.w3.org/2006/05/addressing/wsdl"
                       xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" message="axis2:getVersionMessage"
                       wsaw:Action=""
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" message="axis2:getVersionResponse"/>
       </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP11Binding"
                 type="axis2:versionPortType">
       <soap:binding xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
                     transport="
http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <soap:operation xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:getVersion"
                           style="document"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap:body xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ ">
               <soap:body xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP12Binding"
                 type="axis2:versionPortType">
       <soap12:binding xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
                       transport="
http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="getVersion">
           <soap12:operation xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" soapAction="urn:getVersion"
                             style="document"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap12:body xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" use="literal"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap12:body xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" use="literal"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="versionHttpBinding" type="axis2:versionPortType">
       <http:binding xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" verb="POST"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <http:operation xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" location="getVersion"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <mime:content xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" type="text/xml"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <mime:content xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/ " type="text/xml"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:service xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="version">
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP11port_http"
                  binding="axis2:versionSOAP11Binding">
           <soap:address xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
                         location="
http://localhost:8080/axis2/services/version"/>
       </wsdl:port>
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP12port_http"
                  binding="axis2:versionSOAP12Binding">
           <soap12:address xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
                           location="
http://localhost:8080/axis2/services/version "/>
       </wsdl:port>
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionHttpport0"
                  binding="axis2:versionHttpBinding">
           <http:address xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"
                         location="
http://localhost:8080/axis2/rest/version"/>
       </wsdl:port>
   </wsdl:service>
</wsdl:definitions>



But when i commented a message which is referenced by an operation still it says that the WSDL is valid

<wsdl:definitions xmlns:axis2="
http://ws.apache.org/axis2" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/ "
                 xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://axisversion.sample/xsd "
                 xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd "
                 xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/ "
                 xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.apache.org/axis2 ">
   <wsdl:documentation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
       This service is to get the running Axis version
   </wsdl:documentation>
   <wsdl:types xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
       <xs:schema xmlns:stn_1="
http://axisversion.sample/xsd " xmlns:axis2="http://ws.apache.org/axis2"
                  xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:ns0=" http://axisversion.sample/xsd"
                  xmlns:ns1="
http://org.apache.axis2/xsd" attributeFormDefault="qualified"
                  elementFormDefault="qualified" targetNamespace="
http://axisversion.sample/xsd">
           <xs:element name="getVersionResponse">
               <xs:complexType>
                   <xs:sequence>
                       <xs:element name="return" type="xs:string"/>
                   </xs:sequence>
               </xs:complexType>
           </xs:element>
       </xs:schema>
   </wsdl:types>
   
   
   <!--<wsdl:message xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersionMessage"/>-->
   
   
   <wsdl:message xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="getVersionResponse">
       <wsdl:part xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="part1" element="ns0:getVersionResponse"/>
   </wsdl:message>
   <wsdl:portType xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionPortType">
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <wsdl:input xmlns:wsaw="
http://www.w3.org/2006/05/addressing/wsdl "
                       xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" message="axis2:getVersionMessage"
                       wsaw:Action=""
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" message="axis2:getVersionResponse"/>
       </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP11Binding"
                 type="axis2:versionPortType">
       <soap:binding xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
                     transport="
http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <soap:operation xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:getVersion"
                           style="document"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap:body xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ ">
               <soap:body xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP12Binding"
                 type="axis2:versionPortType">
       <soap12:binding xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
                       transport="
http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="getVersion">
           <soap12:operation xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" soapAction="urn:getVersion"
                             style="document"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap12:body xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" use="literal"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <soap12:body xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" use="literal"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/ " name="versionHttpBinding" type="axis2:versionPortType">
       <http:binding xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" verb="POST"/>
       <wsdl:operation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="getVersion">
           <http:operation xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" location="getVersion"/>
           <wsdl:input xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <mime:content xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" type="text/xml"/>
           </wsdl:input>
           <wsdl:output xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
               <mime:content xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/ " type="text/xml"/>
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:service xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="version">
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP11port_http"
                  binding="axis2:versionSOAP11Binding">
           <soap:address xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
                         location="
http://localhost:8080/axis2/services/version"/>
       </wsdl:port>
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionSOAP12port_http"
                  binding="axis2:versionSOAP12Binding">
           <soap12:address xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
                           location="
http://localhost:8080/axis2/services/version "/>
       </wsdl:port>
       <wsdl:port xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" name="versionHttpport0"
                  binding="axis2:versionHttpBinding">
           <http:address xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"
                         location="
http://localhost:8080/axis2/rest/version"/>
       </wsdl:port>
   </wsdl:service>
</wsdl:definitions>


How can i validate this? This error is captured by eclipse. How can i validate this programatically?


The jar I used was org.eclipse.wst.wsdl.validation_1.1.0.v200606130645.jar

Thanks,
Keith
_______________________________________________
wtp-wst-dev mailing list
wtp-wst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev


Back to the top