Examples of WsdlOperation


Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

    QName contentQName = XmlUtils.getQName( contentElm.getDomNode() );
    NodeList contentChildNodes = null;

    for( int c = 0; c < operations.size(); c++ )
    {
      WsdlOperation wsdlOperation = operations.get( c );
      String action = wsdlOperation.getAction();

      // matches soapAction?
      if( !requireSoapActionMatch
          || ( ( soapAction == null && wsdlOperation.getAction() == null ) || ( action != null && action
              .equals( soapAction ) ) ) )
      {
        QName qname = wsdlOperation.getRequestBodyElementQName();

        if( !contentQName.equals( qname ) )
          continue;

        SoapVersion ifaceSoapVersion = wsdlOperation.getInterface().getSoapVersion();

        if( requireSoapVersionMatch && ifaceSoapVersion != soapVersion )
        {
          continue;
        }

        // check content
        if( wsdlOperation.getStyle().equals( WsdlOperation.STYLE_DOCUMENT ) )
        {
          // check that all attachments match
          BindingOperation bindingOperation = wsdlOperation.getBindingOperation();
          Message message = bindingOperation.getOperation().getInput().getMessage();
          List<Part> parts = message.getOrderedParts( null );

          for( int x = 0; x < parts.size(); x++ )
          {
            // check for attachment part
            if( WsdlUtils.isAttachmentInputPart( parts.get( x ), bindingOperation ) )
            {
              for( Attachment attachment : attachments )
              {
                if( attachment.getPart().equals( parts.get( x ).getName() ) )
                {
                  parts.remove( x );
                  x-- ;
                }
              }
            }
            else
            {
              parts.remove( x );
              x-- ;
            }
          }

          // matches!
          if( parts.isEmpty() )
          {
            return wsdlOperation;
          }
        }
        else if( wsdlOperation.getStyle().equals( WsdlOperation.STYLE_RPC ) )
        {
          BindingOperation bindingOperation = wsdlOperation.getBindingOperation();
          Message message = bindingOperation.getOperation().getInput().getMessage();
          List<Part> parts = message.getOrderedParts( null );

          if( contentChildNodes == null )
            contentChildNodes = XmlUtils.getChildElements( ( Element )contentElm.getDomNode() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

    QName contentQName = XmlUtils.getQName( contentElm.getDomNode() );
    NodeList contentChildNodes = null;

    for( int c = 0; c < operations.size(); c++ )
    {
      WsdlOperation wsdlOperation = operations.get( c );
      String action = wsdlOperation.getAction();

      // matches soapAction?
      if( !requireSoapActionMatch
          || ( ( soapAction == null && wsdlOperation.getAction() == null ) || ( action != null && action
              .equals( soapAction ) ) ) )
      {
        QName qname = wsdlOperation.getResponseBodyElementQName();

        if( !contentQName.equals( qname ) )
          continue;

        SoapVersion ifaceSoapVersion = wsdlOperation.getInterface().getSoapVersion();

        if( requireSoapVersionMatch && ifaceSoapVersion != soapVersion )
        {
          continue;
        }

        // check content
        if( wsdlOperation.getStyle().equals( WsdlOperation.STYLE_DOCUMENT ) )
        {
          // matches!
          return wsdlOperation;
        }
        else if( wsdlOperation.getStyle().equals( WsdlOperation.STYLE_RPC ) )
        {
          BindingOperation bindingOperation = wsdlOperation.getBindingOperation();
          Message message = bindingOperation.getOperation().getOutput().getMessage();
          List<Part> parts = message.getOrderedParts( null );

          if( contentChildNodes == null )
            contentChildNodes = XmlUtils.getChildElements( ( Element )contentElm.getDomNode() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

    Set<WsdlInterface> interfaces = new HashSet<WsdlInterface>();

    for( int i = 0; i < mockService.getMockOperationCount(); i++ )
    {
      WsdlOperation operation = mockService.getMockOperationAt( i ).getOperation();
      if( operation != null )
        interfaces.add( operation.getInterface() );
    }

    for( WsdlInterface iface : interfaces )
      iface.getWsdlContext().loadIfNecessary();
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

      SoapVersion soapVersion = mockRequest.getSoapVersion();
      if( soapVersion == null )
        throw new DispatchException( "Unrecognized SOAP Version" );

      String soapAction = mockRequest.getSoapAction();
      WsdlOperation operation = null;

      if( SoapUtils.isSoapFault( mockRequest.getRequestContent(), soapVersion ) )
      {
        // we should inspect fault detail and try to find matching operation
        // but not for now..
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

  public MessagePart[] getResponseParts()
  {
    try
    {
      // init
      WsdlOperation op = getMockOperation().getOperation();
      if( op == null || op.isUnidirectional() )
        return new MessagePart[0];

      List<MessagePart> result = new ArrayList<MessagePart>();
      WsdlContext wsdlContext = op.getInterface().getWsdlContext();
      BindingOperation bindingOperation = op.findBindingOperation( wsdlContext.getDefinition() );

      if( bindingOperation == null )
        return new MessagePart[0];

      // header parts
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

  {
    if( definedAttachmentParts == null )
    {
      try
      {
        WsdlOperation operation = getMockOperation().getOperation();
        if( operation == null )
        {
          definedAttachmentParts = new ArrayList<HttpAttachmentPart>();
        }
        else
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation

  }

  private String writeResponse( WsdlMockResult response, String responseContent ) throws Exception
  {
    MimeMultipart mp = null;
    WsdlOperation operation = getMockOperation().getOperation();
    if( operation == null )
      throw new Exception( "Missing WsdlOperation for mock response" );

    SoapVersion soapVersion = operation.getInterface().getSoapVersion();

    StringToStringMap contentIds = new StringToStringMap();
    boolean isXOP = isMtomEnabled() && isForceMtom();

    // preprocess only if neccessary
View Full Code Here

Examples of com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation

                return action;

            String ns = detail.getFirstChild().getNamespaceURI();
            String name = detail.getFirstChild().getLocalName();

            WSDLOperation o = wbo.getOperation();

            WSDLFault fault = o.getFault(new QName(ns, name));
            if (fault == null)
                return action;

            WSDLOperationImpl impl = (WSDLOperationImpl)o;
            Map<String,String> map = impl.getFaultActionMap();
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLOperation

            return;
        WSDLPortType pt = portTypes.get(portTypeName);
        if(pt == null)
            return;
        for (WSDLBoundOperationImpl bop : boundPortType.getBindingOperations()) {
            WSDLOperation pto = pt.get(bop.getName().getLocalPart());
            WSDLMessage inMsgName = pto.getInput().getMessage();
            if(inMsgName == null)
                continue;
            WSDLMessageImpl inMsg = messages.get(inMsgName.getName());
            int bodyindex = 0;
            if(inMsg != null){
                for(WSDLPartImpl part:inMsg.parts()){
                    String name = part.getName();
                    ParameterBinding pb = bop.getInputBinding(name);
                    if(pb.isBody()){
                        part.setIndex(bodyindex++);
                        part.setBinding(pb);
                        bop.addPart(part, Mode.IN);
                    }
                }
            }
            bodyindex=0;
            if(pto.isOneWay())
                continue;
            WSDLMessage outMsgName = pto.getOutput().getMessage();
            if(outMsgName == null)
                continue;
            WSDLMessageImpl outMsg = messages.get(outMsgName.getName());
            if(outMsg!= null){
                for(WSDLPartImpl part:outMsg.parts()){
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.impl.drivers.webservice.WSDLOperation

        XMLProcess next = XMLHelpers.createSAXHandlerProcess(saxHandler);

        process.setNextProcess(next);

        // Setup the operation and message.
        WSDLOperation operation = new WSDLOperation();
        Message message = new Message();
        WSDriverTestHelpers.setupAmazonOperationMessage(operation,
                message, "Douglas Adams");

        context.setProperty(Operation.class, operation, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.