Package org.jboss.internal.soa.esb.publish

Examples of org.jboss.internal.soa.esb.publish.ContractInfo


    }

    private void execTransformTest(Action actionConfig, String expected) throws ConfigurationException, SAXException, IOException, ParserConfigurationException {
        TestWsdlContractPublisher publisher = new TestWsdlContractPublisher();
        publisher.setActionConfig(actionConfig);
        ContractInfo contractInfo = publisher.getContractInfo(new EPR(URI.create("http://x.y.x:8989/")));

        assertTrue("XML Comparison", XMLHelper.compareXMLContent(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData())));
    }
View Full Code Here


  }
 
  public synchronized ContractInfo getContractInfo(ServicePublisher servicePublisher, EPR epr, HttpServletRequest request)
  {
    Key key = new Key(servicePublisher, epr, request);
    ContractInfo value = CACHE.get(key);
    if (value == null)
    {
      ContractPublisher contractPublisher = servicePublisher.getContractPublisher();
      if (contractPublisher != null)
      {
View Full Code Here

    }
   
    private void handleWsdlRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    String mimeType;
    String data;
    ContractInfo contract = getContract();
    if (contract != null) {
      mimeType = contract.getMimeType();
      String resource = req.getParameter("resource");
      if (resource != null) {
        data = contract.getResource(resource);
      } else {
        data = contract.getData();
      }
      if (data != null) {
        data = data.replaceAll( "@REQUEST_URL@", req.getRequestURL().toString() );
      } else {
        data = "";
View Full Code Here

        String wsdlAddress = getWsdlAddress();
        if (wsdlAddress != null) {
            String targetServiceCat = servletRequest.getParameter("serviceCat");
            String targetServiceName = servletRequest.getParameter("serviceName");
            String targetProtocol = servletRequest.getParameter("protocol");
            ContractInfo contract;
            try {
                // Generate the WSDL...
                contract = getContractInfo(Service.getService(targetServiceCat, targetServiceName), wsdlAddress);
                String data = contract.getData();
                if (data != null) {
                  contract.setData( updateWsdl(data, epr, targetServiceCat, targetServiceName, targetProtocol) );
                } else {
                  throw new Exception("null Contract data");
                }
            } catch (Exception e) {
              String e_msg = "Failed to load WSDL contract information from address '" + wsdlAddress + "': " + e.getMessage();
              logger.error(e_msg, e);
              contract = new ContractInfo("text/xml", "<definitions><!-- " + e_msg + " --></definitions>");
            }
            return contract;
        } else {
            logger.warn("Requested contract info for unknown webservice endpoint.");
            return null;
View Full Code Here

            return null;
        }
    }
   
    public ContractInfo getContractInfo(Service service, String wsdlAddress) throws IOException {
      return new ContractInfo( "text/xml", getWsdl(wsdlAddress) );
    }
View Full Code Here

    return provideContract(service, null);
  }
 
  public ContractInfo provideContract(Service service, String endpointAddressOverride) throws IOException
  {
    ContractInfo contract;
    if (endpointAddressOverride != null)
    {
      try
      {
        initializeTransformer();
View Full Code Here

    return file;
  }
 
  public ContractInfo load(boolean rewriteLocation) throws IOException
  {
    contract = new ContractInfo();
    this.rewriteLocation = rewriteLocation;
    String address = getAddress();
    String protocol = URI.create(address).getScheme();
    primary_file = createTempFile(protocol, ".wsdl");
    getPuller().pull(address, primary_file);
View Full Code Here

TOP

Related Classes of org.jboss.internal.soa.esb.publish.ContractInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.