Package org.xmlsoap.schemas.ws.x2003.x03.addressing

Examples of org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedQName


    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


    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

    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

  }

  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" );
    logDoc.save( logFile );
    return logFile;
  }
View Full Code Here

    log.setMessageEntryArray( new MessageEntry[] { requestMessage, responseMessage } );
  }

  private void addMonitorConfig( Log log ) throws Exception
  {
    Monitor monitor = log.addNewMonitor();

    monitor.setVersion( "1.5" );
    monitor.setReleaseDate( Calendar.getInstance() );

    org.wsI.testing.x2003.x03.monitorConfig.Configuration conf = monitor.addNewConfiguration();
    conf.setCleanupTimeoutSeconds( 0 );
    conf.setLogDuration( 0 );

    org.wsI.testing.x2003.x03.monitorConfig.LogFile logFileConf = conf.addNewLogFile();
    logFileConf.setLocation( "report.xml" );
    logFileConf.setReplace( true );

    /*
     * ArrayOfRedirectConfig mintConf = conf.addNewManInTheMiddle();
     * RedirectConfig redirect = mintConf.addNewRedirect();
     * redirect.setListenPort( 9999 ); redirect.setMaxConnections( 10 );
     * redirect.setReadTimeoutSeconds( 10 );
     *
     * URL endpoint = new URL( modelItem.getEndpoint()); if(
     * endpoint.getPort() > 0 ) redirect.setSchemeAndHostPort(
     * endpoint.getHost() + ":" + endpoint.getPort()); else
     * redirect.setSchemeAndHostPort( endpoint.getHost() );
     */

    Environment env = monitor.addNewEnvironment();
    NameVersionPair osConf = env.addNewOperatingSystem();
    osConf.setName( "Windows" );
    osConf.setVersion( "2003" );

    NameVersionPair rtConf = env.addNewRuntime();
    rtConf.setName( "java" );
    rtConf.setVersion( "1.5" );

    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

     * endpoint.getHost() + ":" + endpoint.getPort()); else
     * redirect.setSchemeAndHostPort( endpoint.getHost() );
     */

    Environment env = monitor.addNewEnvironment();
    NameVersionPair osConf = env.addNewOperatingSystem();
    osConf.setName( "Windows" );
    osConf.setVersion( "2003" );

    NameVersionPair rtConf = env.addNewRuntime();
    rtConf.setName( "java" );
    rtConf.setVersion( "1.5" );

    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

            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
        }
        AttributedQName portTypeType = consumerReference.getPortType();
        if (portTypeType != null) {
            QName portType = portTypeType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpoints(portType);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedQName

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.