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 Joe Smithian <jo...@gmail.com> on 2008/05/16 17:14:21 UTC
[axis2] Axis2 1.4 Wsdl2Java problems/bugs
Hi all
I just downloaded and installed AXIS2-1.4 today. I tried wsdl2java and I was
pleased that some bugs such as "unexpected token: staticabstract" have been
fixed. Many thanks to the Axis2 development team. I experienced the
following problems:
====== 1- wsdl2java errors ==========
1- When I tried to generate the client stub, I got the following errors from
WSDL2java which are the same problems in axis2-1.3:
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
'file:/C:/wsdl/myService.wsdl'.
- Type {urn:oasis:names:tc:SAML:1.0:assertion}SubjectConfirmationData
missing!
- Type {urn:oasis:names:tc:SAML:1.0:assertion}AttributeValue missing!
- Could not find any schema type associated with the Element
'{urn:oasis:names:tc:dss:1.0:core:schema}ReturnVerificationTimeInfo'
- Could not find any schema type associated with the Element
'{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSigningTimeInfo'
- Could not find any schema type associated with the Element
'{urn:oasis:names:tc:dss:1.0:core:schema}UseVerificationTime'
- Could not find any schema type associated with the Element
'{urn:oasis:names:tc:dss:1.0:core:schema}ReturnProcessingDetails'
- Could not find any schema type associated with the Element
'{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSignerIdentity'
Is it a bug in wsdl2java? Any comments? workaround?
=== 2. build errors ===
In spite of the above error client stub code was generated and I tested it
with my client application (which has been developed based on axis-2 1.3). I
got the following build errors. I fixed them by modifying the generated stub
as I've shown bellow:
compile.src:
[javac] Compiling 11 source files to C:\client1.4\build\classes
==== Build ERROR 1 ====
[javac] C:\client1.4\src\myServiceStub.java:36878:
setAttributeValue(org.apache.axiom.om.OMElement[]) in
myServiceStub.AttributeType cannot be applied to (java.lang.Object[])
[javac] object.setAttributeValue(list1.toArray());
*********************************************
Fixed by adding a cast: object.setAttributeValue(
(org.apache.axiom.om.OMElement[])
list1.toArray());
***************************************************************************
===== Build ERROR 2 ===
[javac] C:\Client1.4\src\myServiceStub.java:47171:
setSubjectConfirmationData(org.apache.axiom.om.OMElement) in
myServiceStub.SubjectConfirmationType cannot be applied to
(java.lang.Object)
[javac]
object.setSubjectConfirmationData(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,ExtensionMapper.class));
[javac]
***************************************
Fixed by adding a cast: object.setSubjectConfirmationData(
(org.apache.axiom.om.OMElement)
org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
ExtensionMapper.class));
********************************************************************************
I also had to change some class names in my client application because their
names have been changed in the generated stub.
After those changes I ran my client application and tested some SOAP
operations without problem and it can get services from my server. I am
going to do more tests and let you know if I see any problem. The server is
still using Axis2-1.3, I'll upgrade that to 1.4 later on.
Many thanks again to the Axis2 development team for their great job!
Regards
Joe
HTTP Basic Authentication
Posted by SP...@nyiso.com.
Im using client stubs (generated using wsdl2java) to call web service that
implemented basic authentication.
When I pass incorrect username and password, I expect to get
"401-Unauthorized" error, however Im getting
some weird error as shown below.
Any ideas?
-suresh
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException: Software caused connection abort:
recv failed
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException:
Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(
HTTPSender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(
HTTPSender.java:143)
at org.apache.axis.strategies.InvocationStrategy.visit(
InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
-----------------------------------------
*******************************************************************
***
The information in this email is confidential and may be legally
privileged against disclosure other than to the intended recipient.
It is intended solely for the addressee. Access to this email by
anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. Please immediately
delete this message and inform the sender of this error.
*******************************************************************
***
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: [axis2] Axis2 1.4 Wsdl2Java problems/bugs
Posted by Joe Smithian <jo...@gmail.com>.
Unfortunately for confidentiality reasons I can't send the wsdl file and
schema. Can I log a jira without sending wsdl file and schema?
Joe
On Sun, May 18, 2008 at 4:20 AM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:
> Is it possible you to send your wsdl files and schemas?
> if so please log a jira and attach your files.
> It seems there are some problem with your wsdl and schema files.
>
> thanks,
> Amila.
>
>
>
> On Fri, May 16, 2008 at 8:44 PM, Joe Smithian <jo...@gmail.com>
> wrote:
>
>> Hi all
>>
>> I just downloaded and installed AXIS2-1.4 today. I tried wsdl2java and I
>> was pleased that some bugs such as "unexpected token: staticabstract" have
>> been fixed. Many thanks to the Axis2 development team. I experienced the
>> following problems:
>>
>> ====== 1- wsdl2java errors ==========
>>
>> 1- When I tried to generate the client stub, I got the following errors
>> from WSDL2java which are the same problems in axis2-1.3:
>>
>> Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
>> 'file:/C:/wsdl/myService.wsdl'.
>> - Type {urn:oasis:names:tc:SAML:1.0:assertion}SubjectConfirmationData
>> missing!
>> - Type {urn:oasis:names:tc:SAML:1.0:assertion}AttributeValue missing!
>> - Could not find any schema type associated with the Element
>> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnVerificationTimeInfo'
>> - Could not find any schema type associated with the Element
>> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSigningTimeInfo'
>> - Could not find any schema type associated with the Element
>> '{urn:oasis:names:tc:dss:1.0:core:schema}UseVerificationTime'
>> - Could not find any schema type associated with the Element
>> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnProcessingDetails'
>> - Could not find any schema type associated with the Element
>> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSignerIdentity'
>>
>> Is it a bug in wsdl2java? Any comments? workaround?
>>
>> === 2. build errors ===
>>
>> In spite of the above error client stub code was generated and I tested it
>> with my client application (which has been developed based on axis-2 1.3). I
>> got the following build errors. I fixed them by modifying the generated stub
>> as I've shown bellow:
>>
>> compile.src:
>> [javac] Compiling 11 source files to C:\client1.4\build\classes
>>
>> ==== Build ERROR 1 ====
>> [javac] C:\client1.4\src\myServiceStub.java:36878:
>> setAttributeValue(org.apache.axiom.om.OMElement[]) in
>> myServiceStub.AttributeType cannot be applied to (java.lang.Object[])
>> [javac] object.setAttributeValue(list1.toArray());
>> *********************************************
>> Fixed by adding a cast: object.setAttributeValue(
>> (org.apache.axiom.om.OMElement[])
>> list1.toArray());
>>
>> ***************************************************************************
>> ===== Build ERROR 2 ===
>> [javac] C:\Client1.4\src\myServiceStub.java:47171:
>> setSubjectConfirmationData(org.apache.axiom.om.OMElement) in
>> myServiceStub.SubjectConfirmationType cannot be applied to
>> (java.lang.Object)
>> [javac]
>> object.setSubjectConfirmationData(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,ExtensionMapper.class));
>>
>> [javac]
>> ***************************************
>> Fixed by adding a cast: object.setSubjectConfirmationData(
>> (org.apache.axiom.om.OMElement)
>> org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
>> ExtensionMapper.class));
>>
>> ********************************************************************************
>>
>> I also had to change some class names in my client application because
>> their names have been changed in the generated stub.
>>
>>
>> After those changes I ran my client application and tested some SOAP
>> operations without problem and it can get services from my server. I am
>> going to do more tests and let you know if I see any problem. The server is
>> still using Axis2-1.3, I'll upgrade that to 1.4 later on.
>>
>> Many thanks again to the Axis2 development team for their great job!
>>
>> Regards
>>
>> Joe
>>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
Re: [axis2] Axis2 1.4 Wsdl2Java problems/bugs
Posted by Amila Suriarachchi <am...@gmail.com>.
Is it possible you to send your wsdl files and schemas?
if so please log a jira and attach your files.
It seems there are some problem with your wsdl and schema files.
thanks,
Amila.
On Fri, May 16, 2008 at 8:44 PM, Joe Smithian <jo...@gmail.com>
wrote:
> Hi all
>
> I just downloaded and installed AXIS2-1.4 today. I tried wsdl2java and I
> was pleased that some bugs such as "unexpected token: staticabstract" have
> been fixed. Many thanks to the Axis2 development team. I experienced the
> following problems:
>
> ====== 1- wsdl2java errors ==========
>
> 1- When I tried to generate the client stub, I got the following errors
> from WSDL2java which are the same problems in axis2-1.3:
>
> Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
> 'file:/C:/wsdl/myService.wsdl'.
> - Type {urn:oasis:names:tc:SAML:1.0:assertion}SubjectConfirmationData
> missing!
> - Type {urn:oasis:names:tc:SAML:1.0:assertion}AttributeValue missing!
> - Could not find any schema type associated with the Element
> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnVerificationTimeInfo'
> - Could not find any schema type associated with the Element
> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSigningTimeInfo'
> - Could not find any schema type associated with the Element
> '{urn:oasis:names:tc:dss:1.0:core:schema}UseVerificationTime'
> - Could not find any schema type associated with the Element
> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnProcessingDetails'
> - Could not find any schema type associated with the Element
> '{urn:oasis:names:tc:dss:1.0:core:schema}ReturnSignerIdentity'
>
> Is it a bug in wsdl2java? Any comments? workaround?
>
> === 2. build errors ===
>
> In spite of the above error client stub code was generated and I tested it
> with my client application (which has been developed based on axis-2 1.3). I
> got the following build errors. I fixed them by modifying the generated stub
> as I've shown bellow:
>
> compile.src:
> [javac] Compiling 11 source files to C:\client1.4\build\classes
>
> ==== Build ERROR 1 ====
> [javac] C:\client1.4\src\myServiceStub.java:36878:
> setAttributeValue(org.apache.axiom.om.OMElement[]) in
> myServiceStub.AttributeType cannot be applied to (java.lang.Object[])
> [javac] object.setAttributeValue(list1.toArray());
> *********************************************
> Fixed by adding a cast: object.setAttributeValue(
> (org.apache.axiom.om.OMElement[])
> list1.toArray());
>
> ***************************************************************************
> ===== Build ERROR 2 ===
> [javac] C:\Client1.4\src\myServiceStub.java:47171:
> setSubjectConfirmationData(org.apache.axiom.om.OMElement) in
> myServiceStub.SubjectConfirmationType cannot be applied to
> (java.lang.Object)
> [javac]
> object.setSubjectConfirmationData(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,ExtensionMapper.class));
>
> [javac]
> ***************************************
> Fixed by adding a cast: object.setSubjectConfirmationData(
> (org.apache.axiom.om.OMElement)
> org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
> ExtensionMapper.class));
>
> ********************************************************************************
>
> I also had to change some class names in my client application because
> their names have been changed in the generated stub.
>
>
> After those changes I ran my client application and tested some SOAP
> operations without problem and it can get services from my server. I am
> going to do more tests and let you know if I see any problem. The server is
> still using Axis2-1.3, I'll upgrade that to 1.4 later on.
>
> Many thanks again to the Axis2 development team for their great job!
>
> Regards
>
> Joe
>
--
Amila Suriarachchi,
WSO2 Inc.