axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject RE: [Axis2]- Issue with generating source code using WSDL2Java
Date Mon, 27 Nov 2006 13:28:11 GMT
you need to import your xsd into your wsdl as in

<definitions
  targetNameSpace="http://acme.com/supplier/definitions" . . . >
  <types>
    <xsd:schema
      targetNamespace="http://acme.com/supplier/types" . . . >
      <xsd:import
        namespace=http://acme.com/supplier/types
        schemaLocation="http://acme.com/supplier/types.xsd"/>
    </xsd:schema>
  </types>
</definitions>

then later on when you want to reference the types defined in your types.xsd
<message name="ScheduleConferenceInput">
    <part name="a"
       element="types:ConferenceBookingDetails"/>
   <part name="b"
       element="types:ListOfParticipant"/>
</message>

you can use <wsdl:include>
but if your target namespace and imported namespaces are the same use 
<xsd:include>

HTH,
Martin Gainty

______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official 
business of Sender. This transmission is of a confidential nature and Sender 
does not endorse distribution to any party other than intended recipient. 
Sender does not necessarily endorse content contained within this 
transmission.


>
>
>Hi *,
>
>I am new bie to Webservice and Axis2.
>
>Just started getting hold of Axis 2.
>
>I am facing problem when I try to generate source code from WSDL file
>usind WSDL2Java tool.
>
>When I have Message tag with one part tag then it is working fine. I am
>able to generate source code.
>
>Eg,
><wsdl:message name="ScheduleConferenceInput">
>
><wsdl:part element="xsd1:ConferenceBookingDetails" name="a"/>
>
></wsdl:message>
>
>
>But when the Message tag has got two part tag then I m geeting some
>errors. Unable to generate source code.
>
>Eg,
><wsdl:message name="ScheduleConferenceInput">
>
><wsdl:part element="xsd1:ConferenceBookingDetails" name="a"/>
>
><wsdl:part element="xsd1:ListOfParticipant" name="b"/>
>
></wsdl:message>
>
>
>
>Exception in thread "main"
>org.apache.axis2.wsdl.codegen.CodeGenerationException:
>java.lang.RuntimeException: org.apache.axis2.s
>chema.SchemaCompilationException: java.lang.NullPointerException
>         at
>org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
>onEngine.java:185)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>Caused by: java.lang.RuntimeException:
>org.apache.axis2.schema.SchemaCompilationException:
>java.lang.NullPointerException
>         at
>org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleD
>BExtension.java:117)
>         at
>org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
>onEngine.java:140)
>         ... 2 more
>Caused by: org.apache.axis2.schema.SchemaCompilationException:
>java.lang.NullPointerException
>         at
>org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:186)
>         at
>org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleD
>BExtension.java:70)
>         ... 3 more
>Caused by: java.lang.NullPointerException
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:360)
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:344)
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:410)
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:334)
>         at
>org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:915)
>         at
>org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.ja
>va:878)
>         at
>org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler
>.java:643)
>         at
>org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(Sch
>emaCompiler.java:616)
>         at
>org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java
>:577)
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:366)
>         at
>org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.jav
>a:344)
>         at
>org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:226)
>         at
>org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:181)
>         ... 4 more
>
>
>
>I am not sure about this behaviour. Am I  missing something.
>
>Your help is very much appreciated.Thanks in advance.
>
>
>
>
>
>
>_________________________________________________
>Thanks & Regards,
>Vinodh
>
>
>
>
>The information contained in this electronic message and any attachments to 
>this message are intended for the exclusive use of the addressee(s) and may 
>contain proprietary, confidential or privileged information. If you are not 
>the intended recipient, you should not disseminate, distribute or copy this 
>e-mail. Please notify the sender immediately and destroy all copies of this 
>message and any attachments.
>
>WARNING: Computer viruses can be transmitted via email. The recipient 
>should check this email and any attachments for the presence of viruses. 
>The company accepts no liability for any damage caused by any virus 
>transmitted by this email.
>
>www.wipro.com

_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger. 
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message