You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ben Reif (JIRA)" <ji...@apache.org> on 2009/06/15 17:06:07 UTC

[jira] Created: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
-------------------------------------------------------------------------

                 Key: AXIS2-4378
                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 1.4
            Reporter: Ben Reif


It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.

To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.

To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP, however the output AxisMessage on the AxisOperation is not null.

I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719756#action_12719756 ] 

Ben Reif commented on AXIS2-4378:
---------------------------------

Here's one suggested fix, I'd be curious to hear any feedback.

Modify the code in the populateBindingOperation() method of the org.apache.axis2.deployment.util.Utils Class so that it also checks to see if there is an AxisMessage in addition to checking the MEP:

private static void populateBindingOperation(AxisService axisService,
			AxisBinding axisBinding, AxisBindingOperation axisBindingOperation) {

		AxisOperation axisOperation = axisBindingOperation.getAxisOperation();

		//Fix for AXIS2-4378
//		if (WSDLUtil.isInputPresentForMEP(axisOperation
//				.getMessageExchangePattern())) {
		if (WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
				axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE) != null) {
		//Fix for AXIS2-4378	
			AxisMessage axisInMessage = axisOperation
					.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
			AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();

			axisBindingInMessage.setName(axisInMessage.getName());
			axisBindingInMessage.setDirection(axisInMessage.getDirection());
			axisBindingInMessage.setAxisMessage(axisInMessage);

			axisBindingInMessage.setParent(axisBindingOperation);
			axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
					axisBindingInMessage);
		}

		//Fix for AXIS2-4378
//		if (WSDLUtil.isOutputPresentForMEP(axisOperation
//				.getMessageExchangePattern())) {
		if (WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
				axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE) != null) {
		//Fix for AXIS2-4378	
			AxisMessage axisOutMessage = axisOperation
					.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
			AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();

			axisBindingOutMessage.setName(axisOutMessage.getName());
			axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
			axisBindingOutMessage.setAxisMessage(axisOutMessage);

			axisBindingOutMessage.setParent(axisBindingOperation);
			axisBindingOperation.addChild(
					WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
					axisBindingOutMessage);
		}

		ArrayList faultMessagesList = axisOperation.getFaultMessages();
		for (Iterator iterator2 = faultMessagesList.iterator(); iterator2
				.hasNext();) {
			AxisMessage axisFaultMessage = (AxisMessage) iterator2.next();
			AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage();
            axisBindingFaultMessage.setName(axisFaultMessage.getName());
            axisBindingFaultMessage.setFault(true);
			axisBindingFaultMessage.setAxisMessage(axisFaultMessage);
			axisBindingFaultMessage.setParent(axisBindingOperation);
			axisBindingOperation.addFault(axisBindingFaultMessage);
            axisBinding.addFault(axisBindingFaultMessage);
        }

		axisBindingOperation.setAxisOperation(axisOperation);
		axisBindingOperation.setParent(axisBinding);
	}

> Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4378
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
>
> It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.
> To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.
> To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.
> I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719651#action_12719651 ] 

Ben Reif commented on AXIS2-4378:
---------------------------------

It seems that the proper WSDL generation behavior for one-way operations would be this:

DOC/LIT unwrapped:
    -Do not generate a <wsdl:output> inside the <wsdl:operation> in either the <wsdl:portType> or the <wsdl:binding>

DOC/LIT wrapped: 
Since it's wrapped we still need a wrapper response element (even though it's empty and contains no content), so
    -It should generate a <wsdl:output> inside the <wsdl:operation> in both the <wsdl:portType> and the <wsdl:binding>

Also for operations that take no arguments it should do something similar:

DOC/LIT unwrapped:
    -Do not generate a <wsdl:input> inside the <wsdl:operation> in either the <wsdl:portType> or the <wsdl:binding>

DOC/LIT wrapped: 
Since it's wrapped we still need a wrapper request element (even though it's empty and contains no content), so
    -It should generate a <wsdl:input> inside the <wsdl:operation> in both the <wsdl:portType> and the <wsdl:binding>



> Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4378
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
>
> It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.
> To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.
> To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.
> I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719756#action_12719756 ] 

Ben Reif edited comment on AXIS2-4378 at 6/15/09 1:39 PM:
----------------------------------------------------------

Here's one suggested fix, I'd be curious to hear any feedback.

Modify the code in the populateBindingOperation() method of the org.apache.axis2.deployment.util.Utils Class so that it also checks to see if there is an AxisMessage in addition to checking the MEP:

