Complex types in the Delphi web service

How to create complex types in a Delphi web service, in particular soapenc: Array, available in the same namespace as those that use it. Currently, if I try to create a new web service in Java from wsdl generated from a Delphi application, Java gives the following error:

Error resolving component 'soapenc:Array'. It was detected that 'soapenc:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document........... 

If I parse wsdl, all of my methods and types use the memoryname 'targetNamespace = "urn: WebserviceIntf", but types using soapenc: Array are defined as follows:

 <xs:complexType name="ArrayOfClientDetailAcc"> <xs:complexContent> <xs:restriction base="soapenc:Array"> <xs:sequence/> <xs:attribute xmlns:n1="http://schemas.xmlsoap.org/wsdl/" ref="soapenc:arrayType" n1:arrayType="ns2:TClientDetailAccArray[]"/> </xs:restriction> </xs:complexContent> </xs:complexType> 

If this cannot be changed, I would suggest that it is best to go about duplicating my Delphi web service in Java without changing the interface at all, which will upset our clients who connect to it.

Your help is appreciated!

I tried using Axis according to the suggested link, but also gives an error:

 C:\axis>java org.apache.axis.wsdl.WSDL2Java http://mywebservice?wsdl - Unable to find required classes (javax.activation.DataHandler and javax.mail.i nternet.MimeMultipart). Attachment support is disabled. WSDLException (at /definitions/binding/operation[1]/input): faultCode=INVALID_WS DL: Element '{http://schemas.xmlsoap.org/wsdl/}input' contained unexpected attri butes: 'message': at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseBindingInput(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseBindingOperation(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseBinding(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav a:516) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav a:495) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361) at java.lang.Thread.run(Unknown Source) 
+4
source share
2 answers

Sorry - based on your comment ("at Netbeans, using the" New WSDL Web Service "), it is clear that you do not want to create a Java client web service, but a web service server. Therefore, my answer, of course, does not help.


See also: Delphi SOAP Server Server - Document / Literature - Maybe?

To solve this problem, one solution would be the following:

  • implement a new web services server with C # (WCF) or Java (JAX-WS)

and then

  • create a simple messaging layer between an existing Delphi application and a web service

or

Both methods, however, will make your new service incompatible with old Delphi customers.

0
source

Same thing in maven axistools:1.4 . This exception was thrown by old wsdl4j <= 1.5.3. Update at least 1.6.1 or wait for new netbeans to appear.

0
source

Source: https://habr.com/ru/post/1439751/


All Articles