How to handle import of http://microsoft.com/wsdl/types/ in SchemaReader

View: New views
4 Messages — Rating Filter:   Alert me  

How to handle import of http://microsoft.com/wsdl/types/ in SchemaReader

by Amrita Prabhakaran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



Re: How to handle import of http://microsoft.com/wsdl/types/ in SchemaReader

by Werner Guttmann-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



Re: How to handle import of http://microsoft.com/wsdl/types/ in SchemaReader

by Amrita Prabhakaran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Werner,

Thanks for the prompt reply.
I am not the owner of this WSDL. This is one of the publicly available
types of WSDLs that I need to have my code work with. So changing the
WSDL is out of the question.
From your mail I understand that Castor does not handle
'http://microsoft.com/wsdl/types/' automatically.  As per your
suggestion I am thinking of creating a local XML schema file that
would have the required type definitions. Whenever the custom URI
Resolver comes across this URI it can reference the local XML schema
instead.

regards,
Amrita


On Tue, Sep 29, 2009 at 12:29 PM, Werner Guttmann <wguttmn@...> wrote:

> 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
>
>
>

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

    http://xircles.codehaus.org/manage_email



Re: How to handle import of http://microsoft.com/wsdl/types/ in SchemaReader

by Werner Guttmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sound like a viable approach to me. All you need is an XML schema (which
could be a physical copy of the inline type defs of your WSDL) to be
processed with the XML code generator.

Werner

Amrita Prabhakaran wrote:

> Hi Werner,
>
> Thanks for the prompt reply.
> I am not the owner of this WSDL. This is one of the publicly available
> types of WSDLs that I need to have my code work with. So changing the
> WSDL is out of the question.
>>From your mail I understand that Castor does not handle
> 'http://microsoft.com/wsdl/types/' automatically.  As per your
> suggestion I am thinking of creating a local XML schema file that
> would have the required type definitions. Whenever the custom URI
> Resolver comes across this URI it can reference the local XML schema
> instead.
>
> regards,
> Amrita
>
>
> On Tue, Sep 29, 2009 at 12:29 PM, Werner Guttmann <wguttmn@...> wrote:
>> 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
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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