|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Trouble compiling WSDL with multiple schema namespaces.Hi everyone. I confess up-front that I'm a JAX-WS newbie, but I think I've done a reasonable job of looking up the available documentation and I'm a bit stumped.
I'm about to write a JAXWS client to a microsoft dynamics CRM service. I've run wsimport over the WSDL (I've attached it - CrmServiceWsdl.wsdl) and I'm getting errors like these: [WARNING] src-resolve: Cannot resolve the name 's1:AccessRights' to a(n) 'type definition' component. line 852 of file:/C:/axis/jaxws-ri/CrmServiceWsdl.wsdl#types?schema7 [WARNING] src-resolve: Cannot resolve the name 's4:AppointmentRequest' to a(n) 'type definition' component. line 853 of file:/C:/axis/jaxws-ri/CrmServiceWsdl.wsdl#types?schema7 etc (you can get the rest of it by running wsdl - it gets a bit redundant). The problem is - I don't think there's anything wrong with the WSDL! By eye-inspection, those types should be defined in their appropriate namespace, with their specified prefixes. In the spirit of investigation, I pulled out the 7 schemas and ran them through JAXB. With the addition of a few imports, and a simple binding file to resolve some name clashes, xjc compiled these binding classes with no problems (I've attached the files I used - coretypes2006.xsd, coretypes2007.xsd, query.xsd, scheduling.xsd, types.xsd, ws2006.xsd, ws2007.xsd and ws2007.xjb). So I don't believe there's a fundamental problem with the individual schemas themselves. Pushing my luck a little bit further, I wondered if the same name clashes were behind the wsimport errors, so I wrote a wsdl binding file (wsdl.xjb) and supplied that to wsimport with the -b option. That made no difference to the error output. I'm now stuck. There must be some critical piece of information I'm missing. Can somebody with more experience please take a look? Thanks in advance ... :-) Matt. [Message sent by forum member 'matthewdwilson' (Matthew.D.Wilson@...)] http://forums.java.net/jive/thread.jspa?messageID=368942 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.Is there anyone here who can give this a try and tell me if it's just me?
I'm beginning to wonder if this is a bug. [Message sent by forum member 'matthewdwilson' (Matthew.D.Wilson@...)] http://forums.java.net/jive/thread.jspa?messageID=370418 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.You may want to check this issue, Sounds similar
https://jax-ws.dev.java.net/issues/show_bug.cgi?id=468. If its the same issue. There is a workaround for this issue, i.e. to split the wsdls and run then separately to wscompile. If you are looking at how to do it, checkout the wsrp.dev.java.net project and look into the common/pom.xml - It compiles the WSRP wsdls from the conf directory it also has all the JAXB customization you'd need. [Message sent by forum member 't_rajesh' (rajesh.thiagarajan@...)] http://forums.java.net/jive/thread.jspa?messageID=371120 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.Thanks for your help!
I split up the WSDL, moving most of the schemas/namespaces into separate xsd files, and left just one (the target namespace) to import the rest. I think that's what you were telling me to do - in any case it worked. The result compiles with no errors. I've attached the files, in case anyone wants to take a look. That's a useful trick. It's probably a bug, sure, but that's not a problem if I can work around it :-) Now I just have to work out how to use the web service itself ... [Message sent by forum member 'matthewdwilson' (Matthew.D.Wilson@...)] http://forums.java.net/jive/thread.jspa?messageID=371243 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.I've seen this too, when using a WSDL with multiple schemas embedded in the WSDL and one importing another. Despite the warning, as far as I can see the code gets generated correctly. Did you try using the generated code?
[Message sent by forum member 'dsosnoski' (dms@...)] http://forums.java.net/jive/thread.jspa?messageID=371331 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.The trouble is that I don't yet know enough about the API to know if the code was generated correctly or not :-)
We were experimenting with Axis/ADB and we were having some success - but we fairly quickly ran into a limitation with the ADB binding and gate that away. I'm going to have a look at the xmlbeans binding as well, but I wanted to give JAXWS a run first. One thing that jumps out at me is that the "interface" that JAXWS generates from this WSDL is quite different from that generated by Axis/ADB. I'm not sure what to make of that yet. It's all a maze of twisty turny passages. Matt. [Message sent by forum member 'matthewdwilson' (Matthew.D.Wilson@...)] http://forums.java.net/jive/thread.jspa?messageID=371343 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.What limitation did you run into with ADB? In general, it offers support about on a par with JAXB, though it does have some quirks.
It's interesting to me that you found the interface generated by JAX-WS so much different from that generated by Axis2/ADB. There are a lot of differences in the details of how you actually make use of the interface, but I'd think the actual service interface (method calls mapped to service operations) would be very similar. Can you tell me more about the differences you found? I'm always interested in what people are running into using these frameworks. :-) XMLBeans should allow you to work with any schema, but the data model interface is going to be nasty (doesn't matter what the schema looks like, that's just the nature of XMLBeans IMHO - you have to assemble all the bits of the message like lego blocks, and if you miss one or assemble them in the wrong order XMLBeans will happily spit out XML which doesn't match the schema). [Message sent by forum member 'dsosnoski' (dms@...)] http://forums.java.net/jive/thread.jspa?messageID=371469 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.> What limitation did you run into with ADB? In
> general, it offers support about on a par with JAXB, > though it does have some quirks. > > It's interesting to me that you found the interface > generated by JAX-WS so much different from that > generated by Axis2/ADB. There are a lot of > differences in the details of how you actually make > use of the interface, but I'd think the actual > service interface (method calls mapped to service > operations) would be very similar. Can you tell me > more about the differences you found? [b]I'm always > interested in what people are running into using > these frameworks. :-)[/b]> To your point I highlighted in bold...I have one - though not the exact same issue as this thread... I have been using JAX-WS for well over a year now...much of it is a great improvement over JAX-RPC, but I have been confounded by an issue w/ the tooling, have posted the question, but have yet to ever find any solution to the issue other than hacking up the generated classes to put the HashMap construct back together. I posted here: http://www.coderanch.com/t/455716/Web-Services/java/WebService-method-returning-custom-class I'd be grateful if you have any insight. Thanks [Message sent by forum member 'mcs130' ] http://forums.java.net/jive/thread.jspa?messageID=371497 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces."What limitation did you run into with ADB?"
One problem was that it couldn't generate a binding to parse a a type that contained a sequence followed by another element. The ADB code didn't appear (to me) to be generated correctly. When it tried to parse a (apparently correct) incoming message, it would consume the elements of the sequence portion just fine, then throw an error when it came to the next element after the sequence - it wasn't expecting it to be there. I had a look at the code, and the stopping condition used for parsing the sequence (the "follow set", if you will) was the closing tag for the enclosing type, not the element that was supposed to follow the sequence. It just wasn't looking for the following elements. If you're really keen, I can try to bundle up an example and upload it. That'll probably make more sense than my description :-) As it happens, that was a problem with a different web service to the one I'm looking at currently - JAXWS handled that with no difficulties. One of the guys here came across another ADB problem (which he reckoned was documented) that affected the WSDL that we're currently playing with. That was what made me decide to switch to JAXWS (that - and the documentation suggests that it's a more complete solution) , but he's interstate at the moment - I'll catch up with him and see if he can remember what it was. Ironically, I went back to using Axis anyway. It's probably just temporary - but I was in the mood for getting things done yesterday, and I couldn't figure out how to pass a "soap:header" value to an operation using JAXWS. Axis/XmlBeans just exposes these as parameters to the method call, so I switched back to using that for the time being. Here's an example of what I mean: <wsdl:operation name="Fetch"> <soap:operation soapAction="http://schemas.microsoft.com/crm/2007/WebServices/Fetch" style="document" /> <wsdl:input> <soap:body use="literal" /> [b] <soap:header message="tns:FetchCrmAuthenticationToken" part="CrmAuthenticationToken" use="literal" /> <soap:header message="tns:FetchCallerOriginToken" part="CallerOriginToken" use="literal" /> <soap:header message="tns:FetchCorrelationToken" part="CorrelationToken" use="literal" />[/b] </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> Those three highlighted parts (is part the right word? I think it is) are important to the web service. Apparently I need to do some more JAXWS reading - it's quite clear that there's more I need to know. I'm juggling this with a couple of other things - I'm only spending a couple of days a week on it at the moment. It's a bit like running in treacle, but I'm beginning to at least find what I don't know :-) Bear with me - I will follow up any responses, I promise. It might just take me a couple of days. [Message sent by forum member 'matthewdwilson' ] http://forums.java.net/jive/thread.jspa?messageID=371668 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Trouble compiling WSDL with multiple schema namespaces.More rambling ...
"It's interesting to me that you found the interface generated by JAX-WS so much different from that generated by Axis2/ADB" I found it interesting too. I'm now quite keen to try to duplicate everything I do in axis/xmlbeans and jaxws, just to expose any differences - just so I can see what the differences are. The issue with w.r.t "soap:header" values (see above) is the most recent difference I've found - but that's probably not very significant (it just means I need to learn more about the spec - it stands to reason that JAXWS should handle these, I just don't know how yet). You're quite right about the differences in the ways that different bindings construct their objects - but that's more a curiosity than a problem. Behold - the guy who's only just starting to figure it out! [Message sent by forum member 'matthewdwilson' ] http://forums.java.net/jive/thread.jspa?messageID=371669 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |