RPTools.net

Discussion and Support

Skip to content

It is currently Fri Dec 15, 2017 2:46 pm 






Reply to topic  [ 8 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Any WSDL experts out there?
PostPosted: Mon Jun 24, 2013 8:15 pm 
Ok, so I have a non-maptool question regarding WSDL & Java and looking to pick a brain or two?

I have a older java app that connects to a PeopleSoft listener to get data via SOAP, then connects to a Cognos server to get a pdf, then connects to another PeopleSoft listener to write data to a db.

I have our current WSDL & related XSD files which have changed slightly adding a third data type to our scheme. Since the WSDL changed, the app complains about missing @proptypes so I went down the path of regenerating the client/server using Axis + Eclipse plugin.

The class files I get though are different names like Z_COGNOS_SDK vs current ZCOGNOSSDK. It's like a different wsdl was used to generate the files. Yet the code still works with the WSDL we currently have.

I *think* Axis 1.4 was used, I currently have Axis 1.6 (but called Axis 2?) and tried generating 1.x compatible files, always run into the nameing issue. Not sure what I need to change at this point.

Does any of this make any sense to anyone else? :) Any hints on where to go from here?

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Any WSDL experts out there?
PostPosted: Mon Jun 24, 2013 10:05 pm 
Sorry, no can help. :(

I played with some WSDL stuff long ago but my brain has completely forgotten all of it. :|


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1183
Location: Bristol, UK
 Post subject: Re: Any WSDL experts out there?
PostPosted: Tue Jun 25, 2013 5:09 am 
Axis is a little out of date now. Try JAX-WS. It's essentially the same process though :)

If it complains about duplicate parameter names while creating java objects based on WSDL, I think there is a parameter to cope with that (-extension?).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5412
 Post subject: Re: Any WSDL experts out there?
PostPosted: Tue Jun 25, 2013 7:55 am 
JamzTheMan wrote:
Ok, so I have a non-maptool question regarding WSDL & Java and looking to pick a brain or two?

....

The class files I get though are different names like Z_COGNOS_SDK vs current ZCOGNOSSDK. It's like a different wsdl was used to generate the files. Yet the code still works with the WSDL we currently have.

I *think* Axis 1.4 was used, I currently have Axis 1.6 (but called Axis 2?) and tried generating 1.x compatible files, always run into the nameing issue. Not sure what I need to change at this point.

Does any of this make any sense to anyone else? :) Any hints on where to go from here?


I won't cop to being an "expert", but I have 6-7 years of experience with wsdl's(I am a much bigger fan of soap than in most REST base API's that I have seen implementations for, which always leave something to be desired... they generally trade complexity of SOAP/WSDL for complexity of API object graphs were you have to know and understand the relationship between all the objects that you just done have to deal with in a properly built SOAP based WS...)

Anyway, your problem is almost certainly NOT your wsdl(assuming the wsdl you see is what was used to generate the original code). They generally contain little information(directly) about the objects and more handle the communication aspect. Your problem is either with a difference in the xsd's OR(more likely) your library(ie, Axis) version differences.

IIRC, xml tags have the exact same naming restrictions as java(and likely many other languages), so anything that is an XML element/attribute name should be just fine as java class/field. Then comes the point of how the xsd's are built and the contents. As another poster mentioned, one possibility is that your xsd's contain two(or more) elements with the same name(but perhaps in a different XML namespace) and the library needs a way to differentiate these from each other, so it renames them. Unfortunately, each library has it's own quirks about how to handle variations in xsd's. Honestly, even "compatibility" mode from different versions don't really always mean what you think it means in how it will generate the output XML.

JamzTheMan wrote:
I have a older java app that connects to a PeopleSoft listener to get data via SOAP, then connects to a Cognos server to get a pdf, then connects to another PeopleSoft listener to write data to a db.

I have our current WSDL & related XSD files which have changed slightly adding a third data type to our scheme. Since the WSDL changed, the app complains about missing @proptypes so I went down the path of regenerating the client/server using Axis + Eclipse plugin.


I am a bit confused about this part. The first sentence seems to indicate that YOU are acting a the client in all these connections(ie, calling into a remote web service), but the second one seems to indicate that you are hosting a web service. Perhaps it's just how I am reading it and the choice of words you used.

I would start with a comparison of the old xsd and the new one and preferably any sample xml files from each version if available(or can be generated). I am HUGE FAN of the free SoapUI program and use it extensively in my day job(I build integrations with third party vendors for sending Background Checks,Assessments, I9, etc requests and receiving the corresponding results for use within our product, though we utilize a middleware product that abstracts some of the complexity) I would start by creating a SoapUI project pointing to the old wsdl and then do the same for the new one and compare the xml message formats for any major changes in message structure as the first/easy step. Other than that, I can't really help with Axis specifically as I don't use it directly(but have a few times in the past, but that was a few years ago). The only other step would require me to actually get a good look at both of the wsdl's/xsd's in question....

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: Any WSDL experts out there?
PostPosted: Tue Jun 25, 2013 12:04 pm 
Thanks for the replies! Let me absorb that and try a few things.

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Any WSDL experts out there?
PostPosted: Tue Jun 25, 2013 8:31 pm 
jfrazierjr wrote:
IIRC, xml tags have the exact same naming restrictions as java(and likely many other languages), so anything that is an XML element/attribute name should be just fine as java class/field.

Well, I know XML element names and attributes can have dashes in them and Java classes and members cannot, so there's one difference.

I don't know how Axis works, but namespaces could be taken care of by simply changing any ":" in a tag to an underscore. Obviously that doesn't resolve the reference, but as far as building class name it would be sufficient.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: Any WSDL experts out there?
PostPosted: Tue Jun 25, 2013 10:49 pm 
OK, so problem solved. I was barking up a wrong tree. First I tried the web services menu in eclipse to build the client, then installed the Axis plugin with same results. Turned out it was done in Java 1.5 with JAX-WS. Although I was able to use the Java 1.6 to generate the code, it was finally back to the proper class names.

Nothing like being handed code done by a long gone consultant written 5 years ago. :shock:

Thanks for the help, sometimes it just takes bouncing it off other people and making sure you're at least in the general area. Now I can get back to the important stuff, like hacking MT. :twisted:

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5412
 Post subject: Re: Any WSDL experts out there?
PostPosted: Wed Jun 26, 2013 8:00 am 
Azhrei wrote:
jfrazierjr wrote:
IIRC, xml tags have the exact same naming restrictions as java(and likely many other languages), so anything that is an XML element/attribute name should be just fine as java class/field.

Well, I know XML element names and attributes can have dashes in them and Java classes and members cannot, so there's one difference.

I don't know how Axis works, but namespaces could be taken care of by simply changing any ":" in a tag to an underscore. Obviously that doesn't resolve the reference, but as far as building class name it would be sufficient.


Oi! Your right, there are TONS of allowed characters in xml element/attribute names that are not valid as java class/field names. I should know this better, it's my job! I guess I was thinking back to some really old spec or something and since I had not encountered any xml(and I have seen literally thousands of different schemas(and my schema's I more mean distinct xml content from the others, not the formal xml xsd "schema") over the years and just have never seen anything other than AlphaNumeric|Underscore|period for name parts(not counting the namespace prefix colon thingy), so it just became a standard "in my own mind".

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 8 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman