-
1. Re: WSDL import problem with SOAPProxy action
h.wolffenbuttel Dec 11, 2009 5:39 AM (in response to doudl)Hi,
Do you have an import in your xsd with a path and not referenced to the root? I have had a simmilar problem with imports in my xsd that had ../somedir/bla.xsd in stead of ../bla.xsd. If this is the case you could try to put all your xsd into the root of your .esb file and change de references to the root aswell.
Regards,
Hans -
2. Re: WSDL import problem with SOAPProxy action
doudl Dec 11, 2009 8:41 AM (in response to doudl)Hans,
Thanks for the reply. The schema does not have any imports, but I see how your idea applies to import paths in general.
The WSDL that is being read by the application is on a remote machine deployed by another application. I can't alter the imports. Also the schema files are not in the ESB file since they are part of the remote web service I'm trying to invoke.
I expect the proper behavior for executing the import would be to use the same protocol that imported WSDL (http) and it should be relative to the path used to import the WSDL. Instead the import is using a different protocol (file) and is relative to the default server deploy directory. This appears to be the way the SOAPClient works.
Leon -
3. Re: WSDL import problem with SOAPProxy action
doudl Dec 15, 2009 11:18 AM (in response to doudl)Just a little more information....
I browsed the source code to see if there was a configuration option I was missing or misusing, and found what I think the problem is.
The loadDefinitions method of SOAPProxyWsdlLoader calls the newLoader method, which in turn creates a HttpSOAPProxyWsdlLoader (a private inner class) class. The HttpSOAPProxyWsdlLoader copies the WSDL to a local temporary file, and creates the URL to the temporary file. The URL created for the WSDL now references a local file.
So..... I believe the relative imports then try to resolve their URLs relative to the temporary file instead of the real URL of the WSDL. Since the imported schemas used by the WSDL are not copied locally, when the imports are executed they cannot be resolved relative to local temporary file.
-
4. Re: WSDL import problem with SOAPProxy action
dward Dec 16, 2009 8:43 PM (in response to doudl)Hi Leon,
Can you please give me a self-contained example that I can use to create a JIRA and debug this with? If you can do it relatively quickly, that would be great. There is the *chance* we might want to get this fixed in our Cummulative Patch branch, if you hurry.
Thanks,
David
PS: I wrote the SOAPProxy action.
-
5. Re: WSDL import problem with SOAPProxy action
doudl Dec 17, 2009 9:17 AM (in response to dward)Hi David,
Thanks for the response! I'm putting together a simple example right now.
Leon
-
6. Re: WSDL import problem with SOAPProxy action
doudl Dec 17, 2009 11:53 AM (in response to doudl)David,
I'm still working on it. JBoss WS is rewriting the import statement in my WSDL file when deploying the web service. The rewrite changes the import from from relative to absolute and I need a relative path for my import problem.
Looks like I need to use something other than JBoss WS, like Axis, otherwise I can't make a WSDL with relative imports.
A snipet from my web service class...
@WebService(wsdlLocation="/wsdl/BarService.wsdl")
public class BarService
{...
The import from my BarService.wsdl
<import location="../catalog/wsdl/checkAge.wsdl" namespace="http://checkAge"/>
The rewritten import statement when I hit the deployed service (http://localhost:8080/BarService/BarService?wsdl)
<import location='http://localhost:8080/BarService/BarService?wsdl&resource=../catalog/wsdl/checkAge.wsdl' namespace='http://checkAge'></import>
I'll keep working on it and post when I found a way to put relative imports into a WSDL without the rewrites happening.
Leon -
7. Re: WSDL import problem with SOAPProxy action
dward Dec 18, 2009 2:51 PM (in response to doudl)Leon,
Just checking in. FYI, I created a jira on this, if you want to "Watch" it:
https://jira.jboss.org/jira/browse/JBESB-3076
David
-
8. Re: WSDL import problem with SOAPProxy action
dward Jan 18, 2010 11:37 PM (in response to doudl)Leon,
I've checked in a fix for https://jira.jboss.org/jira/browse/JBESB-3076 . I also attached a test case to it.
Best regards,
David