Package org.apache.woden.wsdl20

Examples of org.apache.woden.wsdl20.BindingFault


     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeaderBlock
     * objects parsed from &lt;wsoap:header&lt; elements within a binding &lt;fault&gt; element.
     */
    public void testGetSoapHeaders()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[2];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPHeaderBlock[] actual = soapBindFaultExts.getSoapHeaders();
        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
    }
View Full Code Here


     * Test that the value for the {http error status code} property returned by the
     * <code>getHttpErrorStatusCode</code> method matches the value parsed from the WSDL.
     */
    public void testGetHttpErrorStatusCode()
    {
        BindingFault bindFault = fBindFaults[0];
        HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);
       
        HTTPErrorStatusCode actual = httpBindFaultExts.getHttpErrorStatusCode();
        assertNotNull("The value for http error status code was null", actual);
        assertEquals("Unexpected value for http error status code.",
                123,
                actual.getCode().intValue());

        bindFault = fBindFaults[1];
        httpBindFaultExts =  (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);
       
        actual = httpBindFaultExts.getHttpErrorStatusCode();
View Full Code Here

     * Test that the value for the {http transfer coding} property returned by the
     * <code>getHttpTransferCoding</code> method matches the value from the WSDL.
     */
    public void testGetHttpTransferCoding()
    {
        BindingFault bindFault = fBindFaults[0];
        HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindFaultExts.getHttpContentEncoding();
        assertNotNull("The value for http transfer coding was null", actual);
        assertEquals("Unexpected value for http transfer coding.",
View Full Code Here

     * Test that the OPTIONAL property {http transfer coding} defaults to the Binding's
     * {http transfer coding default} property when whttp:transferCoding is omitted.
     */
    public void testHttpPropertyDefaults()
    {
        BindingFault bindFault = fBindFaults[2];
        HTTPBindingFaultExtensions httpBindFaultExts =  (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);
       
        HTTPErrorStatusCode actual = httpBindFaultExts.getHttpErrorStatusCode();
View Full Code Here

     * Test that the {http headers} property returned by the <code>getHttpHeaders</code>
     * method contains the expected number of HTTPHeader objects parsed from the WSDL.
     */
    public void testGetHttpHeaders()
    {
        BindingFault bindFault = fBindFaults[3];
        HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);

        HTTPHeader[] actual = httpBindFaultExts.getHttpHeaders();
View Full Code Here

 
  int numBindingFaults = bindingFaults.length;
 
  for(int i = 0; i < numBindingFaults; i++)
  {
    BindingFault bindingFault = bindingFaults[i];
      //TODO check if any validation is required here
  }
  }
View Full Code Here

        // Capture all the fault specific properties

        BindingFault[] bindingFaults = binding.getBindingFaults();
        for (int i = 0; i < bindingFaults.length; i++) {
            BindingFault bindingFault = bindingFaults[i];
            InterfaceFault interfaceFault = serviceInterface.getFromAllInterfaceFaults(((BindingFaultElement)bindingFault).getRef());
            AxisBindingMessage axisBindingFault = new AxisBindingMessage();
            axisBindingFault.setFault(true);
            axisBindingFault.setName(interfaceFault.getName().getLocalPart());
            axisBindingFault.setParent(axisBinding);

            addDocumentation(axisBindingFault, interfaceFault.toElement());
            SOAPBindingFaultExtensions soapBindingFaultExtensions;

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

        // Capture all the fault specific properties

        BindingFault[] bindingFaults = binding.getBindingFaults();
        for (int i = 0; i < bindingFaults.length; i++) {
            BindingFault bindingFault = bindingFaults[i];
            InterfaceFault interfaceFault =
                    serviceInterface.getFromAllInterfaceFaults(((BindingFaultElement)bindingFault).getRef());
            AxisBindingMessage axisBindingFault = new AxisBindingMessage();
            axisBindingFault.setFault(true);
            axisBindingFault.setName(interfaceFault.getName().getLocalPart());
            axisBindingFault.setParent(axisBinding);

            addDocumentation(axisBindingFault, interfaceFault.toElement());
            HTTPBindingFaultExtensions httpBindingFaultExtensions;

            try {
                httpBindingFaultExtensions = (HTTPBindingFaultExtensions) bindingFault
                        .getComponentExtensionContext(new URI(WSDL2Constants.URI_WSDL2_HTTP));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }
View Full Code Here

 
  int numBindingFaults = bindingFaults.length;
 
  for(int i = 0; i < numBindingFaults; i++)
  {
    BindingFault bindingFault = bindingFaults[i];
      //TODO check if any validation is required here
  }
  }
View Full Code Here

        // Capture all the fault specific properties

        BindingFault[] bindingFaults = binding.getBindingFaults();
        for (int i = 0; i < bindingFaults.length; i++) {
            BindingFault bindingFault = bindingFaults[i];
            InterfaceFault interfaceFault = bindingFault.getInterfaceFault();

            AxisBindingMessage axisBindingFault = new AxisBindingMessage();
            axisBindingFault.setFault(true);
            axisBindingFault.setName(interfaceFault.getName().getLocalPart());
            axisBindingFault.setParent(axisBinding);

            SOAPBindingFaultExtensions soapBindingFaultExtensions = null;

            try {
                soapBindingFaultExtensions = (SOAPBindingFaultExtensions) bindingFault
                        .getComponentExtensionsForNamespace(new URI(WSDL2Constants.URI_WSDL2_SOAP));
            } catch (URISyntaxException e) {
                throw new AxisFault("Soap Binding Extention not found");
            }
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.BindingFault

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.