WSDL2Java jibx binding issue
-----------------------------
Key: AXIS2-2121
URL: https://issues.apache.org/jira/browse/AXIS2-2121
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: wsdl
Affects Versions: 1.1.1
Environment: windows xp
Reporter: Ravi Varanasi
Get the following error while running WSDL2Java . Any help is appreciated.
Command : %AXIS2_HOME%\bin\wsdl2java -d jibx -Ebindingfile jibx-binding.xml
-uri CM2NameZipSearch.wsdl
Error: Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.IllegalArgumentException: local part cannot be "null" when
creatinga QName
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.IllegalArgumentException: local part cannot be "null" when
creating a QName
at javax.xml.namespace.QName.<init>(QName.java:164)
at javax.xml.namespace.QName.<init>(QName.java:113)
at
org.apache.axis2.jibx.CodeGenerationUtility.collectTopLevelComponents(CodeGenerationUtility.java:993)
at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtension.java:74)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
Binding:
<binding force-classes="true" add-constructors="true"
xmlns:s0="http://tempuri.org/">
<mapping abstract="true" class="org.tempuri.NameZipSearchRequest"
type-name="s0:NameZipSearchRequest">
<value name="FirstName" style="attribute" field="firstName"/>
<value name="LastName" style="attribute" field="lastName"/>
<value name="MiddleInitial" style="attribute"
field="middleInitial"/>
<value name="Zip" style="attribute" field="zip"/>
<value name="ZipFour" style="attribute" field="zipFour"/>
</mapping>
<mapping type-name="s0:SubmitNameZipSearch"
class="org.tempuri.SubmitNameZipSearch">
<structure field="nameZipSearchRequest" name="objRequest"
map-as="s0:NameZipSearchRequest"/>
</mapping>
<mapping abstract="true" class="org.tempuri.LoanSummary"
type-name="s0:LoanSummary">
<value name="FirstName" style="attribute" field="firstName"/>
<value name="LastName" style="attribute" field="lastName"/>
<value name="MiddleInitial" style="attribute"
field="middleInitial"/>
<value name="PropertyAddress1" style="attribute"
field="propertyAddress1"/>
<value name="PropertyAddress2" style="attribute"
field="propertyAddress2"/>
<value name="PropertyCity" style="attribute"
field="propertyCity"/>
<value name="PropertyZip" style="attribute"
field="propertyZip"/>
<value name="LoanType" style="attribute" field="loanType"/>
<value name="LoanNumber" style="attribute" field="loanNumber"/>
<value name="AccountStatus" style="attribute"
field="accountStatus"/>
<value name="CurrentBalanace" style="attribute"
field="currentBalance"/>
</mapping>
<mapping abstract="true" class="org.tempuri.LoanSummaries"
type-name="s0:ArrayOfLoanSummary">
<value name="LoanSummary" style="attribute"
field="loanSummary"/>
</mapping>
<mapping abstract="true" class="org.tempuri.NameZipSearchResponse"
type-name="s0:NameZipSearchResponse">
<structure field="loanSummaries" name="LoanSummary"
map-as="s0:ArrayOfLoanSummary"/>
<value field="refineSearch" name="RefineSearch"/>
</mapping>
<mapping type-name="s0:SubmitNameZipSearchResponse"
class="org.tempuri.NameZipSearchResponse">
<structure field="SubmitNameZipSearchResult"
name="SubmitNameZipSearchResult"
map-as="s0:NameZipSearchResponse"/>
</mapping>
</binding>
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://tempuri.org/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="SubmitNameZipSearch">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="objRequest"
type="s0:NameZipSearchRequest" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="NameZipSearchRequest">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FirstName"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="MiddleInitial"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="LastName"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Zip" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ZipFour" type="s:string"
/>
</s:sequence>
</s:complexType>
<s:element name="SubmitNameZipSearchResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="SubmitNameZipSearchResult" type="s0:NameZipSearchResponse" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="NameZipSearchResponse">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="LoanSummary"
type="s0:ArrayOfLoanSummary" />
<s:element minOccurs="0" maxOccurs="1" name="RefineSearch"
type="s:string" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfLoanSummary">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="LoanSummary"
nillable="true" type="s0:LoanSummary" />
</s:sequence>
</s:complexType>
<s:complexType name="LoanSummary">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FirstName"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="MiddleInitail"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="LastName"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PropertyAddress1"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PropertyAddress2"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PropertyCity"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Propertystate"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PropertyZip"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PropertyZipFour"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="LoanType"
type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="LoanNumber" type="s:int"
/>
<s:element minOccurs="0" maxOccurs="1" name="AccountStatus"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="CurrentBalance"
type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</types>
<message name="SubmitNameZipSearchSoapIn">
<part name="parameters" element="s0:SubmitNameZipSearch" />
</message>
<message name="SubmitNameZipSearchSoapOut">
<part name="parameters" element="s0:SubmitNameZipSearchResponse" />
</message>
<portType name="CM2ServiceSoap">
<operation name="SubmitNameZipSearch">
<input message="s0:SubmitNameZipSearchSoapIn" />
<output message="s0:SubmitNameZipSearchSoapOut" />
</operation>
</portType>
<binding name="CM2ServiceSoap" type="s0:CM2ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<operation name="SubmitNameZipSearch">
<soap:operation soapAction="http://tempuri.org/SubmitNameZipSearch"
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="CM2Service">
<port name="CM2ServiceSoap" binding="s0:CM2ServiceSoap">
<soap:address
location="http://localhost/CM2Service/CM2NameZipSearch.asmx" />
</port>
</service>
</definitions>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]