private static void populateBindingOperation(AxisService axisService,
			AxisBinding axisBinding, AxisBindingOperation axisBindingOperation) {

    AxisOperation axisOperation = axisBindingOperation.getAxisOperation();
   
    //Fix for AXIS2-4378
    if (WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
             axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE) != null) {
    //Fix for AXIS2-4378	
                 AxisMessage axisInMessage = axisOperation
                              .getMessage  (WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                 AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();
                
                 axisBindingInMessage.setName(axisInMessage.getName());
                 axisBindingInMessage.setDirection(axisInMessage.getDirection());
                 axisBindingInMessage.setAxisMessage(axisInMessage);
                  
                  axisBindingInMessage.setParent(axisBindingOperation);
                  axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
                  axisBindingInMessage);
    }
    
    //Fix for AXIS2-4378
    if (WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
            axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE) != null) {
    //Fix for AXIS2-4378	
                   AxisMessage axisOutMessage = axisOperation
                         .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                   AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();
     
                  axisBindingOutMessage.setName(axisOutMessage.getName());
                  axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
                  axisBindingOutMessage.setAxisMessage(axisOutMessage);
                  
                  axisBindingOutMessage.setParent(axisBindingOperation);
                   axisBindingOperation.addChild(
                               WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
                               axisBindingOutMessage);
    }

                   .............................		
}

      was (Author: breif):
    Here's one suggested fix, I'd be curious to hear any feedback.

Modify the code in the populateBindingOperation() method of the org.apache.axis2.deployment.util.Utils Class so that it also checks to see if there is an AxisMessage in addition to checking the MEP:

private static void populateBindingOperation(AxisService axisService,
			AxisBinding axisBinding, AxisBindingOperation axisBindingOperation) {

		AxisOperation axisOperation = axisBindingOperation.getAxisOperation();

		//Fix for AXIS2-4378
//		if (WSDLUtil.isInputPresentForMEP(axisOperation
//				.getMessageExchangePattern())) {
		if (WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
				axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE) != null) {
		//Fix for AXIS2-4378	
			AxisMessage axisInMessage = axisOperation
					.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
			AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();

			axisBindingInMessage.setName(axisInMessage.getName());
			axisBindingInMessage.setDirection(axisInMessage.getDirection());
			axisBindingInMessage.setAxisMessage(axisInMessage);

			axisBindingInMessage.setParent(axisBindingOperation);
			axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
					axisBindingInMessage);
		}

		//Fix for AXIS2-4378
//		if (WSDLUtil.isOutputPresentForMEP(axisOperation
//				.getMessageExchangePattern())) {
		if (WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
				axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE) != null) {
		//Fix for AXIS2-4378	
			AxisMessage axisOutMessage = axisOperation
					.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
			AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();

			axisBindingOutMessage.setName(axisOutMessage.getName());
			axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
			axisBindingOutMessage.setAxisMessage(axisOutMessage);

			axisBindingOutMessage.setParent(axisBindingOperation);
			axisBindingOperation.addChild(
					WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
					axisBindingOutMessage);
		}

		ArrayList faultMessagesList = axisOperation.getFaultMessages();
		for (Iterator iterator2 = faultMessagesList.iterator(); iterator2
				.hasNext();) {
			AxisMessage axisFaultMessage = (AxisMessage) iterator2.next();
			AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage();
            axisBindingFaultMessage.setName(axisFaultMessage.getName());
            axisBindingFaultMessage.setFault(true);
			axisBindingFaultMessage.setAxisMessage(axisFaultMessage);
			axisBindingFaultMessage.setParent(axisBindingOperation);
			axisBindingOperation.addFault(axisBindingFaultMessage);
            axisBinding.addFault(axisBindingFaultMessage);
        }

		axisBindingOperation.setAxisOperation(axisOperation);
		axisBindingOperation.setParent(axisBinding);
	}
  
> Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4378
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
>
> It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.
> To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.
> To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.
> I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Reif updated AXIS2-4378:
----------------------------

    Description: 
It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.

To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.

To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.

I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

  was:
It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.

To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.

To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP, however the output AxisMessage on the AxisOperation is not null.

I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation.


> Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4378
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
>
> It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.
> To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.
> To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.
> I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AXIS2-4378) Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void

Posted by "Ben Reif (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719756#action_12719756 ] 

Ben Reif edited comment on AXIS2-4378 at 6/15/09 1:42 PM:
----------------------------------------------------------

Here's one suggested fix, I'd be curious to hear any feedback.

Modify the code in the populateBindingOperation() method of the org.apache.axis2.deployment.util.Utils Class so that it also checks to see if there is an AxisMessage in addition to checking the MEP:

