What is the best way to return an array of custome object
Hi, I have a webservice based on a POJO. The webservice method returns an array of custom object, like BankResult[] checkAccount(Bank) Axis2 generates a wsdl containg an error: the resulting element doesn't contain any name, like: xs:element name=checkAccountResponse xs:complexType xs:sequence xs:element maxOccurs=unbounded minOccurs=0 nillable=true type=ax28:BankResult/ /xs:sequence /xs:complexType /xs:element Ok, I modified the wsdl and define the name of the resulting element like: xs:element name=checkAccountResponse xs:complexType xs:sequence xs:element maxOccurs=unbounded minOccurs=0 name=return nillable=true type=ax28:BankResult/ /xs:sequence /xs:complexType /xs:element The next problem is, the SOAP response message contains an attribute, where the wsdl doesn't define this attribute, like ?xml version=1.0 encoding=http://www.w3.org/2003/05/soap-envelope; standalone=no? soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; soapenv:Body checkAccountResponse xmlns=http://bank.ws.uniserv; return type=uniserv.ws.bank.BankResult === the attribute 'type' is not defined by the wsdl! bankCodeNumber/ bankName/ bankNetwork/ bankSector/ bic/ cdMethod/ city/ clearingArea/ country/ errorMsg/ iban/ mvals/ officeType/ quality0/quality replaceBcn/ resultAccount0/resultAccount resultClass0/resultClass resultText/ retInfo0/retInfo retType-1/retType street/ zip/ /return /checkAccountResponse /soapenv:Body /soapenv:Envelope The type BankResult is defined as: xs:complexType name=BankResult xs:sequence xs:element minOccurs=0 name=bankCodeNumber nillable=true type=xs:string/ xs:element minOccurs=0 name=bankIdCode nillable=true type=xs:string/ xs:element minOccurs=0 name=bankName nillable=true type=xs:string/ xs:element minOccurs=0 name=bankNetwork nillable=true type=xs:string/ xs:element minOccurs=0 name=cdMethod nillable=true type=xs:string/ xs:element minOccurs=0 name=city nillable=true type=xs:string/ xs:element minOccurs=0 name=clearingArea nillable=true type=xs:string/ xs:element minOccurs=0 name=country nillable=true type=xs:string/ xs:element minOccurs=0 name=errorMsg nillable=true type=xs:string/ xs:element minOccurs=0 name=iban nillable=true type=xs:string/ xs:element minOccurs=0 name=mvals nillable=true type=xs:string/ xs:element minOccurs=0 name=officeType nillable=true type=xs:string/ xs:element minOccurs=0 name=quality nillable=true type=xs:string/ xs:element minOccurs=0 name=resultAccount type=xs:int/ xs:element minOccurs=0 name=resultClass type=xs:int/ xs:element minOccurs=0 name=zip nillable=true type=xs:string/ /xs:sequence /xs:complexType I'm able to create the client stub using the WSDL2Java, but I get following execption on executing the request: Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement bankCodeNumber Does anyone have any idea how to handle this problem? Is it possible at all to return an array of objects? Is there any other way do do that? Thanks, Fadila
AXIS2-3972 Attribute 'type' in the 'return' tag of a SOAPResponse
Hi, When return type of the method is a complex custom-defined object, axis2 sends an attribute 'type' in the 'return' message. This is not compliant to the wsdl schema. Is there any fix or workaround available? Thanks, Fadila
RE: WSDL2Java Exception
Hi Keith, here is the wsdl created by axis: ?xml version=1.0 encoding=UTF-8 ? - wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns4=http://bank.ws.uniserv; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:ns0=http://bank.ws.uniserv/xsd; xmlns:ns1=http://ws.uniserv/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:ns3=http://io.java/xsd; xmlns:ns2=http://rmi.java/xsd; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; targetNamespace=http://bank.ws.uniserv; wsdl:documentationBankValidator/wsdl:documentation - wsdl:types - xs:schema xmlns:ax24=http://bank.ws.uniserv/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://bank.ws.uniserv/xsd; - xs:complexType name=Parameter - xs:sequence xs:element minOccurs=0 name=parIbanCase nillable=true type=xs:string / xs:element minOccurs=0 name=parIbanFormat nillable=true type=xs:string / xs:element minOccurs=0 name=parListMax nillable=true type=xs:string / xs:element minOccurs=0 name=parMinMval nillable=true type=xs:string / xs:element minOccurs=0 name=parReduce nillable=true type=xs:string / xs:element minOccurs=0 name=parTimeOut nillable=true type=xs:string / /xs:sequence /xs:complexType - xs:complexType name=Bank - xs:sequence xs:element minOccurs=0 name=account nillable=true type=xs:string / xs:element minOccurs=0 name=bankCodeNumber nillable=true type=xs:string / xs:element minOccurs=0 name=bankName nillable=true type=xs:string / xs:element minOccurs=0 name=city nillable=true type=xs:string / xs:element minOccurs=0 name=country nillable=true type=xs:string / xs:element minOccurs=0 name=zip nillable=true type=xs:string / /xs:sequence /xs:complexType - xs:complexType name=BankResult - xs:sequence xs:element minOccurs=0 name=bankCodeNumber nillable=true type=xs:string / xs:element minOccurs=0 name=bankIdCode nillable=true type=xs:string / xs:element minOccurs=0 name=bankName nillable=true type=xs:string / xs:element minOccurs=0 name=bankNetwork nillable=true type=xs:string / xs:element minOccurs=0 name=cdMethod nillable=true type=xs:string / xs:element minOccurs=0 name=city nillable=true type=xs:string / xs:element minOccurs=0 name=clearingArea nillable=true type=xs:string / xs:element minOccurs=0 name=country nillable=true type=xs:string / xs:element minOccurs=0 name=errorMsg nillable=true type=xs:string / xs:element minOccurs=0 name=iban nillable=true type=xs:string / xs:element minOccurs=0 name=mvals nillable=true type=xs:string / xs:element minOccurs=0 name=officeType nillable=true type=xs:string / xs:element minOccurs=0 name=quality nillable=true type=xs:string / xs:element minOccurs=0 name=resultAccount type=xs:int / xs:element minOccurs=0 name=resultClass type=xs:int / xs:element minOccurs=0 name=zip nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:schema - xs:schema xmlns:ax23=http://ws.uniserv/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://ws.uniserv/xsd; - xs:complexType name=Authentication - xs:sequence xs:element minOccurs=0 name=password nillable=true type=xs:string / xs:element minOccurs=0 name=registrationNumber nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:schema - xs:schema xmlns:ax21=http://rmi.java/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://rmi.java/xsd; - xs:complexType name=RemoteException - xs:complexContent - xs:extension base=ns3:IOException - xs:sequence xs:element minOccurs=0 name=cause nillable=true type=xs:anyType / xs:element minOccurs=0 name=message nillable=true type=xs:string / xs:element minOccurs=0 name=detail nillable=true type=xs:anyType / /xs:sequence /xs:extension /xs:complexContent /xs:complexType /xs:schema - xs:schema xmlns:ax22=http://io.java/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://io.java/xsd; - xs:complexType name=IOException - xs:complexContent - xs:extension base=ns4:Exception xs:sequence / /xs:extension /xs:complexContent /xs:complexType /xs:schema - xs:schema xmlns:ns=http://bank.ws.uniserv; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://bank.ws.uniserv; - xs:complexType name=Exception - xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType / /xs:sequence /xs:complexType - xs:element name=RemoteException - xs:complexType - xs:sequence xs:element minOccurs=0 name=RemoteException nillable=true type=ns2:RemoteException / /xs:sequence /xs:complexType /xs:element - xs:element name=checkAccount - xs:complexType - xs:sequence xs:element minOccurs=0 name=param0 nillable=true type=ns1:Authentication / xs:element
WSDL2Java Exception
Hi, I'm using axis2 1.3. I've deployed a new webservice and I can see it in the list of deployed services. I would like to generate the client stub using the wsdl created by axis. But whenn I call WSDL2Java the following exception is thrown: [java] org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710) ... [java] Caused by: org.apache.axis2.schema.SchemaCompilationException: Missing name attribute! Please check your schema! [java] at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2089) [java] at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.ja va:1788) [java] at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler .java:977) [java] at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType (SchemaCompiler.java:886) [java] at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java :867) I'm a bit confused because the wsdl is created by axis. Any help is welcome! Thanks, Fadila - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis and JBoss
Hi, I have some axis 1.4 webservices running with tomcat. What I want, is to run the same services under Jboss. Jboss itself uses also axis, or not? What is the right procedure to do it? Do I need some jboss-special deployment descriptors? Where to put them and the .class files? Can I use the same class-file at all? Do I need any additional package für jboss (like jbossws)? Thanks and best regards, Fadila - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis1 client for axis2 web service
Hi, is it possible to create an axis1 client for one axis2 webservice? I tried it, and got following exception by running org.apache.axis.wsdl.WSDL2Java: java.io.IOException: ERROR: Missing soap:fault element inFault checkAddressFault in operation checkAddressFault, in binding checkAddress at org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolT able.java:2858) at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTabl e.java:2549) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:7 44) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:5 18) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:4 95) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361) at java.lang.Thread.run(Thread.java:534) Thank you and best regards, Fadila - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]