0

WSDL generates properly for SOAP web services (JAXB) if we use JAXB Default data type like java.lang.String(xsd:string), but it gives problem when we use custom java classes as request object for web method

class GetPersonRequest
{
 String person;
}

we have tried adding @XMLType annotation to the java class (request class GetpersonRequest) but still no luck , appreciate any help on this

Santosh Joshi
  • 3,290
  • 5
  • 36
  • 49
Stuck in Java
  • 202
  • 2
  • 12
  • What error or output are you seeing? you need an `@XMLRootElement` to define the root tag and an `@XMLElement` or `@XMLAttribute`, etc. on the object property for it to give you something. – Ryan J Jul 15 '14 at 06:09
  • Error message says `WASWSDLGenera E WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the Web service implementation class because of the following error: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: ` , in mean time we came across we have missed jaxb.index file, now we are adding that file and will test it – Stuck in Java Jul 15 '14 at 14:22
  • As well i came cross http://www-01.ibm.com/support/docview.wss?uid=swg21590404 i am little confuse about cause of this error – Stuck in Java Jul 15 '14 at 14:26
  • Just to update on this, we have abstract request and response classes for each and every request, if we remove those classes it works fine , if we add those back we are getting error `WASWSDLGenera E WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the Web service implementation class because of the following error: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: < RequestClassName > ` – Stuck in Java Jul 16 '14 at 15:12
  • More updates,The problem is not because of Abstract classes, but it may be because of we are using two different projects and the Abstract request and Response are in different project than the request and response classes of web services which extends Abstract request/ response – Stuck in Java Jul 16 '14 at 15:57

0 Answers0