You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Christian Nolte <ch...@noltec.org> on 2010/10/12 16:56:30 UTC

Tuscany generated WSDL: Namespace for faults are wrong

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have the same or a similar problem like

http://mail-archives.apache.org/mod_mbox/tuscany-user/201004.mbox/%3C9AB704E9182FC34D97F394D449EE17DCC01242@INHYMS12.ca.com%3E

So I have a WSDL port specified like this:

...
<wsdl:portType name="IEMailAddressService">
    <wsdl:operation name="isReserved">
      <wsdl:input message="tns:isReserved">
    </wsdl:input>
      <wsdl:output message="tns:isReservedResponse">
    </wsdl:output>
      <wsdl:fault name="AccessDeniedException"
message="ns4:AccessDeniedException">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>
...

Running wsimport on this WSDL gives me an error because it cannot
resolve AccessDeniedException which lies in the tns: namespace and not
ns4: which is generated by tuscany. The solution is to change the namespace

  message="ns4:AccessDeniedException"

to

  message="tns:AccessDeniedException"


Is there a way to specifiy the namespace for Exceptions, for example
using annotations? Or another way to get the Exception into the correct
namespace?

Regards,
Christian

- --
"He's a globe-trotting guerilla house-husband haunted by an iconic dead
 American confidante She's a vivacious foul-mouthed vampire from a
 different time and place. They fight crime!"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAky0dx4ACgkQCNjA0nfhW7w/5QCfSc2BdKf9B/YULq8mMc4EJnxQ
LDoAniQxGkYJLKyS1MoRovfoNwAB/gU3
=k3nu
-----END PGP SIGNATURE-----

Re: Tuscany generated WSDL: Namespace for faults are wrong

Posted by Simon Nash <na...@apache.org>.
Please can you post the Java file(s) from which this WSDL file was
generated, or create a JIRA and attach the Java file(s) to the JIRA.
With this information it should be possible to reproduce and fix
the problem.

   Simon