private static void populateBindingOperation(AxisService axisService,
			AxisBinding axisBinding, AxisBindingOperation axisBindingOperation) {

    AxisOperation axisOperation = axisBindingOperation.getAxisOperation();
   
    //Fix for AXIS2-4378
    if (WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
             axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE) != null) {
    //Fix for AXIS2-4378	
                 AxisMessage axisInMessage = axisOperation
                              .getMessage  (WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                 AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();
                
                 axisBindingInMessage.setName(axisInMessage.getName());
                 axisBindingInMessage.setDirection(axisInMessage.getDirection());
                 axisBindingInMessage.setAxisMessage(axisInMessage);
                  
                  axisBindingInMessage.setParent(axisBindingOperation);
                  axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
                  axisBindingInMessage);
    }
    
    //Fix for AXIS2-4378
    if (WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
            axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE) != null) {
    //Fix for AXIS2-4378	
                   AxisMessage axisOutMessage = axisOperation
                         .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                   AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();
     
                  axisBindingOutMessage.setName(axisOutMessage.getName());
                  axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
                  axisBindingOutMessage.setAxisMessage(axisOutMessage);
                  
                  axisBindingOutMessage.setParent(axisBindingOperation);
                   axisBindingOperation.addChild(
                               WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
                               axisBindingOutMessage);
    }

    ArrayList faultMessagesList = axisOperation.getFaultMessages();
    for (Iterator iterator2 = faultMessagesList.iterator(); iterator2.hasNext();) {
            AxisMessage axisFaultMessage = (AxisMessage) iterator2.next();
           AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage();
           axisBindingFaultMessage.setName(axisFaultMessage.getName());
           axisBindingFaultMessage.setFault(true);
           axisBindingFaultMessage.setAxisMessage(axisFaultMessage);
           axisBindingFaultMessage.setParent(axisBindingOperation);
           axisBindingOperation.addFault(axisBindingFaultMessage);
           axisBinding.addFault(axisBindingFaultMessage);
    }
    
    axisBindingOperation.setAxisOperation(axisOperation);
    axisBindingOperation.setParent(axisBinding);
    
}

      was (Author: breif):
    Here's one suggested fix, I'd be curious to hear any feedback.

Modify the code in the populateBindingOperation() method of the org.apache.axis2.deployment.util.Utils Class so that it also checks to see if there is an AxisMessage in addition to checking the MEP:

private static void populateBindingOperation(AxisService axisService,
			AxisBinding axisBinding, AxisBindingOperation axisBindingOperation) {

    AxisOperation axisOperation = axisBindingOperation.getAxisOperation();
   
    //Fix for AXIS2-4378
    if (WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
             axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE) != null) {
    //Fix for AXIS2-4378	
                 AxisMessage axisInMessage = axisOperation
                              .getMessage  (WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                 AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();
                
                 axisBindingInMessage.setName(axisInMessage.getName());
                 axisBindingInMessage.setDirection(axisInMessage.getDirection());
                 axisBindingInMessage.setAxisMessage(axisInMessage);
                  
                  axisBindingInMessage.setParent(axisBindingOperation);
                  axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
                  axisBindingInMessage);
    }
    
    //Fix for AXIS2-4378
    if (WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern()) ||
            axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE) != null) {
    //Fix for AXIS2-4378	
                   AxisMessage axisOutMessage = axisOperation
                         .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                   AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();
     
                  axisBindingOutMessage.setName(axisOutMessage.getName());
                  axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
                  axisBindingOutMessage.setAxisMessage(axisOutMessage);
                  
                  axisBindingOutMessage.setParent(axisBindingOperation);
                   axisBindingOperation.addChild(
                               WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
                               axisBindingOutMessage);
    }

                   .............................		
}
  
> Java2WSDL - Invalid WSDL for DOC/LIT wrapped operations that return Void 
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4378
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4378
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.4
>            Reporter: Ben Reif
>
> It seems that there is an inconsistency in the generated WSDL, with operations that return void, that comes from the Java2WSDLBuilder. My MEP is http://www.w3.org/ns/wsdl/robust-in-only. After it runs, it generates a <wsdl:output> element in the <wsdl:portType> operation, but there isn't one in the <wsdl:binding> operation definition. This causes some WSDL validators to fail.
> To generate the <wsdl:output> in the <wsdl:portType> it seems that the AxisService2WSDL11.generatePortType() method, it's checking for that MEP and then just checking to make sure that the AxisMessage from the AxisOperation is not null.
> To generate the <wsdl:output> in the <wsdl:binding> it seems that the AxisService2WSDL11.generateSoap11Binding() method is checking for that MEP and then just checking that the AxisBindingMessage on the AxisBindingOperation is not null. In this case I think that the AxisBindingMessage is null, because the WSDLUtil.isOutputPresentForMEP() method is not checking for the Robust-In-Only MEP (which is the trigger to create the AxisBindingMessage ), however the output AxisMessage on the AxisOperation is not null.
> I think that either the WSDLUtil.isOutputPresentForMEP() method should be fixed to check for that MEP, or else the AxisService2WSDL11.generateSoap11Binding() method should also check the output message on the AxisOperation. Another option is to fix the code so that the the <wsdl:operation> is not created in the <wsdl:portType> operation either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.