[
https://issues.apache.org/jira/browse/AXIS2-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560478#action_12560478
]
Rich Scheuerle commented on AXIS2-3457:
---------------------------------------
Amila,
I see your point. Thanks for the thorough explanation.
I understand that we always want to throw the exception for SOAP RPC, and yes I
will make that exception more descriptive.
But for the HTTP case, we could change the code to indicate that it is
"possibly" wrapped.
Something like the following:
First assume that wrappableOperations is a list of
BindingOperationEntry's, where we can add some additional state (like
isHTTPBinding).
Then in addPartToElement we detect that the BindingEntryOperation is
isHTTPBinding and that the message (in) is an element.
Instead of throwing an exception, we set isInWrapped=false.
Then the following code would be changed to something like.
if (isSetMessageQNames) {
BindingOperationEntry boe =
getBindingOperationEntry(wrappableOperations, wsdl4jBindingOperation);
boolean isWrapped = (boe == null) ? false : boe.isWrapped;
addQNameReference(axisInMessage, wsdl4jOperation,
wsdl4jBindingInput,
isWrapped);
}
By introducing a BindingOperation, it is now easier to carry around state
about the BindingOperation. This gives us more flexibility.
Comments ?
> Incorrect Exception in WSDL11ToAxisServiceBuilder
> -------------------------------------------------
>
> Key: AXIS2-3457
> URL: https://issues.apache.org/jira/browse/AXIS2-3457
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Background
> WSDL11ToAxisServiceBuilder contains code to produce schema "wrapper" code
> for selected BindingOperations (i.e. RPC literal bindings).
>
> Problem:
> I have a WSDL with several bindings, one of them is an HTTP Binding. The
> current code determines that its BindingOperations require wrappering, but
> during the schema generation it throws the following error because it
> incorrectly assumes that the BindingOperation is RPC/literal.
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder populateService
> RPC-literal type message part Body should have a type attribute
> Proposed Solution:
> I have just started working on this issue. My thought is to introduce a
> private inner class BindingOperationEntry. The BindingOperationEntry will
> contain the BindingOperation and information about the BindingOperation (i.e.
> isRPC()).
> The findWrappableBindingOperations(Binding binding) method will be changed to
> return a List of BindingOperationEntry instead of List of BindingOperation.
> Later processing can then easily distinguish between RPC and HTTP usage.
> In addition, I am going to upgrade the exception message (which confused the
> user) and add some additional trace.
> This solution has minimal impact on the existing structure of
> WSDL11ToAxisServiceBuilder, which is why I pursuing this approach.
> Comments ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]