Package org.xmlsoap.schemas.ws.x2004.x03.rm.impl

Examples of org.xmlsoap.schemas.ws.x2004.x03.rm.impl.DirectionImpl


    return file;
  }

  private void addMessageConfig( Log log, WsdlMockResponse modelItem ) throws MalformedURLException
  {
    HttpMessageEntry requestMessage = HttpMessageEntry.Factory.newInstance();
    WsdlMockRequest mockRequest = modelItem.getMockResult().getMockRequest();
    requestMessage.addNewMessageContent().setStringValue( mockRequest.getRequestContent() );
    requestMessage.setConversationID( "1" );
    requestMessage.setTimestamp( Calendar.getInstance() );
    requestMessage.setID( "1" );
    MockService mockService = modelItem.getMockOperation().getMockService();
    URL endpoint = new URL( "http://127.0.0.1:" + mockService.getPort() + mockService.getPath() );
    requestMessage.setSenderHostAndPort( "localhost" );

    if( endpoint.getPort() > 0 )
      requestMessage.setReceiverHostAndPort( endpoint.getHost() + ":" + endpoint.getPort() );
    else
      requestMessage.setReceiverHostAndPort( endpoint.getHost() );

    requestMessage.setType( TcpMessageType.REQUEST );

    HttpMessageEntry responseMessage = HttpMessageEntry.Factory.newInstance();
    responseMessage.addNewMessageContent().setStringValue( modelItem.getMockResult().getResponseContent() );
    responseMessage.setConversationID( "1" );
    responseMessage.setType( TcpMessageType.RESPONSE );
    responseMessage.setTimestamp( Calendar.getInstance() );
    responseMessage.setID( "2" );
    responseMessage.setSenderHostAndPort( requestMessage.getReceiverHostAndPort() );
    responseMessage.setReceiverHostAndPort( requestMessage.getSenderHostAndPort() );

    String requestHeaders = buildHttpHeadersString( mockRequest.getRequestHeaders() );
    requestMessage.setHttpHeaders( "POST " + mockRequest.getPath() + " " + mockRequest.getProtocol() + "\r\n"
        + requestHeaders );

    responseMessage.setHttpHeaders( "HTTP/1.1 200 OK"
        + buildHttpHeadersString( modelItem.getMockResult().getResponseHeaders() ) );

    log.setMessageEntryArray( new MessageEntry[] { requestMessage, responseMessage } );
  }
View Full Code Here


        configDoc.save(file);
        return file;
    }

    private void addMessageConfig(Log log, WsdlRequest modelItem) throws MalformedURLException {
        HttpMessageEntry requestMessage = HttpMessageEntry.Factory.newInstance();
        requestMessage.addNewMessageContent().setStringValue(modelItem.getRequestContent());
        requestMessage.setConversationID("1");
        requestMessage.setTimestamp(Calendar.getInstance());
        requestMessage.setID("1");
        URL endpoint = new URL(modelItem.getEndpoint());
        requestMessage.setSenderHostAndPort("localhost");

        if (endpoint.getPort() > 0) {
            requestMessage.setReceiverHostAndPort(endpoint.getHost() + ":" + endpoint.getPort());
        } else {
            requestMessage.setReceiverHostAndPort(endpoint.getHost());
        }

        requestMessage.setType(TcpMessageType.REQUEST);

        Response response = modelItem.getResponse();
        HttpMessageEntry responseMessage = HttpMessageEntry.Factory.newInstance();
        responseMessage.addNewMessageContent().setStringValue(response.getContentAsString());
        responseMessage.setConversationID("1");
        responseMessage.setType(TcpMessageType.RESPONSE);
        responseMessage.setTimestamp(Calendar.getInstance());
        responseMessage.setID("2");
        responseMessage.setSenderHostAndPort(requestMessage.getReceiverHostAndPort());
        responseMessage.setReceiverHostAndPort(requestMessage.getSenderHostAndPort());

        String requestHeaders = buildHttpHeadersString(response.getRequestHeaders());
        requestMessage.setHttpHeaders("POST " + endpoint.getPath() + " HTTP/1.1\r\n" + requestHeaders);

        responseMessage.setHttpHeaders(buildHttpHeadersString(response.getResponseHeaders()));

        log.setMessageEntryArray(new MessageEntry[]{requestMessage, responseMessage});
    }
View Full Code Here

    NameVersionPair xpConf = env.addNewXmlParser();
    xpConf.setName( "xmlbeans" );
    xpConf.setVersion( "2.1.0" );

    Implementation implConf = monitor.addNewImplementer();
    implConf.setName( "soapui" );
    implConf.setLocation( "here" );
  }
View Full Code Here

    NameVersionPair xpConf = env.addNewXmlParser();
    xpConf.setName( "xmlbeans" );
    xpConf.setVersion( "2.2.0" );

    Implementation implConf = monitor.addNewImplementer();
    implConf.setName( "soapui" );
    implConf.setLocation( "here" );
  }
View Full Code Here

        NameVersionPair xpConf = env.addNewXmlParser();
        xpConf.setName("xmlbeans");
        xpConf.setVersion("2.1.0");

        Implementation implConf = monitor.addNewImplementer();
        implConf.setName("soapui");
        implConf.setLocation("here");
    }
View Full Code Here

  }

  private File buildLog( WsdlRequest modelItem ) throws Exception
  {
    LogDocument logDoc = LogDocument.Factory.newInstance();
    Log log = logDoc.addNewLog();
    log.setTimestamp( Calendar.getInstance() );

    addMonitorConfig( log );
    addMessageConfig( log, modelItem );

    logFile = File.createTempFile( "wsi-analyzer-log", ".xml" );
View Full Code Here

  }

  private File buildLog( WsdlMockResponse modelItem ) throws Exception
  {
    LogDocument logDoc = LogDocument.Factory.newInstance();
    Log log = logDoc.addNewLog();
    log.setTimestamp( Calendar.getInstance() );

    addMonitorConfig( log );
    addMessageConfig( log, modelItem );

    logFile = File.createTempFile( "wsi-analyzer-log", ".xml" );
View Full Code Here

        return builder;
    }

    private File buildLog(WsdlRequest modelItem) throws Exception {
        LogDocument logDoc = LogDocument.Factory.newInstance();
        Log log = logDoc.addNewLog();
        log.setTimestamp(Calendar.getInstance());

        addMonitorConfig(log);
        addMessageConfig(log, modelItem);

        logFile = File.createTempFile("wsi-analyzer-log", ".xml");
View Full Code Here

    return builder;
  }

  private File buildLog( WsdlRequest modelItem ) throws Exception
  {
    LogDocument logDoc = LogDocument.Factory.newInstance();
    Log log = logDoc.addNewLog();
    log.setTimestamp( Calendar.getInstance() );

    addMonitorConfig( log );
    addMessageConfig( log, modelItem );

    logFile = File.createTempFile( "wsi-analyzer-log", ".xml" );
    logDoc.save( logFile );
    return logFile;
  }
View Full Code Here

    return builder;
  }

  private File buildLog( WsdlMockResponse modelItem ) throws Exception
  {
    LogDocument logDoc = LogDocument.Factory.newInstance();
    Log log = logDoc.addNewLog();
    log.setTimestamp( Calendar.getInstance() );

    addMonitorConfig( log );
    addMessageConfig( log, modelItem );

    logFile = File.createTempFile( "wsi-analyzer-log", ".xml" );
    logDoc.save( logFile );
    return logFile;
  }
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2004.x03.rm.impl.DirectionImpl

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.