Deepal Jayasinghe ha scritto:
Can you please post your java class ? or create a JIRA attaching the
java class

Thanks
Deepal

Hi Deepal,
thank you for your support.

This is my Java class: I removed the body of the methods because it's propretary (and a bit complex to attach) code:

package com.cardinis.cardinis.webservice.access;

import com.cardinis.cardinis.webservice.CardinisWebServices;
import com.cardinis.webservice.ticketFramework.FailedConfigurationException;
import com.cardinis.webservice.ticketFramework.GenericTicketingException;
import com.cardinis.webservice.ticketFramework.InvalidArgumentException;

public class AccessServices extends CardinisWebServices {
        
public String loginByUsernamePassword(String username, String password) throws FailedConfigurationException, InvalidArgumentException, GenericTicketingException{
    // [cut]
    return "test";
  }
        
public void logout(String ticket) throws FailedConfigurationException, InvalidArgumentException, GenericTicketingException {
    // [cut]
  }
}

All those three exceptions (FailedConfigurationException, InvalidArgumentException, GenericTicketingException) are simple extensions of java.lang.Exception, with the same constructors and no special behaviour.

The WSDL generated using Axis2 1.3 Java2WSDL has some validation errors (given by Eclipse WTP), like:

src-resolve.4.2: Error resolving component 'ns0:FailedConfigurationException'. It was detected that 'ns0:FailedConfigurationException' is in namespace 'http://ticketFramework.webservice.cardinis.com/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/<complete-path>/WEB-INF/services/accessServices/META-INF/accessServices.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:FailedConfigurationException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/<complete-path>/WEB-INF/services/accessServices/META-INF/accessServices.wsdl'.

Thanks to some hints received in Eclipse WTP newsgroup, I was suggested that the definition of Exception is missing. So I tried to run Java2WSDL specyfing -xc java.lang.Exception
That problem went away, but then I have other problems, like:

- a problem with the ax21 namespace: I'm not expert in XML, but I think that the namespace definition xmlns:ax21="http://ticketFramework.webservice.cardinis.com/xsd"; should be in <wsdl:definitions> rather than in <wsdl:types>...

- many errors like:
cvc-identity-constraint.4.2.2: Duplicate key value [FailedConfigurationException] declared for identity constraint "message" of element "definitions". I was told this is because I have two FailedConfigurationException message entries defined...

- one such error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'wsdl:fault'. One of '{"http://schemas.xmlsoap.org/wsdl/":output}' is expected. I was told this is because I would need an empty wsdl:output before the wsdl:fault...

I'm not reporting the whole WSDLs (maybe I should?) because I think you can get them by running Java2WSDL on the class above.

Thanks again for your help.

--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to