ESB provides Invalid WSDL (sample 150)

thygesen's picture
I setup sample 150: Introduction to proxy services Opened the wsdl from http://localhost:8280/soap/StockQuoteProxy?wsdl in Altova XmlSpy. Xmlspy automatically validated the wsdl. This is the error message: File http://localhost:8280/soap/StockQuoteProxy?wsdl is not valid. Attribute ‘part’ in extensibility element ‘’ refers to part ‘getQuote’ wich could not be found in message ‘getQuoteMessage’ I also tried to have Visual Studio 2008 generate a proxy client class for the service. (kind a like wsdl2java but this is for C#). It also gave me errors and could not generate class from the wsdl. Custom tool warning: Cannot import wsdl:port Detail: The '/' character, hexadecimal value 0x2F, cannot be included in a name. Parameter name: name XPath to Error Source: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:service[@name='StockQuoteProxy']/wsdl:port[@name='StockQuoteProxyAdmin/httpsSoap11Endpoint'] Detail: The '/' character, hexadecimal value 0x2F, cannot be included in a name. Parameter name: name XPath to Error Source: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:service[@name='StockQuoteProxy']/wsdl:port[@name='StockQuoteProxyAdmin/httpsSoap12Endpoint'] Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:binding[@name='StockQuoteProxyHttpBinding'] Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:binding[@name='StockQuoteProxyHttpBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:service[@name='StockQuoteProxy']/wsdl:port[@name='StockQuoteProxyHttpEndpoint'] Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:binding[@name='StockQuoteProxyHttpBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://services.samples']/wsdl:service[@name='StockQuoteProxy']/wsdl:port[@name='StockQuoteProxyHttpsEndpoint'] This is very annoying.. brgds Peter Thygesen
asankha's picture

Hi Peter I think the problem

Hi Peter I think the problem resulted in us shipping a slightly outdated WSDL with the sample.. To workaround this, first you can make the sample service (i.e. SimpleStockQuoteService) generate its own WSDL correctly (by deleting the line that reads as ".. copy file="wsdl/SimpleStockQuoteService.wsdl..." from the build.xml file at samples/axis2Server/src/SimpleStockQuoteService and re-run ant from there to build the service again) Now, update your sample configuration 150 to use the WSDL from http://localhost:9000/soap/SimpleStockQuoteService?WSDL instead of the one we've shipped on the file system This should work correctly for now, and would be corrected in the next release asankha http://esbmagic.blogspot.com
indika's picture

Re: ESB provides Invalid WSDL (sample 150)

Hi I have validated ‘wsdl’ using [1] and [2]. Those tools successfully loaded wsdl and showed operations, port, etc...   BTW, it seems ports generated for the ESB admin console https binding contains a ‘/’ character inside its name attribute and It may cause the code generation failure.   <wsdl:port name="StockQuoteProxyAdmin/httpsSoap12Endpoint"                  binding="axis2:StockQuoteProxySoap12Binding">   BTW, there is an option in proxy service configuration that force to use  the given original WSDL <proxy> …. <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> ….. <parameter name="useOriginalwsdl">true</parameter>   </proxy>   In this case,'?wsdl' will be the wsdl given by the ‘publishWSDL’ , here it is ‘sample_proxy_1.wsdl’.   Thanks Indika     [1] http://www.validwsdl.com/ [2] http://www.xmethods.net        
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)