Package org.ocpsoft.rewrite.util

Examples of org.ocpsoft.rewrite.util.ParameterUtils$BindingOperation


        Interface wsdlInterface = wsdlEndpoint.getBinding().getInterface();
        InterfaceOperation[] wsdlOperations = wsdlInterface.getInterfaceOperations();
        for (int i = 0; i < wsdlOperations.length; i++) {
            // Retrieve binding and extension
            InterfaceOperation wsdlOperation = wsdlOperations[i];
            BindingOperation wsdlBindingOperation = findBindingOperation(wsdlEndpoint.getBinding(), wsdlOperation);
            HTTPBindingOperationExtensions opExt = wsdlBindingOperation != null ? (HTTPBindingOperationExtensions) wsdlBindingOperation.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) : null;
            // Create operation
            Wsdl2HttpOperationImpl operation = new Wsdl2HttpOperationImpl();
            // Standard WSDL2 attributes
            operation.setName(wsdlOperation.getName());
            operation.setMep(wsdlOperation.getMessageExchangePattern());
View Full Code Here


     *
     */
    public InterfaceMessageReference getInterfaceMessageReference()
    {
        InterfaceMessageReference intMsgRef = null;
        BindingOperation bindOp = (BindingOperation)getParent();
        InterfaceOperation intOp = bindOp.getInterfaceOperation();
        if(intOp != null)
        {
            //Determine the "effective" msg label for this binding msg ref.
            NCName effectiveMsgLabel = null;
            if(fMessageLabel != null)
View Full Code Here

     * (non-Javadoc)
     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        //Find parent components.
        BindingOperation bindingOperationComp = (BindingOperation)getParent();
        Binding bindingComp = (Binding)bindingOperationComp.getParent();
        InterfaceOperation interfaceOperationComp = bindingOperationComp.getInterfaceOperation();
       
        //Get needed properties.
        NCName binding = new NCName(bindingComp.getName().getLocalPart());
        QName interfaceOperation = interfaceOperationComp.getName();
       
View Full Code Here

     * from the WSDL.
     */
    public void testGetHttpLocation() {
       
        //test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String expected = "http://ws.apache.woden/location";
        HTTPLocation httpLoc = httpBindOperExts.getHttpLocation();
        String actual = httpLoc.getOriginalLocation();
        assertEquals("Unexpected value for http location",
                expected,
                actual);
       
        //test that the property defaults to null
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPLocation actual2 = httpBindOperExts2.getHttpLocation();
        assertNull("Http location did not default to null", actual2);
View Full Code Here

     * from the WSDL.
     */
    public void testIsHttpLocationIgnoreUncited() {
       
        //test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        Boolean actual = httpBindOperExts.isHttpLocationIgnoreUncited();
        assertTrue("Http location ignore uncited was not True",
                actual.booleanValue());
       
        //test that the property defaults to false
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        Boolean actual2 = httpBindOperExts2.isHttpLocationIgnoreUncited();
        assertFalse("Http location ignore uncited did not default to False",
View Full Code Here

     * to reflect that change.
     */
    public void testGetHttpMethod() {
       
        //test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindOperExts.getHttpMethod();
        assertEquals("Unexpected value for http method.",
                "GET",
                actual);
       
        //test that the property defaults to null
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindOperExts2.getHttpMethod();
        assertNull("Http method was not null by default.",
View Full Code Here

     * or POST).
     */
    public void testGetHttpInputSerialization() {
       
        //1. test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindOperExts.getHttpInputSerialization();
        assertEquals("Unexpected value for http input serialization.",
                "text/plain",
                actual);
       
        //2. test that the property defaults to application/xml if the http method
        //defaults to POST.
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindOperExts2.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
                "application/xml",
                actual2);
       
        //3. test that the property defaults to application/x-www-form-urlencoded
        //if the http method is GET.
        BindingOperation oper3 = fBindOpers[2];
        HTTPBindingOperationExtensions httpBindOperExts3 =
            (HTTPBindingOperationExtensions) oper3
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual3 = httpBindOperExts3.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
                "application/x-www-form-urlencoded",
                actual3);
       
        //4. test that the property defaults to application/x-www-form-urlencoded
        //if the http method is DELETE.
        BindingOperation oper4 = fBindOpers[3];
        HTTPBindingOperationExtensions httpBindOperExts4 =
            (HTTPBindingOperationExtensions) oper4
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual4 = httpBindOperExts4.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
                "application/x-www-form-urlencoded",
                actual4);
       
        //5. test that the property defaults to application/xml
        //if the http method is PUT.
        BindingOperation oper5 = fBindOpers[4];
        HTTPBindingOperationExtensions httpBindOperExts5 =
            (HTTPBindingOperationExtensions) oper5
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual5 = httpBindOperExts5.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
                "application/xml",
                actual5);
       
        //6. test that the property defaults to application/xml
        //if the http method is POST.
        BindingOperation oper6 = fBindOpers[5];
        HTTPBindingOperationExtensions httpBindOperExts6 =
            (HTTPBindingOperationExtensions) oper6
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual6 = httpBindOperExts6.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
                "application/xml",
                actual6);
       
        //7. test that the property defaults to application/xml
        //if the http method is CONNECT.
        BindingOperation oper7 = fBindOpers[6];
        HTTPBindingOperationExtensions httpBindOperExts7 =
            (HTTPBindingOperationExtensions) oper7
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual7 = httpBindOperExts7.getHttpInputSerialization();
        assertEquals("Unexpected default value for http input serialization.",
View Full Code Here

     * from the WSDL.
     */
    public void testGetHttpOutputSerialization() {
       
        //1. test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindOperExts.getHttpOutputSerialization();
        assertEquals("Unexpected value for http output serialization.",
                "text/plain",
                actual);
       
        //2. test that the property defaults to application/xml.
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindOperExts2.getHttpOutputSerialization();
        assertEquals("Unexpected default value for http output serialization.",
View Full Code Here

     * from the WSDL.
     */
    public void testGetHttpFaultSerialization() {
       
        //1. test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindOperExts.getHttpFaultSerialization();
        assertEquals("Unexpected value for http fault serialization.",
                "text/html",
                actual);
       
        //2. test that the property defaults to application/xml.
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindOperExts2.getHttpFaultSerialization();
        assertEquals("Unexpected default value for http fault serialization.",
View Full Code Here

     * from the WSDL.
     */
    public void testGetHttpQueryParameterSeparator() {
       
        //1. test that the property is parsed correctly from the WSDL
        BindingOperation oper = fBindOpers[0];
        HTTPBindingOperationExtensions httpBindOperExts =
            (HTTPBindingOperationExtensions) oper
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindOperExts.getHttpQueryParameterSeparator();
        assertEquals("Unexpected value for http query parameter separator.",
                "%",
                actual);
       
        //2. test that the property defaults to ampersand.
        BindingOperation oper2 = fBindOpers[1];
        HTTPBindingOperationExtensions httpBindOperExts2 =
            (HTTPBindingOperationExtensions) oper2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual2 = httpBindOperExts2.getHttpQueryParameterSeparator();
        assertNull("Expected a null value for http query parameter separator.",
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.util.ParameterUtils$BindingOperation

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.