There was an error in ur wsdl. The part attribute name in the
definition/binding/operation/input/header doesn't match with the part
name in the message. login against Login
Attached is the corrected wsdl, which works.
Chathura
On 5/24/06, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:
I'm trying to use wsdl2java to create a service, but I'm not having
much success. This is the first time I do this so please bear with me.
I have defined my wsdl and tried 4 different validation tools
(Oxygen, Jdeveloper, WS-I and Clear Cape) just to make sure it
is correct (still not sure though) and conforms to WS-I.
Here is the output I get from wsdl2java:
C:\>wsdl2java -uri createLeasingApplication.wsdl -ss -sd
Using AXIS2_HOME: C:\java\axis2
Using JAVA_HOME: c:\J2EESDK\jdk
log4j:WARN No appenders could be found for logger
(org.apache.axis2.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:94)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: org.apache.axis2.AxisFault: null; nested exception is:
java.lang.NullPointerException
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:243)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:87)
... 2 more
Caused by: java.lang.NullPointerException
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.copyExtensibleElements(WSDL2AxisServiceBuilder.java:1095)
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.processBinding(WSDL2AxisServiceBuilder.java:330)
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:238)
... 3 more
I can't really make any sense of this, please help?
WSDL file attached.
Håkon
--
Antares Gruppen AS
Dir.phone: +47 - 23 29 05 75
Mobile: +47 - 911 79 505
http://www.antares.no
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Chathura Herath
http://people.apache.org/~chathura/
http://chathurah.blogspot.com/
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="leasingApplication"
targetNamespace="urn:leasingApplication"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:leasingApplication"
xmlns:tnsTypes="urn:leasingApplication/types"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<types>
<xsd:schema targetNamespace="urn:leasingApplication/types" elementFormDefault="qualified">
<xsd:complexType name="OrderLineData">
<xsd:sequence>
<xsd:element name="lineItemNumber" type="xsd:long"/>
<xsd:element name="productNumber" type="xsd:string" nillable="false"/>
<xsd:element name="productCategory" type="xsd:string" nillable="false"/>
<xsd:element name="numberOfProductsOrdered" type="xsd:string" nillable="false"/>
<xsd:element name="productPrice" type="xsd:string" nillable="false"/>
<xsd:element name="productDescription" type="xsd:string" nillable="false"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="LeasingApplicationData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="partner" type="xsd:string" nillable="false"/>
<xsd:element name="partnerOrderId" type="xsd:string" nillable="false"/>
<xsd:element name="partnerOrderType" type="xsd:string" nillable="false"/>
<xsd:element name="partnerReferencePersonName" type="xsd:string" nillable="true"/>
<xsd:element name="creditApplied" type="xsd:string" nillable="true"/>
<xsd:element name="orderLines" type="tnsTypes:OrderLineData" nillable="false" minOccurs="1"
maxOccurs="unbounded"/>
<xsd:element name="applicationComment" type="xsd:string" nillable="true"/>
<xsd:element name="commonSecret" type="xsd:string" nillable="true"/>
<xsd:element name="organisationNumber" type="xsd:string" nillable="false"/>
<xsd:element name="companyName" type="xsd:string" nillable="false"/>
<xsd:element name="companyAddress1" type="xsd:string" nillable="true"/>
<xsd:element name="companyAddress2" type="xsd:string" nillable="true"/>
<xsd:element name="companyZip" type="xsd:string" nillable="true"/>
<xsd:element name="companyCity" type="xsd:string" nillable="true"/>
<xsd:element name="companyPhone" type="xsd:string" nillable="true"/>
<xsd:element name="companyReference" type="xsd:string" nillable="true"/>
<xsd:element name="applicantPersonName" type="xsd:string" nillable="false"/>
<xsd:element name="applicantPersonEmail" type="xsd:string" nillable="false"/>
<xsd:element name="applicantPersonPhone" type="xsd:string" nillable="true"/>
<xsd:element name="companyDeliveryAddress1" type="xsd:string" nillable="true"/>
<xsd:element name="companyDeliveryAddress2" type="xsd:string" nillable="true"/>
<xsd:element name="companyDeliveryZip" type="xsd:string" nillable="true"/>
<xsd:element name="companyDeliveryCity" type="xsd:string" nillable="true"/>
<xsd:element name="deliveryPersonName" type="xsd:string" nillable="true"/>
<xsd:element name="deliveryPersonPhone" type="xsd:string" nillable="true"/>
<xsd:element name="deliveryPersonEmail" type="xsd:string" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Login" type="tnsTypes:Login"/>
<xsd:complexType name="Login">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="UserName" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="Password" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="LeasingApplicationDataResponse" type="xsd:string"/>
<xsd:element name="error" type="xsd:string"/>
</xsd:schema>
</types>
<message name="Leasing">
<part name="leasingApplicationData" element="tnsTypes:LeasingApplicationData"/>
</message>
<message name="LeasingResponse">
<part name="leasingApplicationDataResponse" element="tnsTypes:LeasingApplicationDataResponse"/>
</message>
<message name="LeasingFault">
<part name="error" element="tnsTypes:error"/>
</message>
<message name="LeasingLogin">
<part name="login" element="tnsTypes:Login"/>
</message>
<portType name="createLeasingApplication">
<operation name="createLeasingApplication">
<input message="tns:Leasing"/>
<output message="tns:LeasingResponse"/>
<fault name="leasingFault" message="tns:LeasingFault"/>
</operation>
</portType>
<binding name="createLeasingApplicationSoapHttp" type="tns:createLeasingApplication">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="createLeasingApplication">
<soap:operation style="document" soapAction="urn:leasingApplication/createLeasingApplication"/>
<input>
<soap:body use="literal"/>
<soap:header message="tns:LeasingLogin" part="login" use="literal"/>
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="leasingFault">
<soap:fault name="leasingFault" use="literal"/>
</fault>
</operation>
</binding>
<service name="createLeasingApplication">
<port name="createLeasingApplicationSoapHttpPort" binding="tns:createLeasingApplicationSoapHttp">
<soap:address location="https://localhost/leasing"/>
</port>
</service>
</definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]