you can't run wsdl2java on the standard WS-N WSDL (OASIS's WS-BaseNotification-1_3.wsdl) because it doesn't have binding or service elements - just the abstract portTypes. I created the sample producer WSDL by copying in the portType content from the WS-N WSDL and then creating the binding and service myself. Most free WSDL editors (like the one in Eclispe WTP) will do this for you automatically whenever you modify your portType. You can also copy the <binding/> content from the sample WSDL if you're just using a text editor.
Dan Christian Ewers <[EMAIL PROTECTED]> wrote on 02/13/2007 03:30:24 AM: > > Hi, > I also tried to create a wsdl-file with the WSN-Producer capability with > wsdl2java. I always get the following error > --- > An exception was caught: [ID = 'NotDocLiteral'] The WSDL operation > 'Subscribe' is not doc-literal because it defines a message with more than > one message part for its SOAP Body. The SOAP Body of a doc-literal message > should contain one root request element (with the operation name) with zero > or more child elements (the parameters). > --- > Could you explain how you created the "producer.wsdl"? Do I have to copy > the message-elements from the WS-BaseNotification-1_3.wsdl file? > I want to recreate my wsdl-files, so I can use them with the Eclipse-tptp > project. I think it can only work with wsdl-files that can be processed by > wsdl2java... > > Thanks, > Christian > > > > Montag, 12. Februar 2007 20:37 > To: <[email protected]> > cc: > From: "Callner, David A." <[EMAIL PROTECTED]> > Subject: RE: wsdl2Java > > > I've managed to figure out how to use the wsdl2java to create a > producer, but I don't see any wsdl's in the wsn-consumer that could > have been used to create the java code for the wsn-consumer. How are > we supposed to create consumers? Thanks for all your help. > > -----Original Message----- > From: Andrew Eberbach [mailto:[EMAIL PROTECTED] > Sent: Friday, February 09, 2007 3:14 PM > To: [email protected] > Subject: RE: wsdl2Java > > Sorry, I should have remembered this. This is a known issue and will be > > fixed for 2.2: > > http://issues.apache.org/jira/browse/MUSE-161 > > You do not need to use wsdl2java to build the examples, they already > have > everything you need in the directory, just run ant to build the war > file. > Sorry about the confusion. > > Thanks, > Andrew > > Andrew Eberbach > Autonomic Computing > (919) 254-2645 > T/L: 444-2645 > [EMAIL PROTECTED] > > > > "Callner, David A." <[EMAIL PROTECTED]> > 02/09/2007 03:05 PM > Please respond to > [email protected] > > > To > <[email protected]> > cc > > Subject > RE: wsdl2Java > > > > > > > I just have > /home/dcallner/muse2.1.0-bin/samples/j2ee/wsn-producer/wsdl/WsResource. > wsdl > > I try to run wsdl2java a directory above the wsdl like so. > > Wsdl2java -axis2 -wsdl wsdl/WsResource.wsdl > > I've also tried in the same directory > Wsdl2java -axis2 -wsdl > /home/dcallner/muse2.1.0-bin/samples/j2ee/wsn-producer/wsdl/WsResource. > wsdl > > I've been looking online and it seems to be one of the imports, but how > can a sample program that works have imports that don't work with the > wsdl2java tool. > > -----Original Message----- > From: Andrew Eberbach [mailto:[EMAIL PROTECTED] > Sent: Friday, February 09, 2007 2:58 PM > To: [email protected] > Subject: RE: wsdl2Java > > You're right. It's throwing the exception inside of the wsdl code when > it > tries to load an import. What does the directory look like where you > have > the wsdl that you're trying to convert? > > Thanks, > Andrew > > Andrew Eberbach > Autonomic Computing > (919) 254-2645 > T/L: 444-2645 > [EMAIL PROTECTED] > > > > "Callner, David A." <[EMAIL PROTECTED]> > 02/09/2007 02:33 PM > Please respond to > [email protected] > > > To > <[email protected]> > cc > > Subject > RE: wsdl2Java > > > > > > > Permissions are not a problem. I'm executing the script just fine. > It's the NullPointerException below that's causing me problems because > I can't generate any code. > > -----Original Message----- > From: Andrew Eberbach [mailto:[EMAIL PROTECTED] > Sent: Friday, February 09, 2007 2:30 PM > To: [email protected] > Subject: RE: wsdl2Java > > And which operating system are you on? Did you try just doing a chmod > +x > wsdl2java.sh and running that. > > Thanks, > Andrew > > Andrew Eberbach > Autonomic Computing > (919) 254-2645 > T/L: 444-2645 > [EMAIL PROTECTED] > > > > "Callner, David A." <[EMAIL PROTECTED]> > 02/09/2007 02:19 PM > Please respond to > [email protected] > > > To > <[email protected]> > cc > > Subject > RE: wsdl2Java > > > > > > > Muse.2.1.0 > > -----Original Message----- > From: Andrew Eberbach [mailto:[EMAIL PROTECTED] > Sent: Friday, February 09, 2007 2:17 PM > To: [email protected] > Subject: Re: wsdl2Java > > Hi, > > Which build are you using? > > Thanks, > Andrew > > Andrew Eberbach > Autonomic Computing > (919) 254-2645 > T/L: 444-2645 > [EMAIL PROTECTED] > > > > "Callner, David A." <[EMAIL PROTECTED]> > 02/09/2007 02:05 PM > Please respond to > [email protected] > > > To > <[email protected]> > cc > > Subject > wsdl2Java > > > > > > > I'm just trying to run the wsdl2java tool to see if it works but I get > this exception. I am just trying to create the wsn-producer from it's > wsdl. > > > sh wsdl2java.sh -axis2 -wsdl /mypath/WsResource.wsdl > > java.lang.RuntimeException: java.lang.NullPointerException > at > org.apache.muse.tools.inspector.ResourceInspector.run(ResourceInspector > .java:836) > at > org.apache.muse.tools.generator.analyzer.SimpleAnalyzer.inspect(SimpleA > nalyzer.java:392) > at > org.apache.muse.tools.generator.analyzer.SimpleAnalyzer.analyze(SimpleA > nalyzer.java:338) > at org.apache.muse.tools.generator.Wsdl2Java.run(Wsdl2Java.java:143) > at org.apache.muse.tools.generator.Wsdl2Java.main(Wsdl2Java.java:260) > Caused by: java.lang.NullPointerException > at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) > at > org.apache.muse.tools.inspector.ResourceInspector.run(ResourceInspector > .java:831) > ... 4 more > > SEVERE: [ID = 'CodeGenFailed'] Code generation failed, see the > exception information below. > > An exception was caught: java.lang.NullPointerException > > > > Anyone seen this before? > > > Hopefully, > > David Callner > Senior Software Systems Engineer > The MITRE Corporation > Center for Advanced Aviation System Development > 7515 Colshire Dr. > McLean, VA. 22102 > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > 703.983.6431 (work) > > "This American system of ours . . . call it capitalism, call it what > you like, gives to each and every one of us a great opportunity if we > only seize it with both hands and make the most of it." Al Capone > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
