com.ebmwebsourcing.easyviper.environment.test.util
Class MockServiceBuilder

java.lang.Object
  extended by com.ebmwebsourcing.easyviper.environment.test.util.MockServiceBuilder

public class MockServiceBuilder
extends java.lang.Object


Constructor Summary
MockServiceBuilder()
           
 
Method Summary
static void addMessageExchangeInstances2Operation(Operation op, java.io.File requestXmlFile, java.lang.String requestMessageName, java.io.File responseXmlFile, java.lang.String responseMessageName, java.io.File faultXmlFile, java.lang.String faultMessageName, java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
           
static org.jdom.Element buildContent(java.io.File xmlFile)
          Return a jdom Element corresponding to the root element of the Xml given file
static com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage buildMessage(javax.xml.namespace.QName serviceName, java.lang.String endpointName, java.io.File xmlFile, java.lang.String messageName, java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
           
static Operation buildOperation(java.lang.String operationName, Service service, java.io.File requestXmlFile, java.lang.String requestMessageName, java.io.File responseXmlFile, java.lang.String responseMessageName, java.io.File faultXmlFile, java.lang.String faultMessageName, java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
          Build a full Operation object with all information set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServiceBuilder

public MockServiceBuilder()
Method Detail

buildOperation

public static Operation buildOperation(java.lang.String operationName,
                                       Service service,
                                       java.io.File requestXmlFile,
                                       java.lang.String requestMessageName,
                                       java.io.File responseXmlFile,
                                       java.lang.String responseMessageName,
                                       java.io.File faultXmlFile,
                                       java.lang.String faultMessageName,
                                       java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
                                throws com.ebmwebsourcing.easyviper.core.api.CoreException
Build a full Operation object with all information set. If there is no response set, the operation is "InOnly"; InOut otherwise.

Parameters:
namespace - the namespace of the interface. used as ns for all operation parameters
operationName - the operation name
serviceName - the service name
endpointName - the endpoint name
requestXmlFile - file containing the attempted request
requestMessageName - request message name
responseXmlFile - file containing the response to return may be null if no response is returned
responseMessageName - response message name may be null if no response is returned
faultXmlFile - file containing the fault to return may be null if no response is returned
faultMessageName - fault message name may be null if no response is returned
Returns:
the corresponding operation
Throws:
java.io.IOException
org.jdom.JDOMException
com.ebmwebsourcing.easyviper.core.api.CoreException

addMessageExchangeInstances2Operation

public static void addMessageExchangeInstances2Operation(Operation op,
                                                         java.io.File requestXmlFile,
                                                         java.lang.String requestMessageName,
                                                         java.io.File responseXmlFile,
                                                         java.lang.String responseMessageName,
                                                         java.io.File faultXmlFile,
                                                         java.lang.String faultMessageName,
                                                         java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
                                                  throws com.ebmwebsourcing.easyviper.core.api.CoreException
Throws:
com.ebmwebsourcing.easyviper.core.api.CoreException

buildMessage

public static com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage buildMessage(javax.xml.namespace.QName serviceName,
                                                                                             java.lang.String endpointName,
                                                                                             java.io.File xmlFile,
                                                                                             java.lang.String messageName,
                                                                                             java.lang.Class<? extends com.ebmwebsourcing.easyviper.core.api.soa.message.ExternalMessage> clazz)
                                                                                      throws com.ebmwebsourcing.easyviper.core.api.CoreException
Parameters:
namespace - the namespace of the interface
serviceName -
endpointName -
xmlFile -
messageName -
Returns:
Throws:
com.ebmwebsourcing.easyviper.core.api.CoreException
org.jdom.JDOMException
java.io.IOException

buildContent

public static org.jdom.Element buildContent(java.io.File xmlFile)
                                     throws org.jdom.JDOMException,
                                            java.io.IOException
Return a jdom Element corresponding to the root element of the Xml given file

Parameters:
xmlFile -
Returns:
Throws:
java.io.IOException
org.jdom.JDOMException


Copyright © 2009 eBM WebSourcing. All Rights Reserved.