Examples of BindingMessageReference


Examples of org.apache.woden.wsdl20.BindingMessageReference

            // Messages
            InterfaceMessageReference[] iMsgRefs = wsdlOperation.getInterfaceMessageReferences();
            for (int j = 0; j < iMsgRefs.length; j++) {
                // Retrieve binding and extension
                InterfaceMessageReference iMsgRef = iMsgRefs[j];
                BindingMessageReference bMsgRef = findBindingMessage(wsdlBindingOperation, iMsgRef);
                HTTPBindingMessageReferenceExtensions msgExt = bMsgRef != null ? (HTTPBindingMessageReferenceExtensions) bMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) : null;
                // Create message
                Wsdl2HttpMessageImpl message = new Wsdl2HttpMessageImpl();
                // Standard WSDL2 attributes
                message.setContentModel(ContentModel.parse(iMsgRef.getMessageContentModel()));
                message.setElementName(iMsgRef.getElementDeclaration().getName());
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference


            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];

                AxisBindingMessage axisBindingMessage = new AxisBindingMessage();
                axisBindingMessage.setParent(axisBindingOperation);
                addDocumentation(axisBindingMessage, bindingMessageReference.toElement());
                AxisMessage axisMessage = axisOperation.getMessage(bindingMessageReference
                        .getInterfaceMessageReference().getMessageLabel().toString());

                axisBindingMessage.setAxisMessage(axisMessage);
                axisBindingMessage.setName(axisMessage.getName());
                axisBindingMessage.setDirection(axisMessage.getDirection());


                SOAPBindingMessageReferenceExtensions soapBindingMessageReferenceExtensions;
                try {
                    soapBindingMessageReferenceExtensions =
                            (SOAPBindingMessageReferenceExtensions) bindingMessageReference
                                    .getComponentExtensionContext(
                                            new URI(WSDL2Constants.URI_WSDL2_SOAP));
                } catch (URISyntaxException e) {
                    throw new AxisFault("Soap Binding Extention not found");
                }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];

                AxisBindingMessage axisBindingMessage = new AxisBindingMessage();
                axisBindingMessage.setParent(axisBindingOperation);

                AxisMessage axisMessage = axisOperation.getMessage(bindingMessageReference
                        .getInterfaceMessageReference().getMessageLabel().toString());

                axisBindingMessage.setAxisMessage(axisMessage);
                axisBindingMessage.setName(axisMessage.getName());
                axisBindingMessage.setDirection(axisMessage.getDirection());

                addDocumentation(axisBindingMessage, bindingMessageReference.toElement());
                HTTPBindingMessageReferenceExtensions httpBindingMessageReferenceExtensions;
                try {
                    httpBindingMessageReferenceExtensions =
                            (HTTPBindingMessageReferenceExtensions) bindingMessageReference
                                    .getComponentExtensionContext(
                                            new URI(WSDL2Constants.URI_WSDL2_HTTP));
                } catch (URISyntaxException e) {
                    throw new AxisFault("HTTP Binding Extention not found");
                }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

       
        BindingMessageReference[] bindMsgRefs = fBindOpers[0].getBindingMessageReferences();
        assertEquals("The first BindingOperation should contain 2 BindingMessageReference components.", 2, bindMsgRefs.length);
       
        //1. test that the property is parsed correctly from the WSDL
        BindingMessageReference inputMsg = bindMsgRefs[0];
        HTTPBindingMessageReferenceExtensions httpBindMsgRefExts =
            (HTTPBindingMessageReferenceExtensions) inputMsg
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindMsgRefExts.getHttpContentEncoding();
        assertEquals("Unexpected value for http content encoding.",
                "compress",
                actual);
       
        //2. test the default is null
        BindingMessageReference outputMsg = bindMsgRefs[1];
        HTTPBindingMessageReferenceExtensions httpBindMsgRefExts2 =
            (HTTPBindingMessageReferenceExtensions) outputMsg
                .getComponentExtensionContext(
                    HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindMsgRefExts2.getHttpContentEncoding();
        assertNull("Null was expected for http content encoding.",
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

       
        BindingMessageReference[] bindMsgRefs = fBindOpers[0].getBindingMessageReferences();
        assertEquals("The first BindingOperation should contain 2 BindingMessageReference components.", 2, bindMsgRefs.length);
       
        //1. test for 2 HTTPHeader components
        BindingMessageReference inputMsg = bindMsgRefs[0];
        HTTPBindingMessageReferenceExtensions httpBindMsgRefExts =
            (HTTPBindingMessageReferenceExtensions) inputMsg
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPHeader[] actual = httpBindMsgRefExts.getHttpHeaders();
        assertEquals("Unexpected size of {http headers}.",
                2,
                actual.length);
       
        //2. test the default
        BindingMessageReference outputMsg = bindMsgRefs[1];
        HTTPBindingMessageReferenceExtensions httpBindMsgRefExts2 =
            (HTTPBindingMessageReferenceExtensions) outputMsg
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPHeader[] actual2 = httpBindMsgRefExts2.getHttpHeaders();
        assertEquals("Unexpected size of {http headers}.",
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects
     * parsed from &lt;wsoap:module&gt; elements within an &lt;input&gt; element.
     */
    public void testGetSoapModules_input()
    {
        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);

        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
        Direction direction = bindMsgRefEl.getDirection();
        assertTrue("The BindingMessageReference does not represent an <input> element.", Direction.IN.equals(direction));

        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
        assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
    }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects
     * parsed from &lt;wsoap:module&gt; elements within an &lt;output&gt; element.
     */
    public void testGetSoapModules_output()
    {
        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
        assertNotNull("The BindingOperation does not contain a second BindingMessageReference.", bindMsgRef);

        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
        Direction direction = bindMsgRefEl.getDirection();
        assertTrue("The BindingMessageReference does not represent an <output> element.", Direction.OUT.equals(direction));

        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
    }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects
     * parsed from &lt;wsoap:header&gt; elements within an &lt;input&gt; element.
     */
    public void testGetSoapHeaders_input()
    {
        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);

        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
    }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects
     * parsed from &lt;wsoap:header&gt; elements within an &lt;output&gt; element.
     */
    public void testGetSoapHeaders_output()
    {
        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
        assertNotNull("The BindingOperation does not contain the expected BindingMessageReference.", bindMsgRef);

        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 1, actual.length);
    }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingMessageReference

   
    int numBindingMessageReferences = bindingMessageReferences.length;
   
    for(int i = 0; i < numBindingMessageReferences; i++)
    {
    BindingMessageReference bindingMessageReference = bindingMessageReferences[i];
        //TODO check if any validation is required here
    }
  }
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.