Christian Nolte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I am using tuscany-1.6 and the WSDL is generated by tuscany. I also
> tried wsdl2java from the axis2 project, which gives:
> 
> [ERROR] There are no parts for fault message :
> {http://exception.workflow.ipws.services.ipwebservice.wobcom.de/}AccessDeniedException
> 
> PS: Sorry for the wierd posting as I am currently not subscribed
> 
> At 12.10.2010 16:56, Christian Nolte wrote:
>> Hi,
>>
>> I have the same or a similar problem like
>>
>> http://mail-archives.apache.org/mod_mbox/tuscany-user/201004.mbox/%3C9AB704E9182FC34D97F394D449EE17DCC01242@INHYMS12.ca.com%3E
>>
>> So I have a WSDL port specified like this:
>>
>> ...
>> <wsdl:portType name="IEMailAddressService">
>>     <wsdl:operation name="isReserved">
>>       <wsdl:input message="tns:isReserved">
>>     </wsdl:input>
>>       <wsdl:output message="tns:isReservedResponse">
>>     </wsdl:output>
>>       <wsdl:fault name="AccessDeniedException"
>> message="ns4:AccessDeniedException">
>>     </wsdl:fault>
>>     </wsdl:operation>
>>   </wsdl:portType>
>> ...
>>
>> Running wsimport on this WSDL gives me an error because it cannot
>> resolve AccessDeniedException which lies in the tns: namespace and not
>> ns4: which is generated by tuscany. The solution is to change the namespace
>>
>>   message="ns4:AccessDeniedException"
>>
>> to
>>
>>   message="tns:AccessDeniedException"
>>
>>
>> Is there a way to specifiy the namespace for Exceptions, for example
>> using annotations? Or another way to get the Exception into the correct
>> namespace?
>>
>> Regards,
>> Christian
>>
> 
> - -- 
> "He's an underprivileged dishevelled master criminal with no name. She's
>  a green-fingered goth widow with a birthmark shaped like Liberty's
>  torch. They fight crime!"
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAky0k6MACgkQCNjA0nfhW7yHtwCeM+0aIkXegqYPsGrO5B7plIPi
> xtsAoK8omZw9rIv8fP0L21hVBTEJ34sV
> =AEuq
> -----END PGP SIGNATURE-----
> 
> 


Re: Tuscany generated WSDL: Namespace for faults are wrong

Posted by Christian Nolte <ch...@noltec.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am using tuscany-1.6 and the WSDL is generated by tuscany. I also
tried wsdl2java from the axis2 project, which gives:

[ERROR] There are no parts for fault message :
{http://exception.workflow.ipws.services.ipwebservice.wobcom.de/}AccessDeniedException

PS: Sorry for the wierd posting as I am currently not subscribed

At 12.10.2010 16:56, Christian Nolte wrote:
> Hi,
> 
> I have the same or a similar problem like
> 
> http://mail-archives.apache.org/mod_mbox/tuscany-user/201004.mbox/%3C9AB704E9182FC34D97F394D449EE17DCC01242@INHYMS12.ca.com%3E
> 
> So I have a WSDL port specified like this:
> 
> ...
> <wsdl:portType name="IEMailAddressService">
>     <wsdl:operation name="isReserved">
>       <wsdl:input message="tns:isReserved">
>     </wsdl:input>
>       <wsdl:output message="tns:isReservedResponse">
>     </wsdl:output>
>       <wsdl:fault name="AccessDeniedException"
> message="ns4:AccessDeniedException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> ...
> 
> Running wsimport on this WSDL gives me an error because it cannot
> resolve AccessDeniedException which lies in the tns: namespace and not
> ns4: which is generated by tuscany. The solution is to change the namespace
> 
>   message="ns4:AccessDeniedException"
> 
> to
> 
>   message="tns:AccessDeniedException"
> 
> 
> Is there a way to specifiy the namespace for Exceptions, for example
> using annotations? Or another way to get the Exception into the correct
> namespace?
> 
> Regards,
> Christian
> 

- -- 
"He's an underprivileged dishevelled master criminal with no name. She's
 a green-fingered goth widow with a birthmark shaped like Liberty's
 torch. They fight crime!"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAky0k6MACgkQCNjA0nfhW7yHtwCeM+0aIkXegqYPsGrO5B7plIPi
xtsAoK8omZw9rIv8fP0L21hVBTEJ34sV
=AEuq
-----END PGP SIGNATURE-----

Re: Tuscany generated WSDL: Namespace for faults are wrong

Posted by Simon Laws <si...@googlemail.com>.
On Tue, Oct 12, 2010 at 3:56 PM, Christian Nolte <ch...@noltec.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have the same or a similar problem like
>
> http://mail-archives.apache.org/mod_mbox/tuscany-user/201004.mbox/%3C9AB704E9182FC34D97F394D449EE17DCC01242@INHYMS12.ca.com%3E
>
> So I have a WSDL port specified like this:
>
> ...
> <wsdl:portType name="IEMailAddressService">
>    <wsdl:operation name="isReserved">
>      <wsdl:input message="tns:isReserved">
>    </wsdl:input>
>      <wsdl:output message="tns:isReservedResponse">
>    </wsdl:output>
>      <wsdl:fault name="AccessDeniedException"
> message="ns4:AccessDeniedException">
>    </wsdl:fault>
>    </wsdl:operation>
>  </wsdl:portType>
> ...
>
> Running wsimport on this WSDL gives me an error because it cannot
> resolve AccessDeniedException which lies in the tns: namespace and not
> ns4: which is generated by tuscany. The solution is to change the namespace
>
>  message="ns4:AccessDeniedException"
>
> to
>
>  message="tns:AccessDeniedException"
>
>
> Is there a way to specifiy the namespace for Exceptions, for example
> using annotations? Or another way to get the Exception into the correct
> namespace?
>
> Regards,
> Christian
>
> - --
> "He's a globe-trotting guerilla house-husband haunted by an iconic dead
>  American confidante She's a vivacious foul-mouthed vampire from a
>  different time and place. They fight crime!"
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAky0dx4ACgkQCNjA0nfhW7w/5QCfSc2BdKf9B/YULq8mMc4EJnxQ
> LDoAniQxGkYJLKyS1MoRovfoNwAB/gU3
> =k3nu
> -----END PGP SIGNATURE-----
>

Hi Christian

Is the WSDL snippet you provide generated by Tuscany? What version of
Tuscany are you running on?

Regards

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com