title: Consume an rpc-style soap webservice using Spring
body: <p>Im trying to consume an RPC-Style Soap WebService with Spring, I'm using this guide <a href="http://spring.io/guides/gs/consuming-web-service/" rel="nofollow">http://spring.io/guides/gs/consuming-web-service/</a> as an example.  I'm stuck at the "...WebServiceTemplate().marshalSendAndReceive(request..." because the XJC task doesnt generate the resquest Class, this is the wsdl of the service im trying to implement:</p>
  
  <pre><code>        &lt;wsdl:definitions name="AuthenticationService" targetNamespace="http://authservices.ws.gt.company.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://authservices.ws.gt.company.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
             &lt;wsdl:types&gt;
                &lt;xs:schema targetNamespace="http://authservices.ws.gt.company.com/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
                   &lt;xs:complexType name="userInformationResponse"&gt;
                      &lt;xs:sequence&gt;
                         &lt;xs:element minOccurs="0" name="alias" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="bussinessPhone" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="department" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="email" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="errorMessage" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="firt" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="groups" type="tns:userInformationGroups"/&gt;
                         &lt;xs:element minOccurs="0" name="last" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="mobilePhone" type="xs:string"/&gt;
                         &lt;xs:element minOccurs="0" name="title" type="xs:string"/&gt;
                      &lt;/xs:sequence&gt;
                   &lt;/xs:complexType&gt;
                   &lt;xs:complexType name="userInformationGroups"&gt;
                      &lt;xs:sequence&gt;
                         &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="group" nillable="true" type="xs:string"/&gt;
                      &lt;/xs:sequence&gt;
                   &lt;/xs:complexType&gt;
                &lt;/xs:schema&gt;
             &lt;/wsdl:types&gt;
             &lt;wsdl:message name="requestUserInfo"&gt;
                &lt;wsdl:part name="ldapId" type="xsd:int"/&gt;
                &lt;wsdl:part name="user" type="xsd:string"/&gt;
                &lt;wsdl:part name="password" type="xsd:string"/&gt;
             &lt;/wsdl:message&gt;
             &lt;wsdl:message name="requestUserInfoResponse"&gt;
                &lt;wsdl:part name="userInfo" type="tns:userInformationResponse"/&gt;
             &lt;/wsdl:message&gt;
             &lt;wsdl:portType name="AuthService"&gt;
                &lt;wsdl:operation name="requestUserInfo"&gt;
                   &lt;wsdl:input message="tns:requestUserInfo" name="requestUserInfo"/&gt;
                   &lt;wsdl:output message="tns:requestUserInfoResponse" name="requestUserInfoResponse"/&gt;
                &lt;/wsdl:operation&gt;
             &lt;/wsdl:portType&gt;
             &lt;wsdl:binding name="AuthenticationServiceSoapBinding" type="tns:AuthService"&gt;
                &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
                &lt;wsdl:operation name="requestUserInfo"&gt;
                   &lt;soap:operation soapAction="" style="rpc"/&gt;
                   &lt;wsdl:input name="requestUserInfo"&gt;
                      &lt;soap:body namespace="http://authservices.ws.gt.company.com/" use="literal"/&gt;
                   &lt;/wsdl:input&gt;
                   &lt;wsdl:output name="requestUserInfoResponse"&gt;
                      &lt;soap:body namespace="http://authservices.ws.gt.company.com/" use="literal"/&gt;
                   &lt;/wsdl:output&gt;
                &lt;/wsdl:operation&gt;
             &lt;/wsdl:binding&gt;
             &lt;wsdl:service name="AuthenticationService"&gt;
                &lt;wsdl:port binding="tns:AuthenticationServiceSoapBinding" name="AuthServicePort"&gt;
                   &lt;soap:address location="http://HOST/authservices/AuthService"/&gt;
                &lt;/wsdl:port&gt;
             &lt;/wsdl:service&gt;
          &lt;/wsdl:definitions&gt;
  </code></pre>