On Sun, Jul 22, 2012 at 11:21 PM, Alan Shiers <ashi...@eastlink.ca> wrote:

> Thanks for the reply.  I tried your suggestion and from the command prompt
> typed:****
>
> ** **
>
> C:\axis2-1.6.2\samples\pnskeywords>%AXIS2_HOME%\bin\WSDL2Java -uri
> keyword.wsdl****
>
> -p com.personalnetsearch.plugin.keys.axis2 -pn IndustryListRequest -d adb
> –s
>

You have to give the port name with -pn option. (eg - in the given wsdl ,
"KeywordListPort" is a port-name). Check whether you have given the correct
port name here.? I think what you have given here is the "portType" name,
which is incorrect.

> ****
>
> ** **
>
> I even tried:****
>
> ** **
>
> C:\axis2-1.6.2\samples\pnskeywords>%AXIS2_HOME%\bin\WSDL2Java -uri
> keyword.wsdl****
>
> -p com.personalnetsearch.plugin.keys.axis2 -pn “IndustryListRequest” -d
> adb –s****
>
> ** **
>
> Still I get:****
>
> ** **
>
> C:\axis2-1.6.2\samples\pnskeywords>%AXIS2_HOME%\bin\WSDL2Java -uri
> keyword.wsdl****
>
> -p com.personalnetsearch.plugin.keys.axis2 -pn "IndustryListRequest" -d
> adb -s****
>
> Using AXIS2_HOME:   C:\axis2-1.6.2****
>
> Using JAVA_HOME:    C:\Program Files\Java\jdk1.7.0_05****
>
> Retrieving document at 'keyword.wsdl'.****
>
> log4j:WARN No appenders could be found for logger
> (org.apache.axis2.description.****
>
> WSDL11ToAllAxisServicesBuilder).****
>
> log4j:WARN Please initialize the log4j system properly.****
>
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException****
>
> : Error parsing WSDL****
>
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat****
>
> ionEngine.java:175)****
>
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)****
>
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)****
>
> Caused by: org.apache.axis2.AxisFault: *No port found for the given name
> :IndustryListRequest*
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(W****
>
> SDL11ToAxisServiceBuilder.java:1050)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi****
>
> ce(WSDL11ToAxisServiceBuilder.java:341)****
>
>         at
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA****
>
> llServices(WSDL11ToAllAxisServicesBuilder.java:107)****
>
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat****
>
> ionEngine.java:169)****
>
>         ... 2 more****
>
> ** **
>
> What might I be doing wrong?  IndustryListRequest is in the WSDL file as a
> port type.****
>
> ** **
>
> Alan****
>
> ** **
>
> *From:* Kishanthan Thangarajah [mailto:kshanth2...@gmail.com]
> *Sent:* July-22-12 1:41 PM
>
> *To:* java-user@axis.apache.org
> *Subject:* Re: newbie on WSDL2Java and WSDL file****
>
> ** **
>
> ** **
>
> On Sun, Jul 22, 2012 at 5:51 AM, Alan Shiers <ashi...@eastlink.ca> wrote:*
> ***
>
> Hi Kishanthan,****
>
>  ****
>
> Thanks for the information on setting the appropriate binding style to
> “rpc”.  I did that and finally WSDL2Java was able to process the wsdl
> file.  Unfortunately, I’m thinking the wsdl file needs more work only
> because it only created classes and methods having to do with the
> KeywordListRequest port type and binding.  In my wsdl I have two other
> PortTypes and Bindings:  IndustryListRequest and CategoryListRequest.
> These two seemed to be ignored altogether as is evident in the resulting
> Axis2KeywordServiceStub.java file attached.****
>
> ** **
>
> This is because wsdl2java only support/generate code for one portType [1].
> But in your case, you have used three different portType's
> for three different bindings. So i think you can still generate code for
> each port by using the port-name "-pn" option. You will have to run
> wsdljava three times with different port names. This is my suggestion.****
>
> ** **
>
> Thanks,****
>
> Kishanthan.****
>
> [1] https://issues.apache.org/jira/browse/AXIS2-4654****
>
>  ****
>
> To be truthful, I’m just winging it here.  I don’t fully understand WSDL.
> I’m just trying to piece together what I can from what I’ve learned from
> basic tutorials I’ve found on the internet.  I may need some help with the
> WSDL file to make the WSDL2Java app produce a Axis2KeywordServiceStub.java
> with classes and methods I can work with.****
>
>  ****
>
> If I was writing the stub file myself it would contain methods with the
> following signatures:****
>
> public static ListItem[] getIndustryList(int id){…}****
>
> public static ListItem[] getCategoryList(int id1, int id2){…}****
>
> public static String getKeywordList(int id1, int id2){…}****
>
>  ****
>
> If you know Java, I’m hoping those method signatures would help you to
> understand what it is I’m trying to accomplish.  Maybe my objective below
> are all wrong… ****
>
>  ****
>
> Main Objectives:****
>
> 1.      Define user-defined type: ListItem – contains an int (itemID) and
> a string (itemName)****
>
> 2.     Define user-defined type: ArrayOfListItem – contains any number of
> ListItem objects ****
>
> 3.     Define PortType IndustryListRequest:  requires an int parameter as
> input and should output an ArrayOfListItems****
>
> 4.     Define PortType CategoryListRequest:  requires two int parameters
> as input and should output an ArrayOfListItems****
>
> 5.     Define PortType KeywordListRequest:  requires two int parameters
> as input and should output a String****
>
>  ****
>
> WSDL2Java followed through with items 1,2 and 5.  But ignored 3 and 4.  I
> don’t get that???****
>
>  ****
>
> This Service is supposed to be quite simple:****
>
> 1.       Request from the service a list of *Industry* types.  It then
> returns an array of ListItem[]****
>
> 2.       Once an *industry* type is chosen, we use an ID to then request
> sub categories within that industry returning an array of ListItem[]****
>
> 3.       Once a *category* type is chosen, we use an ID to then request a
> complete list of *keywords* and phrases associated with the category of
> occupation.  The keywords are returned as a comma delimited String.****
>
>  ****
>
> How hard can this be??  Obviously too hard for me alone to figure it out.
> Please help.****
>
>  ****
>
> Alan****
>
>  ****
>
> *From:* Kishanthan Thangarajah [mailto:kshanth2...@gmail.com]
> *Sent:* July-21-12 5:39 PM
> *To:* java-user@axis.apache.org
> *Subject:* Re: newbie on WSDL2Java and WSDL file****
>
>  ****
>
>  ****
>
> On Sat, Jul 21, 2012 at 2:20 AM, Alan Shiers <ashi...@eastlink.ca> wrote:*
> ***
>
> Hi Guys,****
>
>  ****
>
> I’m trying desperately to familiarize myself with Axis2 and I’m stuck on
> the part in the process that requires me to first create a WSDL file for my
> project.  I’ve downloaded XMLSpy to create my WSDL file which is attached.
> When I test it for validity in XMLSpy, it is fine.  But WSDL2Java.jar
> doesn’t agree.  This is the command I use:****
>
>  ****
>
> C:\axis2-1.6.2\samples\pnskeywords>%AXIS2_HOME%\bin\WSDL2Java -uri
> keyword.wsdl****
>
> -p com.personalnetsearch.plugin.keys.axis2 -d adb –s****
>
>  ****
>
> This is the result:****
>
>  ****
>
> Using AXIS2_HOME:   C:\axis2-1.6.2****
>
> Using JAVA_HOME:    C:\Program Files\Java\jdk1.7.0_05****
>
> Retrieving document at 'keyword.wsdl'.****
>
> log4j:WARN No appenders could be found for logger
> (org.apache.axis2.description.****
>
> WSDL11ToAllAxisServicesBuilder).****
>
> log4j:WARN Please initialize the log4j system properly.****
>
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException****
>
> : Error parsing WSDL****
>
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat****
>
> ionEngine.java:175)****
>
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)****
>
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)****
>
> Caused by: org.apache.axis2.AxisFault: *More than one part for message
> KeywordLis*****
>
> *tInput*****
>
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi****
>
> ce(WSDL11ToAxisServiceBuilder.java:411)****
>
>         at
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA****
>
> llServices(WSDL11ToAllAxisServicesBuilder.java:107)****
>
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat****
>
> ionEngine.java:169)****
>
>         ... 2 more****
>
> Caused by:
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin****
>
> gException: *More than one part for message KeywordListInput*****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer****
>
> ence(WSDL11ToAxisServiceBuilder.java:1294)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer****
>
> ence(WSDL11ToAxisServiceBuilder.java:1217)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi****
>
> ng(WSDL11ToAxisServiceBuilder.java:731)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo****
>
> int(WSDL11ToAxisServiceBuilder.java:552)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo****
>
> ints(WSDL11ToAxisServiceBuilder.java:503)****
>
>         at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi****
>
> ce(WSDL11ToAxisServiceBuilder.java:373)****
>
>         ... 4 more****
>
>  ****
>
> I don’t understand why it has a problem with my having two parts for
> message KeywordListInput?  That’s what it is supposed to have.  It is
> supposed to take to int parameters, just like CategoryListInput.   Could
> somebody please explain what’s wrong.****
>
>  ****
>
>  ****
>
> This is because your wsdl contains multiple part for message
> "KeywordListInput" and AFAIK, this is allowed in rpc style binding only.
> But the provided wsdl is document literal type. So changing this to
> rpc would fix this issue. More info can be found here [1], [2].****
>
>  ****
>
> Thanks,****
>
> Kishanthan.****
>
> [1]
> http://markmail.org/message/pfvtcjf6orzcsuhj?q=axis2+More+than+one+part+for+message+input
>  ****
>
> [2] https://issues.apache.org/jira/browse/AXIS2-4096****
>
>  ****
>
> Alan Shiers****
>
>  ****
>
>  ****
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org****
>
>  ****
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org****
>
> ** **
>

Reply via email to