Hi,

Can you please externalize those type definitions to a separate XML
schema file and change your WSDL to reference it ? Once this has been
established, it should be easy and straight-forward to run Castor's XML
code/source generator to create POJOs from the type defs in your XML
schema(s).

Regards
Werner

Amrita Prabhakaran wrote:
> Hello,
> 
> I am new to wsdl and castor so please bear me out. I am trying to
> develop a client that can read any type of wsdl and then access the
> web services as defined by the wsdl. I am using castor_1.1.2.jar 's
> SchemaReader to handle the schema definitions in the wsdls. I am
> currently trying to get my code to work with the wsdl
> "http://service.oli-it.com/LogicService.asmx?wsdl";. I get an error :-
> 
> ....
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>       at java.lang.reflect.Method.invoke(Unknown Source)
>       at junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>       at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: NestedIOException: Error reading import file
> 'http://microsoft.com/wsdl/types/': java.io.FileNotFoundException:
> http://www.microsoft.com/wsdl/types/ { nested error: Error reading
> import file 'http://microsoft.com/wsdl/types/':
> java.io.FileNotFoundException: http://www.microsoft.com/wsdl/types/}
>       at 
> org.exolab.castor.xml.schema.reader.SchemaReader.handleException(SchemaReader.java:333)
>       at 
> org.exolab.castor.xml.schema.reader.SchemaReader.handleException(SchemaReader.java:361)
>       at 
> org.exolab.castor.xml.schema.reader.SchemaReader.read(SchemaReader.java:254)
>       
>       ... 17 more
> 
> I have implemented my own URIResolver that gives the URL to be the
> same as the URN which is causing the FileNotFoundException. If the
> default URIResolver is used it gives the error as Unable to resolve
> schema pertaining to 'http://microsoft.com/wsdl/types/'.
> The URL 'http://microsoft.com/wsdl/types/' is not valid and I am
> guessing it is something that is automatically resolved by .NET
> clients. There are a lot of posts on many mailing lists related to
> 'http://microsoft.com/wsdl/types/ being invalid but I haven't found
> any solutions.
> I feel I am missing something very basic here hope someone can point
> me on the right track.
> Thanks in advance,
> Amrita
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to