Hi,
I am having problems generating the java from a wsdl (with attachments)
using wsdl2java. The details are below. If anyone has any working sample
wsdl with attachments that works, I would appreciate seeing it.
Alternatively any workarounds would be great too. We have to use soap
attachments, but other than that we have some wiggle room for changes.
I have tried both axis 1.1 & 1.2beta2 with an IBM 1.3 JDK.
The error we are getting is:
java.lang.NullPointerException
at
org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2
084)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.j
ava:1860)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.ja
va:1785)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:577)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:421)
when calling wsdl2java on the wsdl:
<?xml version="1.0" ?>
<definitions name="urn:RBSPrint"
targetNamespace="urn:RBSPrint2"
xmlns:tns="urn:RBSPrint2"
xmlns:typens="urn:RBSPrint2"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- type defs -->
<types>
<xsd:schema targetNamespace="urn:RBSPrint2"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<xsd:complexType name="TemplateInformation">
<xsd:sequence>
<xsd:element name="templateRequired"
type="xsd:string"/>
<xsd:element name="priority" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DocumentInformation">
<xsd:sequence>
<xsd:element name="userDefinedDocName"
type="xsd:string"/>
<xsd:element name="templateUsed" type="xsd:string"/>
<xsd:element name="generationTime" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<!-- message declns -->
<message name="empty"/>
<message name="PrintRequest">
<part name="template" type="typens:TemplateInformation"/>
<part name="data" type="xsd:string"/>
</message>
<message name="PrintResponse">
<part name="document" type="typens:DocumentInformation"/>
<part name="pdf" type="xsd:string"/>
</message>
<!-- port type declns -->
<portType name="PrintPort">
<operation name="print">
<input message="tns:PrintRequest"/>
<output message="tns:PrintResponse"/>
</operation>
</portType>
<!-- binding declns -->
<binding name="PrintSOAPBinding" type="tns:PrintPort">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="print">
<soap:operation soapAction="SubmitPrint"/>
<input>
<soap:body use="encoded"
namespace="urn:RBSPrint2"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<mime:multipartRelated>
<mime:part>
<soap:body use="encoded"
namespace="urn:RBSPrint2"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</mime:part>
<mime:part>
<mime:content part="csvfile1"
type="text/plain" />
</mime:part>
</mime:multipartRelated>
</output>
</operation>
</binding>
<!-- service decln -->
<service name="PrintService">
<port name="Print" binding="tns:PrintSOAPBinding">
<soap:address location="http://localhost:8080/Print"/>
</port>
</service>
</definitions>
Thanks,
Charles.
Charles Cordingley
SAO Wave 3 - Java Team Leader
The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office:
36 St Andrew Square, Edinburgh EH2 2YB
The Royal Bank of Scotland plc is authorised and regulated by the Financial Services
Authority and represents The Royal Bank of Scotland Marketing Group. The Bank sells
life policies, collective investment schemes and pension products and advises only on
the Marketing Group's range of these products and on a With-Profit Bond produced by
Norwich Union Life (RBS) Limited.
This e-mail message is confidential and for use by the addressee only. If the message
is received by anyone other than the addressee, please return the message to the
sender by replying to it and then delete the message from your computer. Internet
e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept
responsibility for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of viruses, it is
the responsibility of the recipient to ensure that the onward transmission, opening or
use of this message and any attachments will not adversely affect its systems or data.
No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the
recipient should carry out such virus and other checks as it considers appropriate.