DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8626>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8626

WSDL2Java does not work for a .Net service WSDL

           Summary: WSDL2Java does not work for a .Net service WSDL
           Product: Axis
           Version: beta-1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Basic Architecture
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I created a simple .Net Web Service and tested itr. It works fine with .Net 
client.
I tried to create an axis client using WSDL2Java and I immediately get the 
error below. I am including also the wsdl file. Please look at it and respond 
quickly
Also, for my own clarifications:
1- If I am creating only a java/axis client, do I need the skeleton for 
anything? 
2-If this works like RMI stub/skeleton, why does any one needs the skeleton 
for? You use WSDL2Java when you already have a Service and its WSDL file. 
Right? 

Error Message
==============
D:\jakarta-tomcat-4.0.3\webapps\axis\WEB-INF\classes\samples\userguide\example7w
s2j>java org.apache.axis.wsdl.WSDL2Java -v Service1.wsdl
Parsing XML file:  Service1.wsdl
- Exception:
org.xml.sax.SAXException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:218)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
java:224)
        at org.apache.axis.utils.XMLUtils.newDocument(Unknown Source)
        at org.apache.axis.utils.XMLUtils.newDocument(Unknown Source)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:536)
java.lang.NullPointerException
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:1337)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Unknown Source)
        at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:536)


wsdl file: Service1.wsdl
==========================
<?xml version="1.0" encoding="utf-8" ?> 
- <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:s0="http://Walkthrough/XmlWebServices/"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
targetNamespace="http://Walkthrough/XmlWebServices/"; 
xmlns="http://schemas.xmlsoap.org/wsdl/";> 
- <types> 
- <s:schema elementFormDefault="qualified" 
targetNamespace="http://Walkthrough/XmlWebServices/";> 
- <s:element name="ConvertTemperature"> 
- <s:complexType> 
- <s:sequence> 
<s:element minOccurs="1" maxOccurs="1" name="dFahrenheit" type="s:double" /> 
</s:sequence> 
</s:complexType> 
</s:element> 
- <s:element name="ConvertTemperatureResponse"> 
- <s:complexType> 
- <s:sequence> 
<s:element minOccurs="1" maxOccurs="1" name="ConvertTemperatureResult" 
type="s:double" /> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:element name="double" type="s:double" /> 
</s:schema> 
</types> 
- <message name="ConvertTemperatureSoapIn"> 
<part name="parameters" element="s0:ConvertTemperature" /> 
</message> 
- <message name="ConvertTemperatureSoapOut"> 
<part name="parameters" element="s0:ConvertTemperatureResponse" /> 
</message> 
- <message name="ConvertTemperatureHttpGetIn"> 
<part name="dFahrenheit" type="s:string" /> 
</message> 
- <message name="ConvertTemperatureHttpGetOut"> 
<part name="Body" element="s0:double" /> 
</message> 
- <message name="ConvertTemperatureHttpPostIn"> 
<part name="dFahrenheit" type="s:string" /> 
</message> 
- <message name="ConvertTemperatureHttpPostOut"> 
<part name="Body" element="s0:double" /> 
</message> 
- <portType name="Service1Soap"> 
- <operation name="ConvertTemperature"> 
<documentation>This method converts a temperature in degrees Fahrenheit to a 
temperature in degrees Celsius.</documentation> 
<input message="s0:ConvertTemperatureSoapIn" /> 
<output message="s0:ConvertTemperatureSoapOut" /> 
</operation> 
</portType> 
- <portType name="Service1HttpGet"> 
- <operation name="ConvertTemperature"> 
<documentation>This method converts a temperature in degrees Fahrenheit to a 
temperature in degrees Celsius.</documentation> 
<input message="s0:ConvertTemperatureHttpGetIn" /> 
<output message="s0:ConvertTemperatureHttpGetOut" /> 
</operation> 
</portType> 
- <portType name="Service1HttpPost"> 
- <operation name="ConvertTemperature"> 
<documentation>This method converts a temperature in degrees Fahrenheit to a 
temperature in degrees Celsius.</documentation> 
<input message="s0:ConvertTemperatureHttpPostIn" /> 
<output message="s0:ConvertTemperatureHttpPostOut" /> 
</operation> 
</portType> 
- <binding name="Service1Soap" type="s0:Service1Soap"> 
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document" /> 
- <operation name="ConvertTemperature"> 
<soap:operation 
soapAction="http://Walkthrough/XmlWebServices/ConvertTemperature"; 
style="document" /> 
- <input> 
<soap:body use="literal" /> 
</input> 
- <output> 
<soap:body use="literal" /> 
</output> 
</operation> 
</binding> 
- <binding name="Service1HttpGet" type="s0:Service1HttpGet"> 
<http:binding verb="GET" /> 
- <operation name="ConvertTemperature"> 
<http:operation location="/ConvertTemperature" /> 
- <input> 
<http:urlEncoded /> 
</input> 
- <output> 
<mime:mimeXml part="Body" /> 
</output> 
</operation> 
</binding> 
- <binding name="Service1HttpPost" type="s0:Service1HttpPost"> 
<http:binding verb="POST" /> 
- <operation name="ConvertTemperature"> 
<http:operation location="/ConvertTemperature" /> 
- <input> 
<mime:content type="application/x-www-form-urlencoded" /> 
</input> 
- <output> 
<mime:mimeXml part="Body" /> 
</output> 
</operation> 
</binding> 
- <service name="Service1"> 
<documentation>A temprature conversion service.</documentation> 
- <port name="Service1Soap" binding="s0:Service1Soap"> 
<soap:address location="http://localhost/TempConvert1/Service1.asmx"; /> 
</port> 
- <port name="Service1HttpGet" binding="s0:Service1HttpGet"> 
<http:address location="http://localhost/TempConvert1/Service1.asmx"; /> 
</port> 
- <port name="Service1HttpPost" binding="s0:Service1HttpPost"> 
<http:address location="http://localhost/TempConvert1/Service1.asmx"; /> 
</port> 
</service> 
</definitions>

Reply via email to