How did you generate the code ? did you use the ?wsdl and generate the stubs or did you do something else.
Deepal > I'm still trying to build an axis2 client, but I'm not skilled enough to find > the problem here, so I ask for your advice. This is a long post, sorry. > > When I run the ADB client, I get: > > org.apache.axis2.databinding.ADBException: Unexpected subelement return > > When I run the Xmlbeans client, I get no excpetions but a null result > > sc_response.getSystemConnectResponse().getSystemConnectResult() == null > > I suspect both problems have a common cause, e.g. the WSDL defines a > systemConnectResponse data structure that the systemConnect service does not > honor, so the generated axis clients (xmlbeans and adb) can't parse it. > > Here is a snippet of the WSDL (I've cut the real one so that this contains > only one method, but I believe it's still a well formed and valid WSDL): > > <?xml version="1.0"?> > <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="https://xxx.yyy.zzz/wss-demo/SoapServer/soap" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap- > enc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Services_System" > targetNamespace="https://xxx.yyy.zzz/wss-demo/SoapServer/soap"> > <types> > <xsd:schema targetNamespace="https://xxx.yyy.zzz/wss- > demo/SoapServer/soap"> > <xsd:element name="systemConnect"> > <xsd:complexType/> > </xsd:element> > <xsd:element name="systemConnectResponse"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="systemConnectResult" type="soap-enc:Array"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </types> > <portType name="Services_SystemPort"> > <operation name="systemConnect"> > <documentation>systemConnect: return the SessionId for the > connection</documentation> > <input message="tns:systemConnectIn"/> > <output message="tns:systemConnectOut"/> > </operation> > </portType> > <binding name="Services_SystemBinding" type="tns:Services_SystemPort"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <operation name="systemConnect"> > <soap:operation soapAction="https://xxx.yyy.zzz/wss- > demo/SoapServer/soap#systemConnect"/> > <input> > <soap:body use="literal" namespace="https://xxx.yyy.zzz/wss- > demo/SoapServer/soap"/> > </input> > <output> > <soap:body use="literal" namespace="https://xxx.yyy.zzz/wss- > demo/SoapServer/soap"/> > </output> > </operation> > </binding> > <service name="Services_SystemService"> > <port name="Services_SystemPort" binding="tns:Services_SystemBinding"> > <soap:address location="https://xxx.yyy.zzz/wss-demo/SoapServer/soap"/> > </port> > </service> > <message name="systemConnectIn"> > <part name="parameters" element="tns:systemConnect"/> > </message> > <message name="systemConnectOut"> > <part name="parameters" element="tns:systemConnectResponse"/> > </message> > </definitions> > > And here is the xml I receive from the systemConnect call: > > <?xml version="1.0" encoding="UTF-8"?> > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:ns1="https://xxx.yyy.zzz/wss-demo/SoapServer/soap" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP- > ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP- > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > <SOAP-ENV:Body> > <ns1:systemConnectResponse> > <return xsi:type="ns2:Map"> > <item> > <key xsi:type="xsd:string">sessid</key> > <value xsi:type="xsd:string">q1p2uot1au238ge56odulbfiv4</value> > </item> > <item> > <key xsi:type="xsd:string">user</key> > <value xsi:type="ns2:Map"> > <item> > <key xsi:type="xsd:string">uid</key> > <value xsi:type="xsd:int">0</value> > </item> > <item> > <key xsi:type="xsd:string">hostname</key> > <value xsi:type="xsd:string">172.20.80.68</value> > </item> > <item> > <key xsi:type="xsd:string">roles</key> > <value xsi:type="ns2:Map"> > <item> > <key xsi:type="xsd:int">1</key> > <value xsi:type="xsd:string">anonymous user</value> > </item> > </value> > </item> > <item> > <key xsi:type="xsd:string">session</key> > <value xsi:type="xsd:string"></value> > </item> > <item> > <key xsi:type="xsd:string">cache</key> > <value xsi:type="xsd:int">0</value> > </item> > </value> > </item> > </return> > </ns1:systemConnectResponse> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > I've replaced the real server name with xxx.yyy.zzz. > > Can anyone tell me if this XML response is valid as per the wsdl schema and > what eventually should be changed (in the wsdl) to make it valid? > Unfortunately I couldn't find any validation service that lets me upload both > the XML and the WSDL as XSD. > > Thanks in advace > Lucio. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org > For additional commands, e-mail: java-user-h...@axis.apache.org > > -- Blog - http://blogs.deepal.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org