[
https://issues.apache.org/jira/browse/AXIS2-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978265#action_12978265
]
Supun Malinga commented on AXIS2-4718:
--------------------------------------
Hi,
I tested the scenario and got the issue reproduced. Then I validated your wsdl
via the wso2 AppsSrver, wsdl validater. I got the following error.
[0][1]src-resolve.4.2: Error resolving component 'era:Text'.
It was detected that 'era:Text' is in namespace 'http://ws.era.nih.gov/era1ws/',
but components from this namespace are not referenceable from schema document
'file:/home/supun/Build/carbon310/products/appserver/modules/distribution/target/wso2appserver-4.0.0-SNAPSHOT/tmp/temp5374708848716704137.txt'.
If this is the incorrect namespace, perhaps the prefix of 'era:Text' needs to
be changed.
If this is the correct namespace, then an appropriate 'import' tag should be
added to
'file:/home/supun/Build/carbon310/products/appserver/modules/distribution/target/wso2appserver-4.0.0-SNAPSHOT/tmp/temp5374708848716704137.txt'.
[0][1]The part 'paramHelloIn' has an invalid value 'mappedText' defined for its
element.
Element declarations must refer to valid values defined in a schema.[0][1]The
part 'paramHelloOut'
has an invalid value 'mappedText' defined for its element. Element declarations
must refer to
valid values defined in a schema. WSDL DOCUMENT IS INVALID
As I feel this is an issue with not properly handling the namespaces in the
wsdl and the schema. As I feel this is an issue with not properly handling the
namespaces in the wsdl and the schema. Please have a loot in to a above
pointed error.
As a workaround you may try to use the original wsdl in the service and invoke
it via the client.
Resolving the issue as it seems to be related the to the wsdl used.
thanks,
Supun Malinga
> Code generated by WSDL2JAVA is not compatible with original WSDL
> ----------------------------------------------------------------
>
> Key: AXIS2-4718
> URL: https://issues.apache.org/jira/browse/AXIS2-4718
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.5.1
> Environment: Windows XP / Solaris 10
> Reporter: Dmitriy
> Attachments: axis2-issue.zip
>
>
> There is a WSDL file given. When using wsdl2java utilitu to generate service
> skeleton and necessary support classes (ADB bindings), the resulting server
> does not follow the originally used WSDL. Specifically, additional layer of
> elements in the "in" and "out" messages is present in the service, so the
> clients generated using the original WSDL can not communicate with the
> service. In the provided example, the expected message structure is:
> <soap:Body>
> <dvk:mappedText>
> <xsd:mappedText>
> <xsd1:text>?</xsd1:text>
> </xsd:mappedText>
> </dvk:mappedText>
> </dvk:hello>
> </soap:Body>
> but the generated service skeleton expects the following:
> <soap:Body>
> <dvk:hello>
> <dvk:mappedText>
> <xsd:mappedText>
> <xsd1:text>?</xsd1:text>
> </xsd:mappedText>
> </dvk:mappedText>
> </dvk:hello>
> </soap:Body>
> There is an additional level of "wrapping" for the in/out messages (element
> dvk:hello) exists in the generated code preventing the client from
> communicating with the service. The same problem is observed using the
> clients using ADB and XMLBEANS bindings.
> I have small project demonstrating the problem which I will try to attach to
> this ticket.
> Note: I have been able to invoke the generated service using SUAPUI utility
> using the WSDL exported by AXIS under http://<url>?wsdl. The main problem is
> I seem to be unable to use "contract first" approach because the generated
> service is not compatible with originally designed contract.
--
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]