1 Reply Latest reply on Jan 26, 2016 9:34 AM by Prathmesh Phadnis

    JBoss ESB SOAPProxy xsd propagation

    Zsombor Varga Newbie

      I have a simple web service. I created a SOAPProxy action in ESB to proxy that external webservice.

      My jboss-esb.xml:

      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb 
          xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
           parameterReloadSecs="5">
            <services>
              <service category="ZsomWS1Proxy" description="ZsomWS1 Proxy" invmScope="GLOBAL" name="ZsomWS1ProxyService">
                  <security moduleName="soa" rolesAllowed="ws_admin" />
                  <listeners>
                      <http-gateway name="ZsomWS1Proxy_Gateway" urlPattern="ZsomWS1/WebService1">
                          <property name="synchronousTimeout" value="200000"/>
                      </http-gateway>
                  </listeners>
                  <actions mep="RequestResponse">
                      <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy">
                          <property name="wsdl" value="classpath:///wsdl/WebService1GF_1.wsdl"/>
                          <property name="clientCredentialsRequired" value="false"/>
                          <property name="endpointUrl" value="http://192.168.1.61:8080/ZsomWS1/WebService1"/>
                          <property name="http.connection.timeout" value="200000"/>
                          <property name="http.socket.timeout" value="200000"/>
                      </action>
                   </actions>
              </service>
              
          </services>
      
      </jbossesb>
      

       

      My wsdl, which is located in my wdl folder:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="http://zsom/webservice1" name="WebService1Service" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://zsom/webservice1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
        <types>
          <xsd:schema>
            <xsd:import namespace="http://zsom/webservice1" schemaLocation="WebService1.xsd"/>
          </xsd:schema>
        </types>
        ....
      
      

       

      Evrything is working fine, but if i open the published wsdl from the contract page (http://zsom:8088/contract/)

      I get this :

       

      <definitions name="WebService1Service" targetNamespace="http://zsom/webservice1">
          <types>
              <xsd:schema>
                  <xsd:import namespace="http://zsom/webservice1" schemaLocation="http://zsom:8088/ESBProxy1/http/ZsomWS1/WebService1?wsdl&resource=classpath-5901263382351811994.tmp&protocol=http"/>
              </xsd:schema>
          </types>
      

       

      The URL of the xsd is kind of a random name: resource=classpath-5901263382351811994.tmp

      If I deploy this esb to an clustered enviroment each node will get different URL's for my xsd.


      So if a client request my wsdl from node1 then the client will get xsdUrl1. After it the client wants to get the xsd from xsdUrl1. But the loadbalancer doesn't guarantee the this request will be served from the same node.So if this request is served from an other node, this will cause a HTTP 404, because in node2 my xsd has a different URL.


      My question is, how can I force ESB to use my xsd name (Webservice1.xsd) as an URL, or generate the same name on all nodes?


      Thanks!


      Zsom