[jboss-user] [Security & JAAS/JBoss] - Re: Attempt to get JBoss to call my custom login module

jcollins914 do-not-reply at jboss.com
Fri Nov 10 14:37:52 EST 2006


Thanks jaikiran.

  Incidentally, I read your entire blog as part of my research, since you'd answered some questions on this stuff in the past...  My answer wasn't there, but I did find some interesting tidbits, and have bookmarked it for future reference.  Don't go changing just to please me.

  My endpoint(s) are not EJB's, but rather methods exposed through JBoss's implementation of JAX-WS (JBossWS).  An example of one such method is "processMessage()".  

  The web service is exposed as defined in this fragment of my web.xml file (JBossWS dictates the servlet declaration strategy for the web services): 

  
    <servlet-name>CPWebService</servlet-name>
    <display-name>CPWebService</display-name>
    JAX-WS endpoint - CPWebService
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <security-role-ref>
      <role-name>Authenticated</role-name>
      <role-link>Authenticated</role-link>
    </security-role-ref>    
  

   <servlet-mapping>
    <servlet-name>CPWebService</servlet-name>
    <url-pattern>/CPWebService</url-pattern>
  </servlet-mapping>


The method resides in CPWebServiceImpl.java, and appears as follows (complete with annotations):

	@WebMethod
	@WebResult(name = "processMessageReturn", targetNamespace = "http://ws.cp.gehcit.com")
	@RequestWrapper(localName = "processMessage", targetNamespace = "http://ws.cp.gehcit.com", className = "com.gehcit.cp.ws.ProcessMessage")
	@ResponseWrapper(localName = "processMessageResponse", targetNamespace = "http://ws.cp.gehcit.com", className = "com.gehcit.cp.ws.ProcessMessageResponse")
	public String processMessage(
			@WebParam(name = "xmlMessage", targetNamespace = "http://ws.cp.gehcit.com")
			String xmlMessage) throws ProcessMessageFaultMsg {

		MessageProcessor mp = new MessageProcessor();
		try {
			return mp.doMessage(xmlMessage);

		} catch (Exception e) {
			log.error(e, e);
			ProcessMessageFaultMsg pmfm = new ProcessMessageFaultMsg(
					xmlMessage, null, e);

			throw pmfm;
		}
	}

These are the abbreviated wsdl fragments that pertains to this method is as follows:

<wsdl:definitions targetNamespace="http://ws.cp.gehcit.com"
	xmlns:apachesoap="http://xml.apache.org/xml-soap"
	xmlns:impl="http://ws.cp.gehcit.com"
	xmlns:intf="http://ws.cp.gehcit.com"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  

  <wsdl:types>
    
  ...
      
        
          
            
          
        
      

      
        
          
            
          
        
      

      
      
        
          
        
      
   
    ...
  </wsdl:types>

  ...

  <wsdl:message name="processMessageRequest">
    <wsdl:part element="impl:processMessage" name="parameters" />
  </wsdl:message>

  <wsdl:message name="processMessageResponse">

    <wsdl:part element="impl:processMessageResponse"
 name="parameters" />
  </wsdl:message>

  <wsdl:message name="processMessage_faultMsg">
    <wsdl:part name="fault"element="impl:processMessage_fault">
    </wsdl:part>
  </wsdl:message>

  <wsdl:portType name="CPWebService">
    <wsdl:operation name="processMessage">
      <wsdl:input message="impl:processMessageRequest" name="processMessageRequest" />
      <wsdl:output message="impl:processMessageResponse" name="processMessageResponse" />
      <wsdl:fault message="impl:processMessage_faultMsg" name="processMessageFault" />
    </wsdl:operation>
  </wsdl:portType>

  <wsdl:binding name="CPWebServiceSoapBinding"  type="impl:CPWebService">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="processMessage">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="processMessageRequest">
        <wsdlsoap:body use="literal" />
      </wsdl:input>
      <wsdl:output name="processMessageResponse">
        <wsdlsoap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="processMessageFault">
        <wsdlsoap:fault name="processMessageFault" use="literal" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="CPWebServiceService">    
    <wsdl:port binding="impl:CPWebServiceSoapBinding" name="CPWebService">
      <wsdlsoap:address location="http://localhost:8080/CentricityPractice/services/CPWebService" />
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

Thanks again, and please do let me know if I can provide you w/ any other information.
  Jeff


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985014#3985014

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985014



More information about the jboss-user mailing list