Hello,
when trying to generate Java classes from a SAP Business Connector I got
errors (undefined namespace) after editing the file i finally got a a
NullPointer Exception (see error message and WSDL file below).
Options used : java org.apache.axis.wsdl.WSDL2Java -v -a -D -W -p
Version: axis-1_1RC2
- Does anybody know about issues when processing WSDL files from SAP Business
Connectors (I can generate classes for BC services with no parameters)?
- Whats wrong with the supplied WSDL file ?
- How can i solve the problems?
Thanks for any help in advance
Reto
Error Message:
java.lang.NullPointerException at
org.apache.axis.wsdl.symbolTable.Utils.getNodeNameQName(Utils.java:257) at
org.apache.axis.wsdl.symbolTable.SchemaUtils.getElementAnonQName(SchemaUtils.java:379)
at org.apache.axis.wsdl.symbolTable.Utils.getTypeQNameFromAttr(Utils.java:399)
at org.apache.axis.wsdl.symbolTable.Utils.getTypeQName(Utils.java:314)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.createTypeFromRef(SymbolTable.java:962)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:734)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:825)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:825)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:825)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateTypes(SymbolTable.java:688)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:548)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:421)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
at java.lang.Thread.run(Thread.java:536)
This is the WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="test" targetNamespace="http://192.168.125.246"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:tns="http://192.168.125.246"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="bank_get_detailInput">
<wsdl:part name="composite" type="tns:in"/>
</wsdl:message>
<wsdl:message name="bank_get_detailOutput">
<wsdl:part name="composite" type="tns:out"/>
</wsdl:message>
<wsdl:portType name="testPortType">
<wsdl:operation name="bank_get_detail">
<wsdl:input name="bank_get_detailInput" message="tns:bank_get_detailInput"/>
<wsdl:output name="bank_get_detailOutput" message="tns:bank_get_detailOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testBinding" type="tns:testPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<wsdl:operation name="bank_get_detail">
<wsdl:input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="test" use="encoded"/>
</wsdl:input>
<wsdl:output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="test" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testService">
<wsdl:port name="testPort0" binding="tns:testBinding">
<soap:address location="http://192.168.125.246:5555/soap/rpc"/>
</wsdl:port>
</wsdl:service>
<wsdl:types>
<xsd:complexType name="in">
<xsd:sequence>
<xsd:element name="BANKCOUNTRY" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANKKEY" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="out">
<xsd:sequence>
<xsd:element name="BANK_ADDRESS" type="xsd:BANK_ADDRESS" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANK_DETAIL" type="xsd:BANK_DETAIL" minOccurs="1" maxOccurs="1"/>
<xsd:element name="RETURN" type="xsd:RETURN" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="BANK_ADDRESS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BANK_NAME" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="REGION" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="STREET" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="CITY" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="SWIFT_CODE" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANK_GROUP" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="POBK_CURAC" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANK_NO" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="POST_BANK" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANK_BRANCH" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="ADDR_NO" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="BANK_DETAIL">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CREAT_DATE" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="CREATOR" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="METHOD" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="FORMATTING" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="BANK_DELETE" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="RETURN">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TYPE" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="ID" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="NUMBER" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="MESSAGE" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="LOG_NO" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="LOG_MSG_NO" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="MESSAGE_V1" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="MESSAGE_V2" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="MESSAGE_V3" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="MESSAGE_V4" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="PARAMETER" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="ROW" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="FIELD" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="SYSTEM" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
</xsd:element>
</wsdl:types>
</wsdl:definitions>