axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leslie Tighe <leslie_ti...@yahoo.com>
Subject Calling an Axis Webservice from .NET
Date Mon, 25 Jul 2005 13:19:21 GMT
Hello,
I have a webservice running on a J2EE server created with Axis 1.2.. I have a client that
I am building in .net that needs to consume this webserivce and am having a bit of trouble.
 I have pasted the wsdl below and have a created a class in VB.net by adding a web refrence
to my project. What is odd is that I can successfully call methods that return a simple value
like a string. I call also call methods that add an object. However, for methods the return
objects, i always get an empty object.  When methods return arrays of objects, I get the correct
number of records in the array, but none of the fields in the objects are set.  It seems to
be a binding problem. Any suggestions as to how I can get around this?
Regards,
Leslie
 
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
 targetNamespace="urn:AuthLogin" 
 xmlns:tns="urn:AuthLogin" 
 xmlns:typens="urn:AuthLogin" 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <!-- type defs -->
 <wsdl:types>
  <schema elementFormDefault="qualified" 
   targetNamespace="urn:AuthLogin" 
   xmlns="http://www.w3.org/2001/XMLSchema">

   <element name="getUserId">
    <complexType>
     <sequence>
      <element name="serviceId" type="xsd:string"/>
      <element name="login" type="xsd:string"/>
      <element name="password" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getUserIdResponse">
    <complexType>
     <sequence>
      <element name="getUserIdReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="autoResetPassword">
    <complexType>
     <sequence>
      <element name="serviceId" type="xsd:string"/>
      <element name="login" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="autoResetPasswordResponse">
    <complexType>
     <sequence>
      <element name="autoResetPasswordReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getLogin">
    <complexType>
     <sequence>
      <element name="serviceId" type="xsd:string"/>
      <element name="login" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getLoginResponse">
    <complexType>
     <sequence>
      <element name="getLoginReturn" type="tns:WSLoginValue"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="WSLoginValue">
    <sequence>
     <element name="authFailureCount" type="xsd:int" minOccurs="0" nillable="false"/>
     <element name="changePassword" nillable="false" type="xsd:dateTime" minOccurs="0"/>
     <element name="createDate" nillable="false" type="xsd:dateTime" minOccurs="0"/>
     <element name="createdBy" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="currentLoginHost" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="gracePeriodExp" nillable="false" type="xsd:dateTime" minOccurs="0"/>
     <element name="guest" type="xsd:boolean" nillable="false" minOccurs="0"/>
     <element name="lastAuthAttempt" nillable="false" type="xsd:dateTime" minOccurs="0"/>
     <element name="locked" type="xsd:boolean" minOccurs="0" nillable="false"/>
     <element name="login" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="newUser" type="xsd:boolean" minOccurs="0" nillable="false"/>
     <element name="password" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="passwordEquivalentToken" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="passwordExp" nillable="false" type="xsd:dateTime" minOccurs="0"/>
     <element name="resetPassword" type="xsd:boolean" minOccurs="0" nillable="false"/>
     <element name="service" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="status" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="token" nillable="false" type="xsd:string" minOccurs="0"/>
     <element name="userId" nillable="false" type="xsd:string" minOccurs="0"/>
    </sequence>
   </complexType>
   <element name="authenticate">
 <complexType>
 <sequence>
   <element name="serviceId" type="xsd:string" /> 
    <element name="login" type="xsd:string" /> 
   <element name="password" type="xsd:string" /> 
    </sequence>
   </complexType>
  </element>
  <element name="authenticateResponse">
 <complexType>
 <sequence>
      <element name="authenticateResponse" type="tns:SSOSubject" /> 
    </sequence>
    </complexType>
  </element>
  <complexType name="SSOSubject">
    <sequence>
    <element name="expirationTime" type="xsd:long" nillable="false" minOccurs="0"/>

   <element name="readOnly" type="xsd:boolean" nillable="false" minOccurs="0"/> 
   <element name="resultCode" type="xsd:int" nillable="false" minOccurs="0"/> 
   <element name="token" nillable="false" type="xsd:string" minOccurs="0"/> 
   <element name="userId" nillable="false" type="xsd:string" minOccurs="0"/> 
    </sequence>
  </complexType>
  <element name="authenticateToken">
 <complexType>
   <sequence>
    <element name="userId" type="xsd:string" /> 
    <element name="token" type="xsd:string" /> 
     </sequence>
    </complexType>
  </element>
  <element name="authenticateTokenResponse">
 <complexType>
   <sequence>
  <element name="authenticateTokenReturn" type="tns:SSOSubject" /> 
      </sequence>
    </complexType>
  </element>
   <element name="removeLogin">
    <complexType>
     <sequence>
      <element name="serviceId" type="xsd:string"/>
      <element name="loginId" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="removeLoginResponse">
    <complexType/>
   </element>
   <element name="getAllLogins">
    <complexType>
     <sequence>
      <element name="userId" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getAllLoginsResponse">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="getAllLoginsReturn" 
      type="typens:WSLoginValue"/>
     </sequence>
    </complexType>
   </element>

   <element name="logout">
    <complexType>
     <sequence>
      <element name="userId" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="logoutResponse">
    <complexType/>
   </element>
   <element name="addLogin">
    <complexType>
     <sequence>
      <element name="loginValue" type="typens:WSLoginValue"/>
     </sequence>
    </complexType>
   </element>
   <element name="addLoginResponse">
    <complexType/>
   </element>
   <element name="updateLogin">
    <complexType>
     <sequence>
      <element name="lv" type="typens:WSLoginValue"/>
     </sequence>
    </complexType>
   </element>
   <element name="updateLoginResponse">
    <complexType/>
   </element>
   <element name="encrypt">
    <complexType>
     <sequence>
      <element name="clearText" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="encryptResponse">
    <complexType>
     <sequence>
      <element name="encryptReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="decrypt">
    <complexType>
     <sequence>
      <element name="token" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="decryptResponse">
    <complexType>
     <sequence>
      <element name="decryptReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

 <!-- message -->
   <wsdl:message name="authenticateMsg">
      <wsdl:part element="typens:authenticate" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="authenticateResponseMsg">
      <wsdl:part element="typens:authenticateResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="authenticateTokenMsg">
      <wsdl:part element="typens:authenticateToken" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="authenticateTokenResponseMsg">
      <wsdl:part element="typens:authenticateTokenResponse" name="parameters"/>
   </wsdl:message>
 
   <wsdl:message name="getLoginMsg">
      <wsdl:part element="typens:getLogin" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="getLoginResponseMsg">
      <wsdl:part element="typens:getLoginResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="logoutMsg">
      <wsdl:part element="typens:logout" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="logoutResponseMsg">
      <wsdl:part element="typens:logoutResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="autoResetPasswordMsg">
      <wsdl:part element="typens:autoResetPassword" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="autoResetPasswordResponseMsg">
      <wsdl:part element="typens:autoResetPasswordResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="getUserIdMsg">
      <wsdl:part element="typens:getUserId" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="getUserIdResponseMsg">
      <wsdl:part element="typens:getUserIdResponse" name="parameters"/>
   </wsdl:message>
 
   <wsdl:message name="removeLoginMsg">
      <wsdl:part element="typens:removeLogin" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="removeLoginResponseMsg">
      <wsdl:part element="tns:removeLoginResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="updateLoginMsg">
      <wsdl:part element="typens:updateLogin" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="updateLoginResponseMsg">
      <wsdl:part element="typens:updateLoginResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="addLoginMsg">
      <wsdl:part element="typens:addLogin" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="addLoginResponseMsg">
      <wsdl:part element="typens:addLoginResponse" name="parameters"/>
   </wsdl:message>
    <wsdl:message name="getAllLoginsMsg">
      <wsdl:part element="typens:getAllLogins" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="getAllLoginsResponseMsg">
      <wsdl:part element="typens:getAllLoginsResponse" name="parameters"/>
   </wsdl:message>
  <wsdl:message name="encryptMsg">
      <wsdl:part element="typens:encrypt" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="encryptResponseMsg">
      <wsdl:part element="typens:encryptResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="decryptMsg">
      <wsdl:part element="typens:decrypt" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="decryptResponseMsg">
      <wsdl:part element="typens:decryptResponse" name="parameters"/>
   </wsdl:message>

  <!-- port type -->
   <wsdl:portType name="AuthLogin">
      <wsdl:operation name="authenticate">
         <wsdl:input message="tns:authenticateMsg" name="authenticateRequest"/>
         <wsdl:output message="tns:authenticateResponseMsg" name="authenticateResponse"/>
      </wsdl:operation>
     <wsdl:operation name="authenticateToken">
         <wsdl:input message="tns:authenticateTokenMsg" name="authenticateTokenRequest"/>
         <wsdl:output message="tns:authenticateTokenResponseMsg" name="authenticateTokenResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getUserId">
         <wsdl:input message="tns:getUserIdMsg" name="getUserIdRequest"/>
         <wsdl:output message="tns:getUserIdResponseMsg" name="getUserIdResponse"/>
      </wsdl:operation>
      <wsdl:operation name="autoResetPassword">
         <wsdl:input message="tns:autoResetPasswordMsg" name="autoResetPasswordRequest"/>
         <wsdl:output message="tns:autoResetPasswordResponseMsg" name="autoResetPasswordResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getLogin">
         <wsdl:input message="tns:getLoginMsg" name="getLoginRequest"/>
         <wsdl:output message="tns:getLoginResponseMsg" name="getLoginResponse"/>
      </wsdl:operation>
      <wsdl:operation name="removeLogin">
         <wsdl:input message="tns:removeLoginMsg" name="removeLoginRequest"/>
         <wsdl:output message="tns:removeLoginResponseMsg" name="removeLoginResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getAllLogins">
         <wsdl:input message="tns:getAllLoginsMsg" name="getAllLoginsRequest"/>
         <wsdl:output message="tns:getAllLoginsResponseMsg" name="getAllLoginsResponse"/>
      </wsdl:operation>

      <wsdl:operation name="logout">
         <wsdl:input message="tns:logoutMsg" name="logoutRequest"/>
         <wsdl:output message="tns:logoutResponseMsg" name="logoutResponse"/>
      </wsdl:operation>
      <wsdl:operation name="addLogin">
         <wsdl:input message="tns:addLoginMsg" name="addLoginRequest"/>
         <wsdl:output message="tns:addLoginResponseMsg" name="addLoginResponse"/>
      </wsdl:operation>
      <wsdl:operation name="updateLogin">
         <wsdl:input message="tns:updateLoginMsg" name="updateLoginRequest"/>
         <wsdl:output message="tns:updateLoginResponseMsg" name="updateLoginResponse"/>
      </wsdl:operation>
      <wsdl:operation name="encrypt">
         <wsdl:input message="tns:encryptMsg" name="encryptRequest"/>
         <wsdl:output message="tns:encryptResponseMsg" name="encryptResponse"/>
      </wsdl:operation>
      <wsdl:operation name="decrypt">
         <wsdl:input message="tns:decryptMsg" name="decryptRequest"/>
         <wsdl:output message="tns:decryptResponseMsg" name="decryptResponse"/>
      </wsdl:operation>
   </wsdl:portType>

   <!-- binding -->
   <wsdl:binding name="AuthLoginSoapBinding" type="tns:AuthLogin">
      <wsdlsoap:binding style="document" 
        transport="http://schemas.xmlsoap.org/soap/http"/>

     <wsdl:operation name="authenticate">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="authenticateRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="authenticateResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
    <wsdl:operation name="authenticateToken">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="authenticateTokenRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="authenticateTokenResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>

      <wsdl:operation name="getUserId">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getUserIdRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getUserIdResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="autoResetPassword">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="autoResetPasswordRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="autoResetPasswordResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getLogin">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getLoginRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getLoginResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="removeLogin">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="removeLoginRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="removeLoginResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getAllLogins">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getAllLoginsRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getAllLoginsResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>

      <wsdl:operation name="logout">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="logoutRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="logoutResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="addLogin">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="addLoginRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="addLoginResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="updateLogin">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="updateLoginRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="updateLoginResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="encrypt">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="encryptRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="encryptResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="decrypt">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="decryptRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="decryptResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="AuthLoginService">
      <wsdl:port binding="tns:AuthLoginSoapBinding" name="AuthLogin">
         <wsdlsoap:address location="http://localhost:9082/axis/services/AuthLogin"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>


		
---------------------------------
Yahoo! Mail
 Stay connected, organized, and protected. Take the tour
Mime
View raw message