1 Reply Latest reply on Jun 18, 2013 9:36 AM by Tom Cunningham

    turning on smooks html report generator in wise soap client?

    Rocky S Master

      Hello Guys,

       

      I'm using smooks as request mapper inside org.jboss.soa.esb.actions.soap.wise.SOAPClient. Like this in jboss esb-

       

      My question is how should i turn on smooks html report generator?

       

                  <actions mep="OneWay"> 
                      <action name="request-mapper" 
      class="org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.MyRequestAction"> 
                      </action> 
                      <action name="soap-wise-client-action" 
      class="org.jboss.soa.esb.actions.soap.wise.SOAPClient"> 
                          <property name="wsdl" 
      value="http://127.0.0.1:8080/Quickstart_webservice_consumer_wise2/PingWS?wsdl" /> 
                          <property name="SOAPAction" value="pingComplexObject"/> 
                          <property name="EndPointName" value="PingWSPort"/> 
                          <property name="SmooksRequestMapper" value="smooks-request-config.xml"/> 
                          <property name="SmooksResponseMapper" value="smooks-response-config.xml"/> 
                          <property name="LoggingMessages" value="true" /> 
                          <property name="serviceName" value="PingWS"/> 
                          <property name="username" value=""/> 
                          <property name="password" value=""/> 
                      </action> 
                </actions>
      

       

       

      smooks-request-config.xml looks like this-

       

      <?xml version="1.0"?> 
      <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd"> 
      
          <resource-config selector="global-parameters"> 
              <param name="stream.filter.type">SAX</param> 
          </resource-config> 
      
          <resource-config selector="org.jboss.soa.esb.samples.quickstart.webservice__consumer__wise2.ExternalObject"> 
      <resource>org.milyn.javabean.BeanPopulator</resource> 
              <param name="beanId">complexObject</param> 
              <param name="beanClass">org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.generated.ComplexObject</param> 
              <param name="bindings"> 
                  <binding property="integerField" type="Integer" selector="internal number" /> 
                  <binding property="stringField" selector="internal text" /> 
                  <binding property="calendarField" type="XMLGregorianCalendar" selector="date" /> 
              </param> 
          </resource-config> 
      
          <resource-config selector="decoder:XMLGregorianCalendar"> 
      <resource>it.javalinux.wise.smooks.decoders.XMLGregorianCalendarDecoder</resource> 
              <param name="format">yyyy-MM-dd HH:mm:ss.S z</param> 
          </resource-config> 
      
      </smooks-resource-list> 
      
        • 1. Re: turning on smooks html report generator in wise soap client?
          Tom Cunningham Master

          From the code, it looks like the HtmlReportGenerator is being added to the SmooksMapper :

           

             

          public Map<String, Object> applyMapping(Object originalObjects) throws Exception {
          
          
                  if(smooks == null) {
                  synchronized (this) {
                      if(smooks == null) {
                                  smooks = SmooksResource.createSmooksResource();
                                  smooks.addConfigurations("smooks-resource", new URIResourceLocator().getResource(smooksResource));
                      }
                          }
                  }
          
                  ExecutionContext executionContext = smooks.createExecutionContext();
                  // Configure the execution context to generate a report...
                  if (this.getSmooksReport() != null) {
                      executionContext.setEventListener(new HtmlReportGenerator(this.getSmooksReport()));
                  }
          
          

           

           

          I don't see anywhere where a location is set though.     There should probably be a temporary location set, and then a config option to set a custom one.      Can you file a JIRA on it?